@reqvire-org/reqvire 1.2.1 → 1.2.2
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/artifacts/reqvire-darwin-arm64.tar.gz +0 -0
- package/artifacts/reqvire-darwin-x86_64.tar.gz +0 -0
- package/artifacts/reqvire-linux-x86_64.tar.gz +0 -0
- package/explorer-dist/assets/explorer-abnfDiagram-VCTEODGH.js +1 -0
- package/explorer-dist/assets/explorer-architectureDiagram-5GKGNRK7.js +36 -0
- package/explorer-dist/assets/explorer-blockDiagram-I7D4REHJ.js +129 -0
- package/explorer-dist/assets/explorer-c4Diagram-7LVT6UL2.js +38 -0
- package/explorer-dist/assets/{explorer-chunk-ND2GUHAM.js → explorer-chunk-F27PBJKO.js} +1 -1
- package/explorer-dist/assets/explorer-chunk-IMKFNOWR.js +231 -0
- package/explorer-dist/assets/explorer-chunk-SVP7TREG.js +88 -0
- package/explorer-dist/assets/{explorer-chunk-727SXJPM.js → explorer-chunk-TICWLB2K.js} +4 -4
- package/explorer-dist/assets/explorer-classDiagram-ZZMXUADV.js +1 -0
- package/explorer-dist/assets/explorer-classDiagram-v2-VYDZK3BY.js +1 -0
- package/explorer-dist/assets/explorer-cynefin-OW5HDTMX.js +178 -0
- package/explorer-dist/assets/explorer-cynefinDiagram-5FMLGOSQ.js +62 -0
- package/explorer-dist/assets/explorer-dagre-GXQ25YYZ.js +4 -0
- package/explorer-dist/assets/explorer-diagram-S7CK7UJ4.js +30 -0
- package/explorer-dist/assets/explorer-diagram-UQ7AKVKN.js +41 -0
- package/explorer-dist/assets/{explorer-diagram-KO2AKTUF.js → explorer-diagram-VSXAHHWV.js} +3 -3
- package/explorer-dist/assets/explorer-diagram-VX7I27RA.js +24 -0
- package/explorer-dist/assets/{explorer-diagram-LMA3HP47.js → explorer-diagram-Z3DM3KII.js} +2 -2
- package/explorer-dist/assets/explorer-ebnfDiagram-PWID7BFC.js +1 -0
- package/explorer-dist/assets/explorer-erDiagram-RLTQ6QDP.js +99 -0
- package/explorer-dist/assets/explorer-flowDiagram-HODETNUW.js +168 -0
- package/explorer-dist/assets/explorer-ganttDiagram-EL5Y4UJY.js +292 -0
- package/explorer-dist/assets/{explorer-gitGraphDiagram-PVQCEYII.js → explorer-gitGraphDiagram-WWUBYQGX.js} +11 -11
- package/explorer-dist/assets/{explorer-infoDiagram-5YYISTIA.js → explorer-infoDiagram-27XIBGKW.js} +1 -1
- package/explorer-dist/assets/{explorer-ishikawaDiagram-YF4QCWOH.js → explorer-ishikawaDiagram-5VMMS53U.js} +4 -4
- package/explorer-dist/assets/{explorer-journeyDiagram-JHISSGLW.js → explorer-journeyDiagram-3NMN7TZE.js} +2 -2
- package/explorer-dist/assets/{explorer-kanban-definition-UN3LZRKU.js → explorer-kanban-definition-UXKFOSKX.js} +7 -7
- package/explorer-dist/assets/explorer-layout.js +1 -1
- package/explorer-dist/assets/explorer-mermaid.core.js +145 -142
- package/explorer-dist/assets/{explorer-mindmap-definition-RKZ34NQL.js → explorer-mindmap-definition-YA3MSWOX.js} +2 -2
- package/explorer-dist/assets/explorer-pegDiagram-XKGWAZYB.js +1 -0
- package/explorer-dist/assets/explorer-pieDiagram-E7YTZNPT.js +39 -0
- package/explorer-dist/assets/{explorer-quadrantDiagram-W4KKPZXB.js → explorer-quadrantDiagram-AXDQQJYC.js} +3 -3
- package/explorer-dist/assets/explorer-railroadDiagram-O6MQD6OU.js +1 -0
- package/explorer-dist/assets/{explorer-requirementDiagram-4Y6WPE33.js → explorer-requirementDiagram-BXWQKSXE.js} +5 -5
- package/explorer-dist/assets/explorer-sankeyDiagram-P5KCCOFB.js +40 -0
- package/explorer-dist/assets/explorer-sequenceDiagram-WJ2MYXX4.js +162 -0
- package/explorer-dist/assets/explorer-sizeCapture-INFHLROL.js +1 -0
- package/explorer-dist/assets/explorer-stateDiagram-D77RDMKH.js +1 -0
- package/explorer-dist/assets/explorer-stateDiagram-v2-MP3YSRHH.js +1 -0
- package/explorer-dist/assets/explorer-swimlanes-42K2YHIH.js +1 -0
- package/explorer-dist/assets/explorer-swimlanesDiagram-VR7AAH4N.js +8 -0
- package/explorer-dist/assets/{explorer-timeline-definition-PNZ67QCA.js → explorer-timeline-definition-24CTP7MA.js} +3 -3
- package/explorer-dist/assets/explorer-vennDiagram-4TSXK5OY.js +34 -0
- package/explorer-dist/assets/{explorer-wardleyDiagram-YWT4CUSO.js → explorer-wardleyDiagram-VM6X3IG4.js} +4 -4
- package/explorer-dist/assets/explorer-xychartDiagram-S5SC5T6Z.js +7 -0
- package/explorer-dist/assets/explorer.js +109 -109
- package/package.json +1 -1
- package/explorer-dist/assets/explorer-architectureDiagram-3BPJPVTR.js +0 -36
- package/explorer-dist/assets/explorer-blockDiagram-GPEHLZMM.js +0 -132
- package/explorer-dist/assets/explorer-c4Diagram-AAUBKEIU.js +0 -10
- package/explorer-dist/assets/explorer-chunk-AQP2D5EJ.js +0 -231
- package/explorer-dist/assets/explorer-classDiagram-4FO5ZUOK.js +0 -1
- package/explorer-dist/assets/explorer-classDiagram-v2-Q7XG4LA2.js +0 -1
- package/explorer-dist/assets/explorer-dagre-BM42HDAG.js +0 -4
- package/explorer-dist/assets/explorer-diagram-2AECGRRQ.js +0 -43
- package/explorer-dist/assets/explorer-diagram-5GNKFQAL.js +0 -10
- package/explorer-dist/assets/explorer-diagram-OG6HWLK6.js +0 -24
- package/explorer-dist/assets/explorer-erDiagram-TEJ5UH35.js +0 -85
- package/explorer-dist/assets/explorer-flowDiagram-I6XJVG4X.js +0 -162
- package/explorer-dist/assets/explorer-ganttDiagram-6RSMTGT7.js +0 -292
- package/explorer-dist/assets/explorer-graph.js +0 -1
- package/explorer-dist/assets/explorer-pieDiagram-4H26LBE5.js +0 -30
- package/explorer-dist/assets/explorer-sankeyDiagram-5OEKKPKP.js +0 -40
- package/explorer-dist/assets/explorer-sequenceDiagram-3UESZ5HK.js +0 -162
- package/explorer-dist/assets/explorer-stateDiagram-AJRCARHV.js +0 -1
- package/explorer-dist/assets/explorer-stateDiagram-v2-BHNVJYJU.js +0 -1
- package/explorer-dist/assets/explorer-vennDiagram-CIIHVFJN.js +0 -34
- package/explorer-dist/assets/explorer-wardley-L42UT6IY.js +0 -173
- package/explorer-dist/assets/explorer-xychartDiagram-2RQKCTM6.js +0 -7
- /package/explorer-dist/assets/{explorer-chunk-QZHKN3VN.js → explorer-chunk-2Q5K7J3B.js} +0 -0
- /package/explorer-dist/assets/{explorer-chunk-FMBD7UC4.js → explorer-chunk-5VM5RSS4.js} +0 -0
- /package/explorer-dist/assets/{explorer-chunk-4BX2VUAB.js → explorer-chunk-JWPE2WC7.js} +0 -0
- /package/explorer-dist/assets/{explorer-chunk-2J33WTMH.js → explorer-chunk-POPQ4Y6H.js} +0 -0
- /package/explorer-dist/assets/{explorer-chunk-55IACEB6.js → explorer-chunk-XXDRQBXY.js} +0 -0
- /package/explorer-dist/assets/{explorer-cose-bilkent-S5V4N54A.js → explorer-cose-bilkent-JH36ORCC.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./explorer-
|
|
2
|
-
var Lf=Object.defineProperty;var Ff=(e,t,r)=>t in e?Lf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var wt=(e,t,r)=>Ff(e,typeof t!="symbol"?t+"":t,r);import{w as Af,a as Ef,c as vr,x as Mf,y as Of,q as Jn,g as $f,_ as gt,s as ht,u as xh,v as bh}from"./explorer.js";function kh(e){this._context=e}kh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function vi(e){return new kh(e)}function If(e,t){var r=vr(!0),i=null,s=vi,a=null,o=Af(n);e=typeof e=="function"?e:e===void 0?Mf:vr(e),t=typeof t=="function"?t:t===void 0?Of:vr(t);function n(l){var h,c=(l=Ef(l)).length,d,p=!1,u;for(i==null&&(a=s(u=o())),h=0;h<=c;++h)!(h<c&&r(d=l[h],h,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(d,h,l),+t(d,h,l));if(u)return a=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:vr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:vr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:vr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}function tr(){}function Ts(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Gs(e){this._context=e}Gs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ts(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ts(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ua(e){return new Gs(e)}function Th(e){this._context=e}Th.prototype={areaStart:tr,areaEnd:tr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ts(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Df(e){return new Th(e)}function Sh(e){this._context=e}Sh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Ts(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pf(e){return new Sh(e)}function wh(e,t){this._basis=new Gs(e),this._beta=t}wh.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Rf=(function e(t){function r(i){return t===1?new Gs(i):new wh(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Ss(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Po(e,t){this._context=e,this._k=(1-t)/6}Po.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ss(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ss(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bh=(function e(t){function r(i){return new Po(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ro(e,t){this._context=e,this._k=(1-t)/6}Ro.prototype={areaStart:tr,areaEnd:tr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ss(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qf=(function e(t){function r(i){return new Ro(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qo(e,t){this._context=e,this._k=(1-t)/6}qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ss(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Nf=(function e(t){function r(i){return new qo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function No(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Jn){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Jn){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function _h(e,t){this._context=e,this._alpha=t}_h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:No(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vh=(function e(t){function r(i){return t?new _h(i,t):new Po(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Lh(e,t){this._context=e,this._alpha=t}Lh.prototype={areaStart:tr,areaEnd:tr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:No(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wf=(function e(t){function r(i){return t?new Lh(i,t):new Ro(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Fh(e,t){this._context=e,this._alpha=t}Fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:No(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zf=(function e(t){function r(i){return t?new Fh(i,t):new qo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ah(e){this._context=e}Ah.prototype={areaStart:tr,areaEnd:tr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Hf(e){return new Ah(e)}function tl(e){return e<0?-1:1}function el(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(tl(a)+tl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function rl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function va(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function ws(e){this._context=e}ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:va(this,this._t0,rl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,va(this,rl(this,r=el(this,e,t)),r);break;default:va(this,this._t0,r=el(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Eh(e){this._context=new Mh(e)}(Eh.prototype=Object.create(ws.prototype)).point=function(e,t){ws.prototype.point.call(this,t,e)};function Mh(e){this._context=e}Mh.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Oh(e){return new ws(e)}function $h(e){return new Eh(e)}function Ih(e){this._context=e}Ih.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=il(e),s=il(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function il(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function Dh(e){return new Ih(e)}function Xs(e,t){this._context=e,this._t=t}Xs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Ph(e){return new Xs(e,.5)}function Rh(e){return new Xs(e,0)}function qh(e){return new Xs(e,1)}var ds={exports:{}},Yf=ds.exports,sl;function Uf(){return sl||(sl=1,(function(e,t){(function(r,i){e.exports=i()})(Yf,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",h="day",c="week",d="month",p="quarter",u="year",y="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var E=["th","st","nd","rd"],L=P%100;return"["+P+(E[(L-20)%10]||E[L]||E[0])+"]"}},k=function(P,E,L){var $=String(P);return!$||$.length>=E?P:""+Array(E+1-$.length).join(L)+P},S={s:k,z:function(P){var E=-P.utcOffset(),L=Math.abs(E),$=Math.floor(L/60),A=L%60;return(E<=0?"+":"-")+k($,2,"0")+":"+k(A,2,"0")},m:function P(E,L){if(E.date()<L.date())return-P(L,E);var $=12*(L.year()-E.year())+(L.month()-E.month()),A=E.clone().add($,d),w=L-A<0,N=E.clone().add($+(w?-1:1),d);return+(-($+(L-A)/(w?A-N:N-A))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:u,w:c,d:h,D:y,h:l,m:n,s:o,ms:a,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},B="en",_={};_[B]=b;var M="$isDayjsObject",v=function(P){return P instanceof Y||!(!P||!P[M])},z=function P(E,L,$){var A;if(!E)return B;if(typeof E=="string"){var w=E.toLowerCase();_[w]&&(A=w),L&&(_[w]=L,A=w);var N=E.split("-");if(!A&&N.length>1)return P(N[0])}else{var V=E.name;_[V]=E,A=V}return!$&&A&&(B=A),A||!$&&B},D=function(P,E){if(v(P))return P.clone();var L=typeof E=="object"?E:{};return L.date=P,L.args=arguments,new Y(L)},I=S;I.l=z,I.i=v,I.w=function(P,E){return D(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Y=(function(){function P(L){this.$L=z(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[M]=!0}var E=P.prototype;return E.parse=function(L){this.$d=(function($){var A=$.date,w=$.utc;if(A===null)return new Date(NaN);if(I.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var N=A.match(m);if(N){var V=N[2]-1||0,dt=(N[7]||"0").substring(0,3);return w?new Date(Date.UTC(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,dt)):new Date(N[1],V,N[3]||1,N[4]||0,N[5]||0,N[6]||0,dt)}}return new Date(A)})(L),this.init()},E.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},E.$utils=function(){return I},E.isValid=function(){return this.$d.toString()!==f},E.isSame=function(L,$){var A=D(L);return this.startOf($)<=A&&A<=this.endOf($)},E.isAfter=function(L,$){return D(L)<this.startOf($)},E.isBefore=function(L,$){return this.endOf($)<D(L)},E.$g=function(L,$,A){return I.u(L)?this[$]:this.set(A,L)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(L,$){var A=this,w=!!I.u($)||$,N=I.p(L),V=function(le,et){var X=I.w(A.$u?Date.UTC(A.$y,et,le):new Date(A.$y,et,le),A);return w?X:X.endOf(h)},dt=function(le,et){return I.w(A.toDate()[le].apply(A.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(et)),A)},ft=this.$W,ut=this.$M,Ct=this.$D,vt="set"+(this.$u?"UTC":"");switch(N){case u:return w?V(1,0):V(31,11);case d:return w?V(1,ut):V(0,ut+1);case c:var Nt=this.$locale().weekStart||0,ae=(ft<Nt?ft+7:ft)-Nt;return V(w?Ct-ae:Ct+(6-ae),ut);case h:case y:return dt(vt+"Hours",0);case l:return dt(vt+"Minutes",1);case n:return dt(vt+"Seconds",2);case o:return dt(vt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(L){return this.startOf(L,!1)},E.$set=function(L,$){var A,w=I.p(L),N="set"+(this.$u?"UTC":""),V=(A={},A[h]=N+"Date",A[y]=N+"Date",A[d]=N+"Month",A[u]=N+"FullYear",A[l]=N+"Hours",A[n]=N+"Minutes",A[o]=N+"Seconds",A[a]=N+"Milliseconds",A)[w],dt=w===h?this.$D+($-this.$W):$;if(w===d||w===u){var ft=this.clone().set(y,1);ft.$d[V](dt),ft.init(),this.$d=ft.set(y,Math.min(this.$D,ft.daysInMonth())).$d}else V&&this.$d[V](dt);return this.init(),this},E.set=function(L,$){return this.clone().$set(L,$)},E.get=function(L){return this[I.p(L)]()},E.add=function(L,$){var A,w=this;L=Number(L);var N=I.p($),V=function(ut){var Ct=D(w);return I.w(Ct.date(Ct.date()+Math.round(ut*L)),w)};if(N===d)return this.set(d,this.$M+L);if(N===u)return this.set(u,this.$y+L);if(N===h)return V(1);if(N===c)return V(7);var dt=(A={},A[n]=i,A[l]=s,A[o]=r,A)[N]||1,ft=this.$d.getTime()+L*dt;return I.w(ft,this)},E.subtract=function(L,$){return this.add(-1*L,$)},E.format=function(L){var $=this,A=this.$locale();if(!this.isValid())return A.invalidDate||f;var w=L||"YYYY-MM-DDTHH:mm:ssZ",N=I.z(this),V=this.$H,dt=this.$m,ft=this.$M,ut=A.weekdays,Ct=A.months,vt=A.meridiem,Nt=function(et,X,St,lt){return et&&(et[X]||et($,w))||St[X].slice(0,lt)},ae=function(et){return I.s(V%12||12,et,"0")},le=vt||function(et,X,St){var lt=et<12?"AM":"PM";return St?lt.toLowerCase():lt};return w.replace(C,(function(et,X){return X||(function(St){switch(St){case"YY":return String($.$y).slice(-2);case"YYYY":return I.s($.$y,4,"0");case"M":return ft+1;case"MM":return I.s(ft+1,2,"0");case"MMM":return Nt(A.monthsShort,ft,Ct,3);case"MMMM":return Nt(Ct,ft);case"D":return $.$D;case"DD":return I.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Nt(A.weekdaysMin,$.$W,ut,2);case"ddd":return Nt(A.weekdaysShort,$.$W,ut,3);case"dddd":return ut[$.$W];case"H":return String(V);case"HH":return I.s(V,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return le(V,dt,!0);case"A":return le(V,dt,!1);case"m":return String(dt);case"mm":return I.s(dt,2,"0");case"s":return String($.$s);case"ss":return I.s($.$s,2,"0");case"SSS":return I.s($.$ms,3,"0");case"Z":return N}return null})(et)||N.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(L,$,A){var w,N=this,V=I.p($),dt=D(L),ft=(dt.utcOffset()-this.utcOffset())*i,ut=this-dt,Ct=function(){return I.m(N,dt)};switch(V){case u:w=Ct()/12;break;case d:w=Ct();break;case p:w=Ct()/3;break;case c:w=(ut-ft)/6048e5;break;case h:w=(ut-ft)/864e5;break;case l:w=ut/s;break;case n:w=ut/i;break;case o:w=ut/r;break;default:w=ut}return A?w:I.a(w)},E.daysInMonth=function(){return this.endOf(d).$D},E.$locale=function(){return _[this.$L]},E.locale=function(L,$){if(!L)return this.$L;var A=this.clone(),w=z(L,$,!0);return w&&(A.$L=w),A},E.clone=function(){return I.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P})(),H=Y.prototype;return D.prototype=H,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",h],["$M",d],["$y",u],["$D",y]].forEach((function(P){H[P[1]]=function(E){return this.$g(E,P[0],P[1])}})),D.extend=function(P,E){return P.$i||(P(E,Y,D),P.$i=!0),D},D.locale=z,D.isDayjs=v,D.unix=function(P){return D(1e3*P)},D.en=_[B],D.Ls=_,D.p={},D}))})(ds)),ds.exports}var jf=Uf();const Gf=$f(jf);var Nh=Object.defineProperty,g=(e,t)=>Nh(e,"name",{value:t,configurable:!0}),Xf=(e,t)=>{for(var r in t)Nh(e,r,{get:t[r],enumerable:!0})},Ie={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Wo=g(function(e="fatal"){let t=Ie.fatal;typeof e=="string"?e.toLowerCase()in Ie&&(t=Ie[e]):typeof e=="number"&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=Ie.fatal&&(W.fatal=console.error?console.error.bind(console,de("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",de("FATAL"))),t<=Ie.error&&(W.error=console.error?console.error.bind(console,de("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",de("ERROR"))),t<=Ie.warn&&(W.warn=console.warn?console.warn.bind(console,de("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",de("WARN"))),t<=Ie.info&&(W.info=console.info?console.info.bind(console,de("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",de("INFO"))),t<=Ie.debug&&(W.debug=console.debug?console.debug.bind(console,de("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("DEBUG"))),t<=Ie.trace&&(W.trace=console.debug?console.debug.bind(console,de("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",de("TRACE")))},"setLogLevel"),de=g(e=>`%c${Gf().format("ss.SSS")} : ${e} : `,"format");const us={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return us.hue2rgb(a,s,e+1/3)*255;case"g":return us.hue2rgb(a,s,e)*255;case"b":return us.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Vf={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Zf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:us,lang:Vf,unit:Zf},Xe={};for(let e=0;e<=255;e++)Xe[e]=nt.unit.dec2hex(e);const jt={ALL:0,RGB:1,HSL:2};class Kf{constructor(){this.type=jt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=jt.ALL}is(t){return this.type===t}}class Qf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Kf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=jt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(jt.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(jt.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(jt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(jt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(jt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(jt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(jt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(jt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Vs=new Qf({r:0,g:0,b:0,a:0},"transparent"),Pr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Pr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,h=a?0:-1,c=o?255:15;return Vs.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}${Xe[Math.round(s*255)]}`:`#${Xe[Math.round(t)]}${Xe[Math.round(r)]}${Xe[Math.round(i)]}`}},dr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(dr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(dr.re);if(!r)return;const[,i,s,a,o,n]=r;return Vs.set({h:dr._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Li={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Li.colors[e];if(t)return Pr.parse(t)},stringify:e=>{const t=Pr.stringify(e);for(const r in Li.colors)if(Li.colors[r]===t)return r}},ki={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ki.re);if(!r)return;const[,i,s,a,o,n,l,h,c]=r;return Vs.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?nt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},Ae={format:{keyword:Li,hex:Pr,rgb:ki,rgba:ki,hsl:dr,hsla:dr},parse:e=>{if(typeof e!="string")return e;const t=Pr.parse(e)||ki.parse(e)||dr.parse(e)||Li.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(jt.HSL)||e.data.r===void 0?dr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ki.stringify(e):Pr.stringify(e)},Wh=(e,t)=>{const r=Ae.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return Ae.stringify(r)},Qe=(e,t,r=0,i=1)=>{if(typeof e!="number")return Wh(e,{a:t});const s=Vs.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return Ae.stringify(s)},Jf=e=>{const{r:t,g:r,b:i}=Ae.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},tm=e=>Jf(e)>=.5,ke=e=>!tm(e),zh=(e,t,r)=>{const i=Ae.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Ae.stringify(i)},R=(e,t)=>zh(e,"l",t),q=(e,t)=>zh(e,"l",-t),x=(e,t)=>{const r=Ae.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Wh(e,i)},em=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Ae.parse(e),{r:n,g:l,b:h,a:c}=Ae.parse(t),d=r/100,p=d*2-1,u=o-c,f=((p*u===-1?p:(p+u)/(1+p*u))+1)/2,m=1-f,C=i*f+n*m,b=s*f+l*m,k=a*f+h*m,S=o*d+c*(1-d);return Qe(C,b,k,S)},F=(e,t=100)=>{const r=Ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,em(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function al(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function rm(e){if(Array.isArray(e))return e}function im(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw s}}return n}}function sm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function am(e,t){return rm(e)||im(e,t)||om(e,t)||sm()}function om(e,t){if(e){if(typeof e=="string")return al(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?al(e,t):void 0}}const Hh=Object.entries,ol=Object.setPrototypeOf,nm=Object.isFrozen,lm=Object.getPrototypeOf,hm=Object.getOwnPropertyDescriptor;let Yt=Object.freeze,Ut=Object.seal,Er=Object.create,Yh=typeof Reflect<"u"&&Reflect,ja=Yh.apply,Ga=Yh.construct;Yt||(Yt=function(t){return t});Ut||(Ut=function(t){return t});ja||(ja=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Ga||(Ga=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const ui=Ot(Array.prototype.forEach),cm=Ot(Array.prototype.lastIndexOf),nl=Ot(Array.prototype.pop),Lr=Ot(Array.prototype.push),dm=Ot(Array.prototype.splice),Ve=Array.isArray,Ti=Ot(String.prototype.toLowerCase),La=Ot(String.prototype.toString),ll=Ot(String.prototype.match),pi=Ot(String.prototype.replace),hl=Ot(String.prototype.indexOf),um=Ot(String.prototype.trim),pm=Ot(Number.prototype.toString),gm=Ot(Boolean.prototype.toString),cl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),dl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Rt=Ot(Object.prototype.hasOwnProperty),gi=Ot(Object.prototype.toString),Wt=Ot(RegExp.prototype.test),nr=fm(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return ja(e,t,i)}}function fm(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ga(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(ol&&ol(e,null),!Ve(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(nm(t)||(t[i]=a),s=a)}e[s]=!0}return e}function mm(e){for(let t=0;t<e.length;t++)Rt(e,t)||(e[t]=null);return e}function Qt(e){const t=Er(null);for(const i of Hh(e)){var r=am(i,2);const s=r[0],a=r[1];Rt(e,s)&&(Ve(a)?t[s]=mm(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Qt(a):t[s]=a)}return t}function ym(e){switch(typeof e){case"string":return e;case"number":return pm(e);case"boolean":return gm(e);case"bigint":return cl?cl(e):"0";case"symbol":return dl?dl(e):"Symbol()";case"undefined":return gi(e);case"function":case"object":{if(e===null)return gi(e);const t=e,r=_e(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:gi(i)}return gi(e)}default:return gi(e)}}function _e(e,t){for(;e!==null;){const i=hm(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=lm(e)}function r(){return null}return r}function Cm(e){try{return Wt(e,""),!0}catch{return!1}}const ul=Yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Fa=Yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Aa=Yt(["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"]),xm=Yt(["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"]),Ea=Yt(["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"]),bm=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pl=Yt(["#text"]),gl=Yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ma=Yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fl=Yt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),es=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),km=Ut(/{{[\w\W]*|^[\w\W]*}}/g),Tm=Ut(/<%[\w\W]*|^[\w\W]*%>/g),Sm=Ut(/\${[\w\W]*/g),wm=Ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bm=Ut(/^aria-[\-\w]+$/),ml=Ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_m=Ut(/^(?:\w+script|data):/i),vm=Ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lm=Ut(/^html$/i),Fm=Ut(/^[a-z][.\w]*(-[.\w]+)+$/i),yl=Ut(/<[/\w!]/g),Am=Ut(/<[/\w]/g),Em=Ut(/<\/no(script|embed|frames)/i),Mm=Ut(/\/>/i),Be={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Om=function(){return typeof window>"u"?null:window},$m=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Cl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ge=function(t,r,i,s){return Rt(t,r)&&Ve(t[r])?mt(s.base?Qt(s.base):{},t[r],s.transform):i};function Uh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Om();const t=j=>Uh(j);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==Be.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,p=n.prototype,u=_e(p,"cloneNode"),y=_e(p,"remove"),f=_e(p,"nextSibling"),m=_e(p,"childNodes"),C=_e(p,"parentNode"),b=_e(p,"shadowRoot"),k=_e(p,"attributes"),S=o&&o.prototype?_e(o.prototype,"nodeType"):null,B=o&&o.prototype?_e(o.prototype,"nodeName"):null;if(typeof a=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let _,M="",v,z=!1,D=0;const I=function(){if(D>0)throw nr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Y=function(T){I(),D++;try{return _.createHTML(T)}finally{D--}},H=function(T){I(),D++;try{return _.createScriptURL(T)}finally{D--}},P=function(){return z||(v=$m(d,s),z=!0),v},E=r,L=E.implementation,$=E.createNodeIterator,A=E.createDocumentFragment,w=E.getElementsByTagName,N=i.importNode;let V=Cl();t.isSupported=typeof Hh=="function"&&typeof C=="function"&&L&&L.createHTMLDocument!==void 0;const dt=km,ft=Tm,ut=Sm,Ct=wm,vt=Bm,Nt=_m,ae=vm,le=Fm;let et=ml,X=null;const St=mt({},[...ul,...Fa,...Aa,...Ea,...pl]);let lt=null;const Te=mt({},[...gl,...Ma,...fl,...es]);let kt=Object.seal(Er(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}})),Ye=null,ha=null;const he=Object.seal(Er(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Mn=!0,ca=!0,On=!1,$n=!0,Ue=!1,hi=!0,ar=!1,da=!1,ua=null,pa=null,ga=!1,Tr=!1,Xi=!1,Vi=!1,In=!0,Dn=!1;const Pn="user-content-";let fa=!0,ma=!1,Sr={},Se=null;const ya=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Rn=null;const qn=mt({},["audio","video","img","source","image","track"]);let Ca=null;const Nn=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zi="http://www.w3.org/1998/Math/MathML",Ki="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml";let wr=we,xa=!1,ba=null;const uf=mt({},[Zi,Ki,we],La),Wn=Yt(["mi","mo","mn","ms","mtext"]);let ka=mt({},Wn);const zn=Yt(["annotation-xml"]);let Ta=mt({},zn);const pf=mt({},["title","style","font","a","script"]);let ci=null;const gf=["application/xhtml+xml","text/html"],ff="text/html";let Lt=null,Br=null;const mf=r.createElement("form"),Hn=function(T){return T instanceof RegExp||T instanceof Function},Sa=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Br&&Br===T)return;(!T||typeof T!="object")&&(T={}),T=Qt(T),ci=gf.indexOf(T.PARSER_MEDIA_TYPE)===-1?ff:T.PARSER_MEDIA_TYPE,Lt=ci==="application/xhtml+xml"?La:Ti,X=Ge(T,"ALLOWED_TAGS",St,{transform:Lt}),lt=Ge(T,"ALLOWED_ATTR",Te,{transform:Lt}),ba=Ge(T,"ALLOWED_NAMESPACES",uf,{transform:La}),Ca=Ge(T,"ADD_URI_SAFE_ATTR",Nn,{transform:Lt,base:Nn}),Rn=Ge(T,"ADD_DATA_URI_TAGS",qn,{transform:Lt,base:qn}),Se=Ge(T,"FORBID_CONTENTS",ya,{transform:Lt}),Ye=Ge(T,"FORBID_TAGS",Qt({}),{transform:Lt}),ha=Ge(T,"FORBID_ATTR",Qt({}),{transform:Lt}),Sr=Rt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?Qt(T.USE_PROFILES):T.USE_PROFILES:!1,Mn=T.ALLOW_ARIA_ATTR!==!1,ca=T.ALLOW_DATA_ATTR!==!1,On=T.ALLOW_UNKNOWN_PROTOCOLS||!1,$n=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=T.SAFE_FOR_TEMPLATES||!1,hi=T.SAFE_FOR_XML!==!1,ar=T.WHOLE_DOCUMENT||!1,Tr=T.RETURN_DOM||!1,Xi=T.RETURN_DOM_FRAGMENT||!1,Vi=T.RETURN_TRUSTED_TYPE||!1,ga=T.FORCE_BODY||!1,In=T.SANITIZE_DOM!==!1,Dn=T.SANITIZE_NAMED_PROPS||!1,fa=T.KEEP_CONTENT!==!1,ma=T.IN_PLACE||!1,et=Cm(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:ml,wr=typeof T.NAMESPACE=="string"?T.NAMESPACE:we,ka=Rt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(T.MATHML_TEXT_INTEGRATION_POINTS):mt({},Wn),Ta=Rt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?Qt(T.HTML_INTEGRATION_POINTS):mt({},zn);const O=Rt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?Qt(T.CUSTOM_ELEMENT_HANDLING):Er(null);if(kt=Er(null),Rt(O,"tagNameCheck")&&Hn(O.tagNameCheck)&&(kt.tagNameCheck=O.tagNameCheck),Rt(O,"attributeNameCheck")&&Hn(O.attributeNameCheck)&&(kt.attributeNameCheck=O.attributeNameCheck),Rt(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(kt.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),Ut(kt),Ue&&(ca=!1),Xi&&(Tr=!0),Sr&&(X=mt({},pl),lt=Er(null),Sr.html===!0&&(mt(X,ul),mt(lt,gl)),Sr.svg===!0&&(mt(X,Fa),mt(lt,Ma),mt(lt,es)),Sr.svgFilters===!0&&(mt(X,Aa),mt(lt,Ma),mt(lt,es)),Sr.mathMl===!0&&(mt(X,Ea),mt(lt,fl),mt(lt,es))),he.tagCheck=null,he.attributeCheck=null,Rt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?he.tagCheck=T.ADD_TAGS:Ve(T.ADD_TAGS)&&(X===St&&(X=Qt(X)),mt(X,T.ADD_TAGS,Lt))),Rt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?he.attributeCheck=T.ADD_ATTR:Ve(T.ADD_ATTR)&&(lt===Te&&(lt=Qt(lt)),mt(lt,T.ADD_ATTR,Lt))),Rt(T,"ADD_URI_SAFE_ATTR")&&Ve(T.ADD_URI_SAFE_ATTR)&&mt(Ca,T.ADD_URI_SAFE_ATTR,Lt),Rt(T,"FORBID_CONTENTS")&&Ve(T.FORBID_CONTENTS)&&(Se===ya&&(Se=Qt(Se)),mt(Se,T.FORBID_CONTENTS,Lt)),Rt(T,"ADD_FORBID_CONTENTS")&&Ve(T.ADD_FORBID_CONTENTS)&&(Se===ya&&(Se=Qt(Se)),mt(Se,T.ADD_FORBID_CONTENTS,Lt)),fa&&(X["#text"]=!0),ar&&mt(X,["html","head","body"]),X.table&&(mt(X,["tbody"]),delete Ye.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=_;_=T.TRUSTED_TYPES_POLICY;try{M=Y("")}catch(tt){throw _=U,tt}}else T.TRUSTED_TYPES_POLICY===null?(_=void 0,M=""):(_===void 0&&(_=P()),_&&typeof M=="string"&&(M=Y("")));Yt&&Yt(T),Br=T},Yn=mt({},[...Fa,...Aa,...xm]),Un=mt({},[...Ea,...bm]),yf=function(T,O,U){return O.namespaceURI===we?T==="svg":O.namespaceURI===Zi?T==="svg"&&(U==="annotation-xml"||ka[U]):!!Yn[T]},Cf=function(T,O,U){return O.namespaceURI===we?T==="math":O.namespaceURI===Ki?T==="math"&&Ta[U]:!!Un[T]},xf=function(T,O,U){return O.namespaceURI===Ki&&!Ta[U]||O.namespaceURI===Zi&&!ka[U]?!1:!Un[T]&&(pf[T]||!Yn[T])},bf=function(T){let O=C(T);(!O||!O.tagName)&&(O={namespaceURI:wr,tagName:"template"});const U=Ti(T.tagName),tt=Ti(O.tagName);return ba[T.namespaceURI]?T.namespaceURI===Ki?yf(U,O,tt):T.namespaceURI===Zi?Cf(U,O,tt):T.namespaceURI===we?xf(U,O,tt):!!(ci==="application/xhtml+xml"&&ba[T.namespaceURI]):!1},je=function(T){Lr(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(y(T),!C(T))throw nr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},jn=function(T){const O=m(T);if(O){const tt=[];ui(O,ct=>{Lr(tt,ct)}),ui(tt,ct=>{try{y(ct)}catch{}})}const U=k(T);if(U)for(let tt=U.length-1;tt>=0;--tt){const ct=U[tt],yt=ct&&ct.name;if(typeof yt=="string")try{T.removeAttribute(yt)}catch{}}},or=function(T,O){try{Lr(t.removed,{attribute:O.getAttributeNode(T),from:O})}catch{Lr(t.removed,{attribute:null,from:O})}if(O.removeAttribute(T),T==="is")if(Tr||Xi)try{je(O)}catch{}else try{O.setAttribute(T,"")}catch{}},kf=function(T){const O=k(T);if(O)for(let U=O.length-1;U>=0;--U){const tt=O[U],ct=tt&&tt.name;if(!(typeof ct!="string"||lt[Lt(ct)]))try{T.removeAttribute(ct)}catch{}}},Tf=function(T){const O=[T];for(;O.length>0;){const U=O.pop();(S?S(U):U.nodeType)===Be.element&&kf(U);const ct=m(U);if(ct)for(let yt=ct.length-1;yt>=0;--yt)O.push(ct[yt])}},Gn=function(T){let O=null,U=null;if(ga)T="<remove></remove>"+T;else{const yt=ll(T,/^[\r\n\t ]+/);U=yt&&yt[0]}ci==="application/xhtml+xml"&&wr===we&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const tt=_?Y(T):T;if(wr===we)try{O=new c().parseFromString(tt,ci)}catch{}if(!O||!O.documentElement){O=L.createDocument(wr,"template",null);try{O.documentElement.innerHTML=xa?M:tt}catch{}}const ct=O.body||O.documentElement;return T&&U&&ct.insertBefore(r.createTextNode(U),ct.childNodes[0]||null),wr===we?w.call(O,ar?"html":"body")[0]:ar?O.documentElement:ct},Xn=function(T){return $.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Qi=function(T){return T=pi(T,dt," "),T=pi(T,ft," "),T=pi(T,ut," "),T},wa=function(T){var O;T.normalize();const U=$.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let tt=U.nextNode();for(;tt;)tt.data=Qi(tt.data),tt=U.nextNode();const ct=(O=T.querySelectorAll)===null||O===void 0?void 0:O.call(T,"template");ct&&ui(ct,yt=>{_r(yt.content)&&wa(yt.content)})},Ji=function(T){const O=B?B(T):null;return typeof O!="string"||Lt(O)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==S(T)||T.childNodes!==m(T)},_r=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return S(T)===Be.documentFragment}catch{return!1}},di=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return typeof S(T)=="number"}catch{return!1}};function $e(j,T,O){j.length!==0&&ui(j,U=>{U.call(t,T,O,Br)})}const Sf=function(T,O){return!!(hi&&T.hasChildNodes()&&!di(T.firstElementChild)&&Wt(yl,T.textContent)&&Wt(yl,T.innerHTML)||hi&&T.namespaceURI===we&&O==="style"&&di(T.firstElementChild)||T.nodeType===Be.processingInstruction||hi&&T.nodeType===Be.comment&&Wt(Am,T.data))},wf=function(T,O){if(!Ye[O]&&Kn(O)&&(kt.tagNameCheck instanceof RegExp&&Wt(kt.tagNameCheck,O)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(O)))return!1;if(fa&&!Se[O]){const U=C(T),tt=m(T);if(tt&&U){const ct=tt.length;for(let yt=ct-1;yt>=0;--yt){const Pt=ma?tt[yt]:u(tt[yt],!0);U.insertBefore(Pt,f(T))}}}return je(T),!0},Vn=function(T){if($e(V.beforeSanitizeElements,T,null),Ji(T))return je(T),!0;const O=Lt(B?B(T):T.nodeName);if($e(V.uponSanitizeElement,T,{tagName:O,allowedTags:X}),Sf(T,O))return je(T),!0;if(Ye[O]||!(he.tagCheck instanceof Function&&he.tagCheck(O))&&!X[O])return wf(T,O);if((S?S(T):T.nodeType)===Be.element&&!bf(T)||(O==="noscript"||O==="noembed"||O==="noframes")&&Wt(Em,T.innerHTML))return je(T),!0;if(Ue&&T.nodeType===Be.text){const tt=Qi(T.textContent);T.textContent!==tt&&(Lr(t.removed,{element:T.cloneNode()}),T.textContent=tt)}return $e(V.afterSanitizeElements,T,null),!1},Zn=function(T,O,U){if(ha[O]||In&&(O==="id"||O==="name")&&(U in r||U in mf))return!1;const tt=lt[O]||he.attributeCheck instanceof Function&&he.attributeCheck(O,T);if(!(ca&&Wt(Ct,O))){if(!(Mn&&Wt(vt,O))){if(tt){if(!Ca[O]){if(!Wt(et,pi(U,ae,""))){if(!((O==="src"||O==="xlink:href"||O==="href")&&T!=="script"&&hl(U,"data:")===0&&Rn[T])){if(!(On&&!Wt(Nt,pi(U,ae,"")))){if(U)return!1}}}}}else if(!(Kn(T)&&(kt.tagNameCheck instanceof RegExp&&Wt(kt.tagNameCheck,T)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(T))&&(kt.attributeNameCheck instanceof RegExp&&Wt(kt.attributeNameCheck,O)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(O,T))||O==="is"&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&Wt(kt.tagNameCheck,U)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(U))))return!1}}return!0},Bf=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Kn=function(T){return!Bf[Ti(T)]&&Wt(le,T)},_f=function(T,O,U,tt){if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!U)switch(d.getAttributeType(T,O)){case"TrustedHTML":return Y(tt);case"TrustedScriptURL":return H(tt)}return tt},vf=function(T,O,U,tt){try{U?T.setAttributeNS(U,O,tt):T.setAttribute(O,tt),Ji(T)?je(T):nl(t.removed)}catch{or(O,T)}},Qn=function(T){$e(V.beforeSanitizeAttributes,T,null);const O=T.attributes;if(!O||Ji(T))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lt,forceKeepAttr:void 0};let tt=O.length;const ct=Lt(T.nodeName);for(;tt--;){const yt=O[tt],Pt=yt.name,Et=yt.namespaceURI,ce=yt.value,pe=Lt(Pt),_a=ce;let Zt=Pt==="value"?_a:um(_a);if(U.attrName=pe,U.attrValue=Zt,U.keepAttr=!0,U.forceKeepAttr=void 0,$e(V.uponSanitizeAttribute,T,U),Zt=U.attrValue,Dn&&(pe==="id"||pe==="name")&&hl(Zt,Pn)!==0&&(or(Pt,T),Zt=Pn+Zt),hi&&Wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){or(Pt,T);continue}if(pe==="attributename"&&ll(Zt,"href")){or(Pt,T);continue}if(!U.forceKeepAttr){if(!U.keepAttr){or(Pt,T);continue}if(!$n&&Wt(Mm,Zt)){or(Pt,T);continue}if(Ue&&(Zt=Qi(Zt)),!Zn(ct,pe,Zt)){or(Pt,T);continue}Zt=_f(ct,pe,Et,Zt),Zt!==_a&&vf(T,Pt,Et,Zt)}}$e(V.afterSanitizeAttributes,T,null)},ts=function(T){let O=null;const U=Xn(T);for($e(V.beforeSanitizeShadowDOM,T,null);O=U.nextNode();)if($e(V.uponSanitizeShadowNode,O,null),Vn(O),Qn(O),_r(O.content)&&ts(O.content),(S?S(O):O.nodeType)===Be.element){const ct=b(O);_r(ct)&&(Ba(ct),ts(ct))}$e(V.afterSanitizeShadowDOM,T,null)},Ba=function(T){const O=[{node:T,shadow:null}];for(;O.length>0;){const U=O.pop();if(U.shadow){ts(U.shadow);continue}const tt=U.node,yt=(S?S(tt):tt.nodeType)===Be.element,Pt=m(tt);if(Pt)for(let Et=Pt.length-1;Et>=0;--Et)O.push({node:Pt[Et],shadow:null});if(yt){const Et=B?B(tt):null;if(typeof Et=="string"&&Lt(Et)==="template"){const ce=tt.content;_r(ce)&&O.push({node:ce,shadow:null})}}if(yt){const Et=b(tt);_r(Et)&&O.push({node:null,shadow:Et},{node:Et,shadow:null})}}};return t.sanitize=function(j){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,U=null,tt=null,ct=null;if(xa=!j,xa&&(j="<!-->"),typeof j!="string"&&!di(j)&&(j=ym(j),typeof j!="string"))throw nr("dirty is not a string, aborting");if(!t.isSupported)return j;da?(X=ua,lt=pa):Sa(T),(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&(X=Qt(X)),V.uponSanitizeAttribute.length>0&&(lt=Qt(lt)),t.removed=[];const yt=ma&&typeof j!="string"&&di(j);if(yt){const ce=B?B(j):j.nodeName;if(typeof ce=="string"){const pe=Lt(ce);if(!X[pe]||Ye[pe])throw nr("root node is forbidden and cannot be sanitized in-place")}if(Ji(j))throw nr("root node is clobbered and cannot be sanitized in-place");try{Ba(j)}catch(pe){throw jn(j),pe}}else if(di(j))O=Gn("<!---->"),U=O.ownerDocument.importNode(j,!0),U.nodeType===Be.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?O=U:O.appendChild(U),Ba(U);else{if(!Tr&&!Ue&&!ar&&j.indexOf("<")===-1)return _&&Vi?Y(j):j;if(O=Gn(j),!O)return Tr?null:Vi?M:""}O&&ga&&je(O.firstChild);const Pt=Xn(yt?j:O);try{for(;tt=Pt.nextNode();)Vn(tt),Qn(tt),_r(tt.content)&&ts(tt.content)}catch(ce){throw yt&&jn(j),ce}if(yt)return ui(t.removed,ce=>{ce.element&&Tf(ce.element)}),Ue&&wa(j),j;if(Tr){if(Ue&&wa(O),Xi)for(ct=A.call(O.ownerDocument);O.firstChild;)ct.appendChild(O.firstChild);else ct=O;return(lt.shadowroot||lt.shadowrootmode)&&(ct=N.call(i,ct,!0)),ct}let Et=ar?O.outerHTML:O.innerHTML;return ar&&X["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&Wt(Lm,O.ownerDocument.doctype.name)&&(Et="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
|
|
4
|
-
`+Et),Ue&&(Et=Qi(Et)),_&&Vi?Y(Et):Et},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sa(j),da=!0,ua=X,pa=lt},t.clearConfig=function(){Br=null,da=!1,ua=null,pa=null,_=v,M=""},t.isValidAttribute=function(j,T,O){Br||Sa({});const U=Lt(j),tt=Lt(T);return Zn(U,tt,O)},t.addHook=function(j,T){typeof T=="function"&&Rt(V,j)&&Lr(V[j],T)},t.removeHook=function(j,T){if(Rt(V,j)){if(T!==void 0){const O=cm(V[j],T);return O===-1?void 0:dm(V[j],O,1)[0]}return nl(V[j])}},t.removeHooks=function(j){Rt(V,j)&&(V[j]=[])},t.removeAllHooks=function(){V=Cl()},t}var Jr=Uh(),jh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Fi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Im=/\s*%%.*\n/gm,qr,Gh=(qr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(qr,"UnknownDiagramError"),qr),fr={},zo=g(function(e,t){e=e.replace(jh,"").replace(Fi,"").replace(Im,`
|
|
5
|
-
`);for(const[r,{detector:i}]of Object.entries(fr))if(i(e,t))return r;throw new Gh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Xa=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Xh(t,r,i)},"registerLazyLoadedDiagrams"),Xh=g((e,t,r)=>{fr[e]&&W.warn(`Detector with key ${e} already exists. Overwriting.`),fr[e]={detector:t,loader:r},W.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Dm=g(e=>fr[e].loader,"getDiagramLoader"),Va=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Va(e,a,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Va(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),It=Va,Me="#ffffff",Oe="#f2f2f2",ot=g((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),Nr,Pm=(Nr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,B,_,M,v,z,D,I,Y,H,P,E,L,$,A,w;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=q(this["cScale"+N],75);else for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=q(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||F(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||R(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||q(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(5+N*3)}),this["surfacePeer"+N]=this["surfacePeer"+N]||x(this.mainBkg,{h:180,s:-15,l:t*(8+N*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((u=this.wardley)==null?void 0:u.axisColor)||this.lineColor,axisTextColor:((y=this.wardley)==null?void 0:y.axisTextColor)||this.primaryTextColor,gridColor:((f=this.wardley)==null?void 0:f.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((S=this.wardley)==null?void 0:S.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((B=this.wardley)==null?void 0:B.annotationStroke)||this.lineColor,annotationTextColor:((_=this.wardley)==null?void 0:_.annotationTextColor)||this.primaryTextColor,annotationFill:((M=this.wardley)==null?void 0:M.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((v=this.xyChart)==null?void 0:v.backgroundColor)||this.background,titleColor:((z=this.xyChart)==null?void 0:z.titleColor)||this.primaryTextColor,dataLabelColor:((D=this.xyChart)==null?void 0:D.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((I=this.xyChart)==null?void 0:I.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((P=this.xyChart)==null?void 0:P.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:(($=this.xyChart)==null?void 0:$.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((A=this.xyChart)==null?void 0:A.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((w=this.xyChart)==null?void 0:w.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?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Nr,"Theme"),Nr),Rm=g(e=>{const t=new Pm;return t.calculate(e),t},"getThemeVariables"),Wr,qm=(Wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=q("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=q(this.sectionBkgColor,10),this.taskBorderColor=Qe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Qe(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,B,_,M,v,z,D,I,Y,H,P,E,L,$,A;this.secondBkg=R(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=R(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=R(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=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||F(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],10);for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{h:30,s:-30,l:-(-10+w*4)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{h:30,s:-30,l:-(-7+w*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["pie"+w]=this["cScale"+w];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let w=0;w<8;w++)this["venn"+(w+1)]=this["venn"+(w+1)]??R(this["cScale"+w],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.mainBkg,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:(($=this.wardley)==null?void 0:$.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=R(this.secondaryColor,20),this.git1=R(this.pie2||this.secondaryColor,20),this.git2=R(this.pie3||this.tertiaryColor,20),this.git3=R(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=R(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=R(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=R(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=R(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||R("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||R("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||R("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||R("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||R(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||R(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||R(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||R(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Wr,"Theme"),Wr),Nm=g(e=>{const t=new qm;return t.calculate(e),t},"getThemeVariables"),zr,Wm=(zr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Qe(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,B,_,M,v,z,D,I,Y,H,P,E,L,$,A;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=q(this["cScale"+w],10),this["cScalePeer"+w]=this["cScalePeer"+w]||q(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||x(this["cScale"+w],{h:180});for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{h:30,l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{h:30,l:-(7+w*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||R(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||R(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((_=this.wardley)==null?void 0:_.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((z=this.xyChart)==null?void 0:z.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||q(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(zr,"Theme"),zr),zm=g(e=>{const t=new Wm;return t.calculate(e),t},"getThemeVariables"),Hr,Hm=(Hr=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=R("#cde498",10),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,B,_,M,v,z,D,I,Y,H,P,E,L,$,A;this.actorBorder=q(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=q(this["cScale"+w],10),this["cScalePeer"+w]=this["cScalePeer"+w]||q(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||x(this["cScale"+w],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{h:30,s:-30,l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{h:30,s:-30,l:-(8+w*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((d=this.wardley)==null?void 0:d.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((u=this.wardley)==null?void 0:u.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((f=this.wardley)==null?void 0:f.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((B=this.wardley)==null?void 0:B.annotationTextColor)||this.primaryTextColor,annotationFill:((_=this.wardley)==null?void 0:_.annotationFill)||this.background},this.xyChart={backgroundColor:((M=this.xyChart)==null?void 0:M.backgroundColor)||this.background,titleColor:((v=this.xyChart)==null?void 0:v.titleColor)||this.primaryTextColor,dataLabelColor:((z=this.xyChart)==null?void 0:z.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((D=this.xyChart)==null?void 0:D.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((I=this.xyChart)==null?void 0:I.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Y=this.xyChart)==null?void 0:Y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((H=this.xyChart)==null?void 0:H.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((P=this.xyChart)==null?void 0:P.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((E=this.xyChart)==null?void 0:E.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((A=this.xyChart)==null?void 0:A.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Hr,"Theme"),Hr),Ym=g(e=>{const t=new Hm;return t.calculate(e),t},"getThemeVariables"),Yr,Um=(Yr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,h,c,d,p,u,y,f,m,C,b,k,S,B,_,M,v,z,D,I,Y,H,P,E,L,$,A;this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(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 w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||F(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||R(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||q(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||x(this.mainBkg,{l:-(5+w*5)}),this["surfacePeer"+w]=this["surfacePeer"+w]||x(this.mainBkg,{l:-(8+w*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=R(this.contrast,30),this.sectionBkgColor2=R(this.contrast,30),this.taskBorderColor=q(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=R(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=q(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["pie"+w]=this["cScale"+w];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let w=0;w<8;w++)this["venn"+(w+1)]=this["venn"+(w+1)]??this["cScale"+w];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((u=this.radar)==null?void 0:u.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((M=this.wardley)==null?void 0:M.backgroundColor)||this.background,axisColor:((v=this.wardley)==null?void 0:v.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((D=this.wardley)==null?void 0:D.gridColor)||this.gridColor,componentFill:((I=this.wardley)==null?void 0:I.componentFill)||this.background,componentStroke:((Y=this.wardley)==null?void 0:Y.componentStroke)||this.lineColor,componentLabelColor:((H=this.wardley)==null?void 0:H.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((E=this.wardley)==null?void 0:E.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((L=this.wardley)==null?void 0:L.annotationStroke)||this.lineColor,annotationTextColor:(($=this.wardley)==null?void 0:$.annotationTextColor)||this.primaryTextColor,annotationFill:((A=this.wardley)==null?void 0:A.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Yr,"Theme"),Yr),jm=g(e=>{const t=new Um;return t.calculate(e),t},"getThemeVariables"),Ur,Gm=(Ur=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,h,c,d,p,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||F(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Ur,"Theme"),Ur),Xm=g(e=>{const t=new Gm;return t.calculate(e),t},"getThemeVariables"),jr,Vm=(jr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,h,c,d,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||F(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(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||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(jr,"Theme"),jr),Zm=g(e=>{const t=new Vm;return t.calculate(e),t},"getThemeVariables"),Gr,Km=(Gr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,d,p,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=q(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||F(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Gr,"Theme"),Gr),Qm=g(e=>{const t=new Km;return t.calculate(e),t},"getThemeVariables"),Xr,Jm=(Xr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,d,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(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||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],75);else for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScale"+u]=q(this["cScale"+u],25);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||F(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=this["cScaleLabel"+u]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Xr,"Theme"),Xr),ty=g(e=>{const t=new Jm;return t.calculate(e),t},"getThemeVariables"),Vr,ey=(Vr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,h,c,d,p,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(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?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||R(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||F(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||R(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||q(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Vr,"Theme"),Vr),ry=g(e=>{const t=new ey;return t.calculate(e),t},"getThemeVariables"),Zr,iy=(Zr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(F("#323D47"),10),this.border1="#ccc",this.border2=Qe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,h,c,d,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleInv"+u]=this["cScaleInv"+u]||F(this["cScale"+u]);for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this.darkMode?this["cScalePeer"+u]=this["cScalePeer"+u]||R(this["cScale"+u],10):this["cScalePeer"+u]=this["cScalePeer"+u]||q(this["cScale"+u],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let u=0;u<this.THEME_COLOR_LIMIT;u++)this["cScaleLabel"+u]=q(this["cScale"+u],75);const t=this.darkMode?-4:-1;for(let u=0;u<5;u++)this["surface"+u]=this["surface"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(5+u*3)}),this["surfacePeer"+u]=this["surfacePeer"+u]||x(this.mainBkg,{h:180,s:-15,l:t*(8+u*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?R(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Me,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Zr,"Theme"),Zr),sy=g(e=>{const t=new iy;return t.calculate(e),t},"getThemeVariables"),Re={base:{getThemeVariables:Rm},dark:{getThemeVariables:Nm},default:{getThemeVariables:zm},forest:{getThemeVariables:Ym},neutral:{getThemeVariables:jm},neo:{getThemeVariables:Xm},"neo-dark":{getThemeVariables:Zm},redux:{getThemeVariables:Qm},"redux-dark":{getThemeVariables:ty},"redux-color":{getThemeVariables:ry},"redux-dark-color":{getThemeVariables:sy}},Kt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},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},Vh={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Re.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},ishikawa:{...Kt.ishikawa},sankey:{...Kt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Kt.venn}},Zh=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Zh(e[i],"")]:[...r,t+i],[]),"keyify"),ay=new Set(Zh(Vh,"")),Kh=Vh,Bs=g(e=>{if(W.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Bs(t));return}for(const t of Object.keys(e)){if(W.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!ay.has(t)||e[t]==null){W.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(W.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else W.debug("sanitizing object",t),Bs(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(W.debug("sanitizing css option",t),e[t]=Qh(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}W.debug("After sanitization",e)}},"sanitizeDirective"),Qh=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ti=Object.freeze(Kh),We=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=It({},ti),_s,mr=[],Ai=It({},ti),Zs=g((e,t)=>{let r=It({},e),i={};for(const s of t)ec(s),i=It(i,s);if(r=It(r,i),i.theme&&i.theme in Re){const s=It({},_s),a=It(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Re&&(r.themeVariables=Re[r.theme].getThemeVariables(a))}return Ai=r,ic(Ai),Ai},"updateCurrentConfig"),oy=g(e=>(ie=It({},ti),ie=It(ie,e),e.theme&&Re[e.theme]&&(ie.themeVariables=Re[e.theme].getThemeVariables(e.themeVariables)),Zs(ie,mr),ie),"setSiteConfig"),ny=g(e=>{_s=It({},e)},"saveConfigFromInitialize"),ly=g(e=>(ie=It(ie,e),Zs(ie,mr),ie),"updateSiteConfig"),Jh=g(()=>It({},ie),"getSiteConfig"),tc=g(e=>(ic(e),It(Ai,e),_t()),"setConfig"),_t=g(()=>It({},Ai),"getConfig"),ec=g(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&ec(e[t])}))},"sanitize"),hy=g(e=>{var t;Bs(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),mr.push(e),Zs(ie,mr)},"addDirective"),vs=g((e=ie)=>{mr=[],Zs(e,mr)},"reset"),cy={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},xl={},rc=g(e=>{xl[e]||(W.warn(cy[e]),xl[e]=!0)},"issueWarning"),ic=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&rc("LAZY_LOAD_DEPRECATED")},"checkConfig"),ZT=g(()=>{let e={};_s&&(e=It(e,_s));for(const t of mr)e=It(e,t);return e},"getUserDefinedConfig"),ee=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&rc("FLOWCHART_HTML_LABELS_DEPRECATED"),We(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Wi=/<br\s*\/?>/gi,dy=g(e=>e?oc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),uy=(()=>{let e=!1;return()=>{e||(sc(),e=!0)}})();function sc(){const e="data-temp-href-target";Jr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Jr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(sc,"setupDompurifyHooks");var ac=g(e=>(uy(),Jr.sanitize(e)),"removeScript"),bl=g((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=ac(e):r!=="loose"&&(e=oc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=my(e))}return e},"sanitizeMore"),be=g((e,t)=>e&&(t.dompurifyConfig?e=Jr.sanitize(bl(e,t),t.dompurifyConfig).toString():e=Jr.sanitize(bl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),py=g((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),gy=g(e=>Wi.test(e),"hasBreaks"),fy=g(e=>e.split(Wi),"splitBreaks"),my=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),oc=g(e=>e.replace(Wi,"#br#"),"breakToPlaceholder"),yy=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Cy=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),xy=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),kl=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];by(a,o)&&(s=a+","+o,i++,r.pop())}r.push(ky(s))}return r.join("")},"parseGenericTypes"),Za=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),by=g((e,t)=>{const r=Za(e,"~"),i=Za(t,"~");return r===1&&i===1},"shouldCombineSets"),ky=g(e=>{const t=Za(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Tl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ka=/\$\$(.*)\$\$/g,Oi=g(e=>{var t;return(((t=e.match(Ka))==null?void 0:t.length)??0)>0},"hasKatex"),KT=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await nc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Ty=g(async(e,t)=>{if(!Oi(e))return e;if(!(Tl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ka,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:s}=await import("./explorer-katex.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!Tl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Wi).map(s=>Oi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Ka,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),nc=g(async(e,t)=>be(await Ty(e,t),t),"renderKatexSanitized"),zi={getRows:dy,sanitizeText:be,sanitizeTextOrArray:py,hasBreaks:gy,splitBreaks:fy,lineBreakRegex:Wi,removeScript:ac,getUrl:yy,evaluate:We,getMax:Cy,getMin:xy},Sy=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),wy=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),lc=g(function(e,t,r,i){const s=wy(t,r,i);Sy(e,s)},"configureSvgSize"),By=g(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;W.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;W.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,W.info(`Calculated bounds: ${n}x${l}`),lc(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),ps={};function Qa(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
6
|
-
`)}
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./explorer-sizeCapture-INFHLROL.js","./explorer.js","./explorer.css","./explorer-dagre-GXQ25YYZ.js","./explorer-layout.js","./explorer-swimlanes-42K2YHIH.js","./explorer-cose-bilkent-JH36ORCC.js","./explorer-cytoscape.esm.js","./explorer-c4Diagram-7LVT6UL2.js","./explorer-chunk-F27PBJKO.js","./explorer-flowDiagram-HODETNUW.js","./explorer-chunk-5VM5RSS4.js","./explorer-chunk-XXDRQBXY.js","./explorer-chunk-POPQ4Y6H.js","./explorer-channel.js","./explorer-swimlanesDiagram-VR7AAH4N.js","./explorer-erDiagram-RLTQ6QDP.js","./explorer-gitGraphDiagram-WWUBYQGX.js","./explorer-chunk-2Q5K7J3B.js","./explorer-chunk-JWPE2WC7.js","./explorer-cynefin-OW5HDTMX.js","./explorer-ganttDiagram-EL5Y4UJY.js","./explorer-linear.js","./explorer-defaultLocale.js","./explorer-infoDiagram-27XIBGKW.js","./explorer-pieDiagram-E7YTZNPT.js","./explorer-quadrantDiagram-AXDQQJYC.js","./explorer-xychartDiagram-S5SC5T6Z.js","./explorer-requirementDiagram-BXWQKSXE.js","./explorer-sequenceDiagram-WJ2MYXX4.js","./explorer-classDiagram-ZZMXUADV.js","./explorer-chunk-TICWLB2K.js","./explorer-classDiagram-v2-VYDZK3BY.js","./explorer-stateDiagram-D77RDMKH.js","./explorer-chunk-IMKFNOWR.js","./explorer-stateDiagram-v2-MP3YSRHH.js","./explorer-journeyDiagram-3NMN7TZE.js","./explorer-timeline-definition-24CTP7MA.js","./explorer-mindmap-definition-YA3MSWOX.js","./explorer-kanban-definition-UXKFOSKX.js","./explorer-sankeyDiagram-P5KCCOFB.js","./explorer-diagram-Z3DM3KII.js","./explorer-diagram-UQ7AKVKN.js","./explorer-blockDiagram-I7D4REHJ.js","./explorer-diagram-S7CK7UJ4.js","./explorer-architectureDiagram-5GKGNRK7.js","./explorer-diagram-VSXAHHWV.js","./explorer-ishikawaDiagram-5VMMS53U.js","./explorer-vennDiagram-4TSXK5OY.js","./explorer-diagram-VX7I27RA.js","./explorer-wardleyDiagram-VM6X3IG4.js","./explorer-cynefinDiagram-5FMLGOSQ.js","./explorer-railroadDiagram-O6MQD6OU.js","./explorer-chunk-SVP7TREG.js","./explorer-ebnfDiagram-PWID7BFC.js","./explorer-abnfDiagram-VCTEODGH.js","./explorer-pegDiagram-XKGWAZYB.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var _y=Object.defineProperty;var By=(e,t,r)=>t in e?_y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zt=(e,t,r)=>By(e,typeof t!="symbol"?t+"":t,r);import{w as vy,a as Ly,c as oi,x as Fy,y as Ey,q as xh,g as In,_ as It,s as Pt,u as Uu,v as Gu}from"./explorer.js";function Xu(e){this._context=e}Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ds(e){return new Xu(e)}function Ay(e,t){var r=oi(!0),i=null,s=ds,a=null,o=vy(n);e=typeof e=="function"?e:e===void 0?Fy:oi(e),t=typeof t=="function"?t:t===void 0?Ey:oi(t);function n(l){var c,h=(l=Ly(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:oi(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:oi(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:oi(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}function Mr(){}function ha(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ea(e){this._context=e}Ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ha(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ha(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function en(e){return new Ea(e)}function Vu(e){this._context=e}Vu.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ha(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function My(e){return new Vu(e)}function Zu(e){this._context=e}Zu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ha(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Oy(e){return new Zu(e)}function Ku(e,t){this._basis=new Ea(e),this._beta=t}Ku.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const $y=(function e(t){function r(i){return t===1?new Ea(i):new Ku(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ca(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Rn(e,t){this._context=e,this._k=(1-t)/6}Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ca(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Qu=(function e(t){function r(i){return new Rn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qn(e,t){this._context=e,this._k=(1-t)/6}qn.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Dy=(function e(t){function r(i){return new qn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Py=(function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function zn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>xh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>xh){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Ju(e,t){this._context=e,this._alpha=t}Ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:zn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const td=(function e(t){function r(i){return t?new Ju(i,t):new Rn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ed(e,t){this._context=e,this._alpha=t}ed.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Iy=(function e(t){function r(i){return t?new ed(i,t):new qn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rd(e,t){this._context=e,this._alpha=t}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ry=(function e(t){function r(i){return t?new rd(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function id(e){this._context=e}id.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function qy(e){return new id(e)}function bh(e){return e<0?-1:1}function kh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(bh(a)+bh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Th(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function oo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function ua(e){this._context=e}ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:oo(this,this._t0,Th(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,oo(this,Th(this,r=kh(this,e,t)),r);break;default:oo(this,this._t0,r=kh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sd(e){this._context=new ad(e)}(sd.prototype=Object.create(ua.prototype)).point=function(e,t){ua.prototype.point.call(this,t,e)};function ad(e){this._context=e}ad.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function od(e){return new ua(e)}function nd(e){return new sd(e)}function ld(e){this._context=e}ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Sh(e),s=Sh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Sh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function hd(e){return new ld(e)}function Aa(e,t){this._context=e,this._t=t}Aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function cd(e){return new Aa(e,.5)}function ud(e){return new Aa(e,0)}function dd(e){return new Aa(e,1)}var pd=Object.defineProperty,f=(e,t)=>pd(e,"name",{value:t,configurable:!0}),Ny=(e,t)=>{for(var r in t)pd(e,r,{get:t[r],enumerable:!0})},Js={exports:{}},zy=Js.exports,wh;function Wy(){return wh||(wh=1,(function(e,t){(function(r,i){e.exports=i()})(zy,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",p="quarter",d="year",m="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var O=["th","st","nd","rd"],v=A%100;return"["+A+(O[(v-20)%10]||O[v]||O[0])+"]"}},S=function(A,O,v){var R=String(A);return!R||R.length>=O?A:""+Array(O+1-R.length).join(v)+A},w={s:S,z:function(A){var O=-A.utcOffset(),v=Math.abs(O),R=Math.floor(v/60),P=v%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S(P,2,"0")},m:function A(O,v){if(O.date()<v.date())return-A(v,O);var R=12*(v.year()-O.year())+(v.month()-O.month()),P=O.clone().add(R,u),H=v-P<0,Z=O.clone().add(R+(H?-1:1),u);return+(-(R+(v-P)/(H?P-Z:Z-P))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:d,w:h,d:c,D:m,h:l,m:n,s:o,ms:a,Q:p}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},B="en",L={};L[B]=k;var E="$isDayjsObject",F=function(A){return A instanceof at||!(!A||!A[E])},X=function A(O,v,R){var P;if(!O)return B;if(typeof O=="string"){var H=O.toLowerCase();L[H]&&(P=H),v&&(L[H]=v,P=H);var Z=O.split("-");if(!P&&Z.length>1)return A(Z[0])}else{var ut=O.name;L[ut]=O,P=ut}return!R&&P&&(B=P),P||!R&&B},N=function(A,O){if(F(A))return A.clone();var v=typeof O=="object"?O:{};return v.date=A,v.args=arguments,new at(v)},z=w;z.l=X,z.i=F,z.w=function(A,O){return N(A,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var at=(function(){function A(v){this.$L=X(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[E]=!0}var O=A.prototype;return O.parse=function(v){this.$d=(function(R){var P=R.date,H=R.utc;if(P===null)return new Date(NaN);if(z.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var Z=P.match(x);if(Z){var ut=Z[2]-1||0,pt=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,pt)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,pt)}}return new Date(P)})(v),this.init()},O.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},O.$utils=function(){return z},O.isValid=function(){return this.$d.toString()!==y},O.isSame=function(v,R){var P=N(v);return this.startOf(R)<=P&&P<=this.endOf(R)},O.isAfter=function(v,R){return N(v)<this.startOf(R)},O.isBefore=function(v,R){return this.endOf(R)<N(v)},O.$g=function(v,R,P){return z.u(v)?this[R]:this.set(P,v)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(v,R){var P=this,H=!!z.u(R)||R,Z=z.p(v),ut=function(vt,lt){var gt=z.w(P.$u?Date.UTC(P.$y,lt,vt):new Date(P.$y,lt,vt),P);return H?gt:gt.endOf(c)},pt=function(vt,lt){return z.w(P.toDate()[vt].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(lt)),P)},bt=this.$W,Tt=this.$M,nt=this.$D,At="set"+(this.$u?"UTC":"");switch(Z){case d:return H?ut(1,0):ut(31,11);case u:return H?ut(1,Tt):ut(0,Tt+1);case h:var Lt=this.$locale().weekStart||0,qt=(bt<Lt?bt+7:bt)-Lt;return ut(H?nt-qt:nt+(6-qt),Tt);case c:case m:return pt(At+"Hours",0);case l:return pt(At+"Minutes",1);case n:return pt(At+"Seconds",2);case o:return pt(At+"Milliseconds",3);default:return this.clone()}},O.endOf=function(v){return this.startOf(v,!1)},O.$set=function(v,R){var P,H=z.p(v),Z="set"+(this.$u?"UTC":""),ut=(P={},P[c]=Z+"Date",P[m]=Z+"Date",P[u]=Z+"Month",P[d]=Z+"FullYear",P[l]=Z+"Hours",P[n]=Z+"Minutes",P[o]=Z+"Seconds",P[a]=Z+"Milliseconds",P)[H],pt=H===c?this.$D+(R-this.$W):R;if(H===u||H===d){var bt=this.clone().set(m,1);bt.$d[ut](pt),bt.init(),this.$d=bt.set(m,Math.min(this.$D,bt.daysInMonth())).$d}else ut&&this.$d[ut](pt);return this.init(),this},O.set=function(v,R){return this.clone().$set(v,R)},O.get=function(v){return this[z.p(v)]()},O.add=function(v,R){var P,H=this;v=Number(v);var Z=z.p(R),ut=function(Tt){var nt=N(H);return z.w(nt.date(nt.date()+Math.round(Tt*v)),H)};if(Z===u)return this.set(u,this.$M+v);if(Z===d)return this.set(d,this.$y+v);if(Z===c)return ut(1);if(Z===h)return ut(7);var pt=(P={},P[n]=i,P[l]=s,P[o]=r,P)[Z]||1,bt=this.$d.getTime()+v*pt;return z.w(bt,this)},O.subtract=function(v,R){return this.add(-1*v,R)},O.format=function(v){var R=this,P=this.$locale();if(!this.isValid())return P.invalidDate||y;var H=v||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),ut=this.$H,pt=this.$m,bt=this.$M,Tt=P.weekdays,nt=P.months,At=P.meridiem,Lt=function(lt,gt,Et,Rt){return lt&&(lt[gt]||lt(R,H))||Et[gt].slice(0,Rt)},qt=function(lt){return z.s(ut%12||12,lt,"0")},vt=At||function(lt,gt,Et){var Rt=lt<12?"AM":"PM";return Et?Rt.toLowerCase():Rt};return H.replace(C,(function(lt,gt){return gt||(function(Et){switch(Et){case"YY":return String(R.$y).slice(-2);case"YYYY":return z.s(R.$y,4,"0");case"M":return bt+1;case"MM":return z.s(bt+1,2,"0");case"MMM":return Lt(P.monthsShort,bt,nt,3);case"MMMM":return Lt(nt,bt);case"D":return R.$D;case"DD":return z.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Lt(P.weekdaysMin,R.$W,Tt,2);case"ddd":return Lt(P.weekdaysShort,R.$W,Tt,3);case"dddd":return Tt[R.$W];case"H":return String(ut);case"HH":return z.s(ut,2,"0");case"h":return qt(1);case"hh":return qt(2);case"a":return vt(ut,pt,!0);case"A":return vt(ut,pt,!1);case"m":return String(pt);case"mm":return z.s(pt,2,"0");case"s":return String(R.$s);case"ss":return z.s(R.$s,2,"0");case"SSS":return z.s(R.$ms,3,"0");case"Z":return Z}return null})(lt)||Z.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(v,R,P){var H,Z=this,ut=z.p(R),pt=N(v),bt=(pt.utcOffset()-this.utcOffset())*i,Tt=this-pt,nt=function(){return z.m(Z,pt)};switch(ut){case d:H=nt()/12;break;case u:H=nt();break;case p:H=nt()/3;break;case h:H=(Tt-bt)/6048e5;break;case c:H=(Tt-bt)/864e5;break;case l:H=Tt/s;break;case n:H=Tt/i;break;case o:H=Tt/r;break;default:H=Tt}return P?H:z.a(H)},O.daysInMonth=function(){return this.endOf(u).$D},O.$locale=function(){return L[this.$L]},O.locale=function(v,R){if(!v)return this.$L;var P=this.clone(),H=X(v,R,!0);return H&&(P.$L=H),P},O.clone=function(){return z.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},A})(),j=at.prototype;return N.prototype=j,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",m]].forEach((function(A){j[A[1]]=function(O){return this.$g(O,A[0],A[1])}})),N.extend=function(A,O){return A.$i||(A(O,at,N),A.$i=!0),N},N.locale=X,N.isDayjs=F,N.unix=function(A){return N(1e3*A)},N.en=L[B],N.Ls=L,N.p={},N}))})(Js)),Js.exports}var Hy=Wy();const jy=In(Hy);var fr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},Wn=f(function(e="fatal"){let t=fr.fatal;typeof e=="string"?e.toLowerCase()in fr&&(t=fr[e]):typeof e=="number"&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=fr.fatal&&(W.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",qe("FATAL"))),t<=fr.error&&(W.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",qe("ERROR"))),t<=fr.warn&&(W.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",qe("WARN"))),t<=fr.info&&(W.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",qe("INFO"))),t<=fr.debug&&(W.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("DEBUG"))),t<=fr.trace&&(W.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("TRACE")))},"setLogLevel"),qe=f(e=>`%c${jy().format("ss.SSS")} : ${e} : `,"format");const ta={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return ta.hue2rgb(a,s,e+1/3)*255;case"g":return ta.hue2rgb(a,s,e)*255;case"b":return ta.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Yy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Uy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Dt={channel:ta,lang:Yy,unit:Uy},Lr={};for(let e=0;e<=255;e++)Lr[e]=Dt.unit.dec2hex(e);const ye={ALL:0,RGB:1,HSL:2};let Gy=class{constructor(){this.type=ye.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ye.ALL}is(t){return this.type===t}};class Xy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ye.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Dt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Dt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Dt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Dt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Dt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Dt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ye.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ye.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ye.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ye.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ye.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ye.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ma=new Xy({r:0,g:0,b:0,a:0},"transparent"),gi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(gi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ma.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Lr[Math.round(t)]}${Lr[Math.round(r)]}${Lr[Math.round(i)]}${Lr[Math.round(s*255)]}`:`#${Lr[Math.round(t)]}${Lr[Math.round(r)]}${Lr[Math.round(i)]}`}},Hr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Hr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Hr.re);if(!r)return;const[,i,s,a,o,n]=r;return Ma.set({h:Hr._hue2deg(i),s:Dt.channel.clamp.s(parseFloat(s)),l:Dt.channel.clamp.l(parseFloat(a)),a:o?Dt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%, ${s})`:`hsl(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%)`}},ps={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=ps.colors[e];if(t)return gi.parse(t)},stringify:e=>{const t=gi.stringify(e);for(const r in ps.colors)if(ps.colors[r]===t)return r}},ss={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ss.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return Ma.set({r:Dt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Dt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Dt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`:`rgb(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)})`}},sr={format:{keyword:ps,hex:gi,rgb:ss,rgba:ss,hsl:Hr,hsla:Hr},parse:e=>{if(typeof e!="string")return e;const t=gi.parse(e)||ss.parse(e)||Hr.parse(e)||ps.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ye.HSL)||e.data.r===void 0?Hr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ss.stringify(e):gi.stringify(e)},fd=(e,t)=>{const r=sr.parse(e);for(const i in t)r[i]=Dt.channel.clamp[i](t[i]);return sr.stringify(r)},Ar=(e,t,r=0,i=1)=>{if(typeof e!="number")return fd(e,{a:t});const s=Ma.set({r:Dt.channel.clamp.r(e),g:Dt.channel.clamp.g(t),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(i)});return sr.stringify(s)},Vy=e=>{const{r:t,g:r,b:i}=sr.parse(e),s=.2126*Dt.channel.toLinear(t)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(i);return Dt.lang.round(s)},Zy=e=>Vy(e)>=.5,Xe=e=>!Zy(e),gd=(e,t,r)=>{const i=sr.parse(e),s=i[t],a=Dt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),sr.stringify(i)},Y=(e,t)=>gd(e,"l",t),U=(e,t)=>gd(e,"l",-t),b=(e,t)=>{const r=sr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return fd(e,i)},Ky=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=sr.parse(e),{r:n,g:l,b:c,a:h}=sr.parse(t),u=r/100,p=u*2-1,d=o-h,y=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,x=1-y,C=i*y+n*x,k=s*y+l*x,S=a*y+c*x,w=o*u+h*(1-u);return Ar(C,k,S,w)},M=(e,t=100)=>{const r=sr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ky(r,e,t)};/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function _h(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Qy(e){if(Array.isArray(e))return e}function Jy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return n}}function tC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eC(e,t){return Qy(e)||Jy(e,t)||rC(e,t)||tC()}function rC(e,t){if(e){if(typeof e=="string")return _h(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_h(e,t):void 0}}const md=Object.entries,Bh=Object.setPrototypeOf,iC=Object.isFrozen,sC=Object.getPrototypeOf,aC=Object.getOwnPropertyDescriptor;let he=Object.freeze,ue=Object.seal,ci=Object.create,yd=typeof Reflect<"u"&&Reflect,rn=yd.apply,sn=yd.construct;he||(he=function(t){return t});ue||(ue=function(t){return t});rn||(rn=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});sn||(sn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const zr=ne(Array.prototype.forEach),oC=ne(Array.prototype.lastIndexOf),vh=ne(Array.prototype.pop),Xi=ne(Array.prototype.push),nC=ne(Array.prototype.splice),mi=Array.isArray,as=ne(String.prototype.toLowerCase),no=ne(String.prototype.toString),Lh=ne(String.prototype.match),Vi=ne(String.prototype.replace),Fh=ne(String.prototype.indexOf),lC=ne(String.prototype.trim),hC=ne(Number.prototype.toString),cC=ne(Boolean.prototype.toString),Eh=typeof BigInt>"u"?null:ne(BigInt.prototype.toString),Ah=typeof Symbol>"u"?null:ne(Symbol.prototype.toString),Ae=ne(Object.prototype.hasOwnProperty),Zi=ne(Object.prototype.toString),me=ne(RegExp.prototype.test),Ir=uC(TypeError);function ne(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return rn(e,t,i)}}function uC(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return sn(e,r)}}function Yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:as;if(Bh&&Bh(e,null),!mi(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(iC(t)||(t[i]=a),s=a)}e[s]=!0}return e}function dC(e){for(let t=0;t<e.length;t++)Ae(e,t)||(e[t]=null);return e}function Pe(e){const t=ci(null);for(const i of md(e)){var r=eC(i,2);const s=r[0],a=r[1];Ae(e,s)&&(mi(a)?t[s]=dC(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Pe(a):t[s]=a)}return t}function pC(e){switch(typeof e){case"string":return e;case"number":return hC(e);case"boolean":return cC(e);case"bigint":return Eh?Eh(e):"0";case"symbol":return Ah?Ah(e):"Symbol()";case"undefined":return Zi(e);case"function":case"object":{if(e===null)return Zi(e);const t=e,r=Ne(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Zi(i)}return Zi(e)}default:return Zi(e)}}function Ne(e,t){for(;e!==null;){const i=aC(e,t);if(i){if(i.get)return ne(i.get);if(typeof i.value=="function")return ne(i.value)}e=sC(e)}function r(){return null}return r}function fC(e){try{return me(e,""),!0}catch{return!1}}const Mh=he(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lo=he(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ho=he(["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"]),gC=he(["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"]),co=he(["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"]),mC=he(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Oh=he(["#text"]),$h=he(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),uo=he(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Dh=he(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ns=he(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yC=ue(/{{[\w\W]*|^[\w\W]*}}/g),CC=ue(/<%[\w\W]*|^[\w\W]*%>/g),xC=ue(/\${[\w\W]*/g),bC=ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),kC=ue(/^aria-[\-\w]+$/),Ph=ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TC=ue(/^(?:\w+script|data):/i),SC=ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wC=ue(/^html$/i),_C=ue(/^[a-z][.\w]*(-[.\w]+)+$/i),Ih=ue(/<[/\w!]/g),Rh=ue(/<[/\w]/g),BC=ue(/<\/no(script|embed|frames)/i),vC=ue(/\/>/i),$e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Cd=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],LC=he(Yt({},Cd)),FC=(function(){const e={};return zr(Cd,t=>{e[t]=ue(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),he(e)})(),EC=function(){return typeof window>"u"?null:window},AC=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},qh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Br=function(t,r,i,s){return Ae(t,r)&&mi(t[r])?Yt(s.base?Pe(s.base):{},t[r],s.transform):i},po=function(t,r,i){const s=Ae(t,r)?t[r]:void 0;return s&&typeof s=="object"?Pe(s):i()};function xd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EC();const t=ot=>xd(ot);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==$e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Ne(p,"cloneNode"),m=Ne(p,"remove"),y=Ne(p,"removeAttributeNode"),x=Ne(p,"nextSibling"),C=Ne(p,"childNodes"),k=Ne(p,"parentNode"),S=Ne(p,"shadowRoot"),w=Ne(p,"attributes"),B=o&&o.prototype?Ne(o.prototype,"nodeType"):null,L=o&&o.prototype?Ne(o.prototype,"nodeName"):null,E=o&&o.prototype?Ne(o.prototype,"ownerDocument"):null,F=function(_){return B?B(_):_.nodeType},X=function(_){return L?L(_):_.nodeName};if(typeof a=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let N,z="",at,j=!1,A=0;const O=function(){if(A>0)throw Ir('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},v=function(_){O(),A++;try{return N.createHTML(_)}finally{A--}},R=function(_){O(),A++;try{return N.createScriptURL(_)}finally{A--}},P=function(){return j||(at=AC(u,s),j=!0),at},H=r,Z=H.implementation,ut=H.createNodeIterator,pt=H.createDocumentFragment,bt=H.getElementsByTagName,Tt=i.importNode;let nt=qh();t.isSupported=typeof md=="function"&&typeof k=="function"&&Z&&Z.createHTMLDocument!==void 0;const At=yC,Lt=CC,qt=xC,vt=bC,lt=kC,gt=TC,Et=SC,Rt=_C;let Ut=Ph,D=null;const Ft=Yt({},[...Mh,...lo,...ho,...co,...Oh]);let Wt=null;const we=Yt({},[...$h,...uo,...Dh,...Ns]);let fe=Object.seal(ci(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,cr=null;const _e=Object.seal(ci(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,ur=!0,dr=!1,pr=!0,ve=!1,g=!0,$=!1,V=!1,Q=null,G=null,st=!1,T=!1,q=!1,et=!1,K=!0,J=!1;const it="user-content-";let tt=!0,mt=!1,ct={},kt=null;const Bt=Yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nt=null;const Vt=Yt({},["audio","video","img","source","image","track"]);let Yi=null;const wr=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Os="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let ii=Ke,Qa=!1,Ja=null;const hy=Yt({},[Ze,Os,Ke],no),ih=he(["mi","mo","mn","ms","mtext"]);let to=Yt({},ih);const sh=he(["annotation-xml"]);let eo=Yt({},sh);const cy=Yt({},["title","style","font","a","script"]);let Ui=null;const uy=["application/xhtml+xml","text/html"],dy="text/html";let ie=null,si=null;const py=r.createElement("form"),ah=function(_){return _ instanceof RegExp||_ instanceof Function},ro=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(si&&si===_)return;(!_||typeof _!="object")&&(_={}),_=Pe(_),Ui=uy.indexOf(_.PARSER_MEDIA_TYPE)===-1?dy:_.PARSER_MEDIA_TYPE,ie=Ui==="application/xhtml+xml"?no:as,D=Br(_,"ALLOWED_TAGS",Ft,{transform:ie}),Wt=Br(_,"ALLOWED_ATTR",we,{transform:ie}),Ja=Br(_,"ALLOWED_NAMESPACES",hy,{transform:no}),Yi=Br(_,"ADD_URI_SAFE_ATTR",wr,{transform:ie,base:wr}),Nt=Br(_,"ADD_DATA_URI_TAGS",Vt,{transform:ie,base:Vt}),kt=Br(_,"FORBID_CONTENTS",Bt,{transform:ie}),Re=Br(_,"FORBID_TAGS",Pe({}),{transform:ie}),cr=Br(_,"FORBID_ATTR",Pe({}),{transform:ie}),ct=Ae(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?Pe(_.USE_PROFILES):_.USE_PROFILES:!1,Be=_.ALLOW_ARIA_ATTR!==!1,ur=_.ALLOW_DATA_ATTR!==!1,dr=_.ALLOW_UNKNOWN_PROTOCOLS||!1,pr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=_.SAFE_FOR_TEMPLATES||!1,g=_.SAFE_FOR_XML!==!1,$=_.WHOLE_DOCUMENT||!1,T=_.RETURN_DOM||!1,q=_.RETURN_DOM_FRAGMENT||!1,et=_.RETURN_TRUSTED_TYPE||!1,st=_.FORCE_BODY||!1,K=_.SANITIZE_DOM!==!1,J=_.SANITIZE_NAMED_PROPS||!1,tt=_.KEEP_CONTENT!==!1,mt=_.IN_PLACE||!1,Ut=fC(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:Ph,ii=typeof _.NAMESPACE=="string"?_.NAMESPACE:Ke,to=po(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>Yt({},ih)),eo=po(_,"HTML_INTEGRATION_POINTS",()=>Yt({},sh));const I=po(_,"CUSTOM_ELEMENT_HANDLING",()=>ci(null));if(fe=ci(null),Ae(I,"tagNameCheck")&&ah(I.tagNameCheck)&&(fe.tagNameCheck=I.tagNameCheck),Ae(I,"attributeNameCheck")&&ah(I.attributeNameCheck)&&(fe.attributeNameCheck=I.attributeNameCheck),Ae(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),ue(fe),ve&&(ur=!1),q&&(T=!0),ct&&(D=Yt({},Oh),Wt=ci(null),ct.html===!0&&(Yt(D,Mh),Yt(Wt,$h)),ct.svg===!0&&(Yt(D,lo),Yt(Wt,uo),Yt(Wt,Ns)),ct.svgFilters===!0&&(Yt(D,ho),Yt(Wt,uo),Yt(Wt,Ns)),ct.mathMl===!0&&(Yt(D,co),Yt(Wt,Dh),Yt(Wt,Ns))),_e.tagCheck=null,_e.attributeCheck=null,Ae(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?_e.tagCheck=_.ADD_TAGS:mi(_.ADD_TAGS)&&(D===Ft&&(D=Pe(D)),Yt(D,_.ADD_TAGS,ie))),Ae(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?_e.attributeCheck=_.ADD_ATTR:mi(_.ADD_ATTR)&&(Wt===we&&(Wt=Pe(Wt)),Yt(Wt,_.ADD_ATTR,ie))),Ae(_,"ADD_FORBID_CONTENTS")&&mi(_.ADD_FORBID_CONTENTS)&&(kt===Bt&&(kt=Pe(kt)),Yt(kt,_.ADD_FORBID_CONTENTS,ie)),tt&&(D["#text"]=!0),$&&Yt(D,["html","head","body"]),D.table&&(Yt(D,["tbody"]),delete Re.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const rt=N;N=_.TRUSTED_TYPES_POLICY;try{z=v("")}catch(yt){throw N=rt,yt}}else _.TRUSTED_TYPES_POLICY===null?(N=void 0,z=""):(N===void 0&&(N=P()),N&&typeof z=="string"&&(z=v("")));he&&he(_),si=_},oh=Yt({},[...lo,...ho,...gC]),nh=Yt({},[...co,...mC]),fy=function(_,I,rt){return I.namespaceURI===Ke?_==="svg":I.namespaceURI===Ze?_==="svg"&&(rt==="annotation-xml"||to[rt]):!!oh[_]},gy=function(_,I,rt){return I.namespaceURI===Ke?_==="math":I.namespaceURI===Os?_==="math"&&eo[rt]:!!nh[_]},my=function(_,I,rt){return I.namespaceURI===Os&&!eo[rt]||I.namespaceURI===Ze&&!to[rt]?!1:!nh[_]&&(cy[_]||!oh[_])},yy=function(_){let I=k(_);(!I||!I.tagName)&&(I={namespaceURI:ii,tagName:"template"});const rt=as(_.tagName),yt=as(I.tagName);return Ja[_.namespaceURI]?_.namespaceURI===Os?fy(rt,I,yt):_.namespaceURI===Ze?gy(rt,I,yt):_.namespaceURI===Ke?my(rt,I,yt):!!(Ui==="application/xhtml+xml"&&Ja[_.namespaceURI]):!1},_r=function(_){Xi(t.removed,{element:_});try{k(_).removeChild(_)}catch{if(m(_),!k(_))throw Ir("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},lh=function(_,I,rt){try{y(_,I)}catch{try{_.removeAttribute(rt)}catch{}}},$s=function(_){Ds(_);const I=C(_);if(I){const yt=[];zr(I,_t=>{Xi(yt,_t)}),zr(yt,_t=>{try{m(_t)}catch{}})}const rt=w(_);if(rt)for(let yt=rt.length-1;yt>=0;--yt){const _t=rt[yt],$t=_t&&_t.name;typeof $t=="string"&&lh(_,_t,$t)}},Pr=function(_,I,rt){if(!rt)try{rt=I.getAttributeNode(_)}catch{rt=null}Xi(t.removed,{attribute:rt||null,from:I});try{rt?y(I,rt):I.removeAttribute(_)}catch{try{I.removeAttribute(_)}catch{}}if(_==="is")if(T||q)try{_r(I)}catch{}else try{I.setAttribute(_,"")}catch{}},Cy=function(_){const I=w(_);if(I)for(let rt=I.length-1;rt>=0;--rt){const yt=I[rt],_t=yt&&yt.name;typeof _t!="string"||Wt[ie(_t)]||lh(_,yt,_t)}},Ds=function(_){const I=[_];for(;I.length>0;){const rt=I.pop();F(rt)===$e.element&&Cy(rt);const _t=C(rt);if(_t)for(let $t=_t.length-1;$t>=0;--$t)I.push(_t[$t])}},hh=function(_,I){return g?_==="patchsrc"?!0:_==="for"&&I!=="label"&&I!=="output":!1},xy=function(_){if(!g)return;const I=[_];for(;I.length>0;){const rt=I.pop(),yt=F(rt);if(yt===$e.processingInstruction||yt===$e.comment&&me(Rh,rt.data)){try{m(rt)}catch{}continue}if(yt===$e.element){const $t=rt,Kt=ie(X(rt));try{$t.hasAttribute&&$t.hasAttribute("patchsrc")&&$t.removeAttribute("patchsrc"),$t.hasAttribute&&$t.hasAttribute("for")&&hh("for",Kt)&&$t.removeAttribute("for")}catch{}}const _t=C(rt);if(_t)for(let $t=_t.length-1;$t>=0;--$t)I.push(_t[$t])}},ch=function(_){let I=null,rt=null;if(st)_="<remove></remove>"+_;else{const $t=Lh(_,/^[\r\n\t ]+/);rt=$t&&$t[0]}Ui==="application/xhtml+xml"&&ii===Ke&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const yt=N?v(_):_;if(ii===Ke)try{I=new h().parseFromString(yt,Ui)}catch{}if(!I||!I.documentElement){I=Z.createDocument(ii,"template",null);try{I.documentElement.innerHTML=Qa?z:yt}catch{}}const _t=I.body||I.documentElement;return _&&rt&&_t.insertBefore(r.createTextNode(rt),_t.childNodes[0]||null),ii===Ke?bt.call(I,$?"html":"body")[0]:$?I.documentElement:_t},uh=function(_){const I=E?E(_):_.ownerDocument;return ut.call(I||_,_,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ps=function(_){return _=Vi(_,At," "),_=Vi(_,Lt," "),_=Vi(_,qt," "),_},io=function(_){var I;_.normalize();const rt=E?E(_):_.ownerDocument,yt=ut.call(rt||_,_,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let _t=yt.nextNode();for(;_t;)_t.data=Ps(_t.data),_t=yt.nextNode();const $t=(I=_.querySelectorAll)===null||I===void 0?void 0:I.call(_,"template");$t&&zr($t,Kt=>{ai(Kt.content)&&io(Kt.content)})},Is=function(_){const I=L?L(_):null;return typeof I!="string"||ie(I)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==w(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==B(_)||_.childNodes!==C(_)},ai=function(_){if(!B||typeof _!="object"||_===null)return!1;try{return B(_)===$e.documentFragment}catch{return!1}},Gi=function(_){if(!B||typeof _!="object"||_===null)return!1;try{return typeof B(_)=="number"}catch{return!1}};function Qe(ot,_,I){ot.length!==0&&zr(ot,rt=>{rt.call(t,_,I,si)})}const by=function(_,I){return!!(g&&_.hasChildNodes()&&!Gi(_.firstElementChild)&&me(Ih,_.textContent)&&me(Ih,_.innerHTML)||g&&_.namespaceURI===Ke&&LC[I]&&(Gi(_.firstElementChild)||typeof _.textContent=="string"&&me(FC[I],_.textContent))||_.nodeType===$e.processingInstruction||g&&_.nodeType===$e.comment&&me(Rh,_.data))},Rs=function(_,I){if(_ instanceof RegExp)return me(_,I);if(_ instanceof Function){for(var rt=arguments.length,yt=new Array(rt>2?rt-2:0),_t=2;_t<rt;_t++)yt[_t-2]=arguments[_t];return!!_(I,...yt)}return!1},ky=function(_,I,rt){if(!Re[I]&&mh(I)&&Rs(fe.tagNameCheck,I))return!1;if(tt&&!kt[I]){const yt=k(_),_t=C(_);if(_t&&yt){const $t=_t.length;for(let Kt=$t-1;Kt>=0;--Kt){const ee=_===rt?d(_t[Kt],!0):_t[Kt];yt.insertBefore(ee,x(_))}}}return _r(_),!0},dh=function(_,I,rt,yt){return _.length===0?I:I===rt||I===yt?Pe(I):I},ph=function(_,I){return _===I||k(_)!==null?!1:(mt&&Ds(_),!0)},fh=function(_,I){if(Qe(nt.beforeSanitizeElements,_,null),ph(_,I))return!0;if(Is(_))return _r(_),!0;const rt=ie(X(_));if(D=dh(nt.uponSanitizeElement,D,Ft,Q),Qe(nt.uponSanitizeElement,_,{tagName:rt,allowedTags:D}),ph(_,I))return!0;if(by(_,rt))return _r(_),!0;if(Re[rt]||!(_e.tagCheck instanceof Function&&_e.tagCheck(rt))&&!D[rt]){const _t=ky(_,rt,I);return _t===!1&&Qe(nt.afterSanitizeElements,_,null),_t}if(F(_)===$e.element&&!yy(_)||(rt==="noscript"||rt==="noembed"||rt==="noframes")&&me(BC,_.innerHTML))return _r(_),!0;if(ve&&_.nodeType===$e.text){const _t=Ps(_.textContent);_.textContent!==_t&&(Xi(t.removed,{element:_.cloneNode()}),_.textContent=_t)}return Qe(nt.afterSanitizeElements,_,null),!1},gh=function(_,I,rt){if(cr[I]||hh(I,_)||K&&(I==="id"||I==="name")&&(rt in r||rt in py))return!1;const yt=Wt[I]||_e.attributeCheck instanceof Function&&_e.attributeCheck(I,_);return ur&&me(vt,I)||Be&&me(lt,I)?!0:yt?Yi[I]||me(Ut,Vi(rt,Et,""))||(I==="src"||I==="xlink:href"||I==="href")&&_!=="script"&&Fh(rt,"data:")===0&&Nt[_]||dr&&!me(gt,Vi(rt,Et,""))?!0:!rt:mh(_)&&Rs(fe.tagNameCheck,_)&&Rs(fe.attributeNameCheck,I,_)||I==="is"&&fe.allowCustomizedBuiltInElements&&Rs(fe.tagNameCheck,rt)},Ty=Yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mh=function(_){return!Ty[as(_)]&&me(Rt,_)},Sy=function(_,I,rt,yt){if(N&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!rt)switch(u.getAttributeType(_,I)){case"TrustedHTML":return v(yt);case"TrustedScriptURL":return R(yt)}return yt},wy=function(_,I,rt,yt){try{return rt?_.setAttributeNS(rt,I,yt):_.setAttribute(I,yt),Is(_)?(_r(_),!1):!0}catch{return Pr(I,_),!1}},yh=function(_){Qe(nt.beforeSanitizeAttributes,_,null);const I=_.attributes;if(!I||Is(_))return;Wt=dh(nt.uponSanitizeAttribute,Wt,we,G);const rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Wt,forceKeepAttr:void 0};let yt=I.length;const _t=ie(_.nodeName);for(;yt--;){const $t=I[yt],Kt=$t.name,ee=$t.namespaceURI,Le=$t.value,Fe=ie(Kt),ao=Le;let Te=Kt==="value"?ao:lC(ao),Ch=!1;if(rt.attrName=Fe,rt.attrValue=Te,rt.keepAttr=!0,rt.forceKeepAttr=void 0,Qe(nt.uponSanitizeAttribute,_,rt),Te=rt.attrValue,J&&(Fe==="id"||Fe==="name")&&Fh(Te,it)!==0&&(Pr(Kt,_,$t),Te=it+Te,Ch=!0),g&&me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){Pr(Kt,_,$t);continue}if(Fe==="attributename"&&Lh(Te,"href")){Pr(Kt,_,$t);continue}if(!rt.forceKeepAttr){if(!rt.keepAttr){Pr(Kt,_,$t);continue}if(!pr&&me(vC,Te)){Pr(Kt,_,$t);continue}if(ve&&(Te=Ps(Te)),!gh(_t,Fe,Te)){Pr(Kt,_,$t);continue}Te=Sy(_t,Fe,ee,Te),Te!==ao&&wy(_,Kt,ee,Te)&&Ch&&vh(t.removed)}}Qe(nt.afterSanitizeAttributes,_,null)},qs=function(_){let I=null;const rt=uh(_);for(Qe(nt.beforeSanitizeShadowDOM,_,null);I=rt.nextNode();)if(Qe(nt.uponSanitizeShadowNode,I,null),fh(I,_),yh(I),ai(I.content)&&qs(I.content),F(I)===$e.element){const yt=S(I);ai(yt)&&(so(yt),qs(yt))}Qe(nt.afterSanitizeShadowDOM,_,null)},so=function(_){const I=[{node:_,shadow:null}];for(;I.length>0;){const rt=I.pop();if(rt.shadow){qs(rt.shadow);continue}const yt=rt.node,$t=F(yt)===$e.element,Kt=C(yt);if(Kt)for(let ee=Kt.length-1;ee>=0;--ee)I.push({node:Kt[ee],shadow:null});if($t){const ee=L?L(yt):null;if(typeof ee=="string"&&ie(ee)==="template"){const Le=yt.content;ai(Le)&&I.push({node:Le,shadow:null})}}if($t){const ee=S(yt);ai(ee)&&I.push({node:null,shadow:ee},{node:ee,shadow:null})}}};return t.sanitize=function(ot){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,rt=null,yt=null,_t=null;if(Qa=!ot,Qa&&(ot="<!-->"),typeof ot!="string"&&!Gi(ot)&&(ot=pC(ot),typeof ot!="string"))throw Ir("dirty is not a string, aborting");if(!t.isSupported)return ot;V?(D=Q,Wt=G):ro(_),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(D=Pe(D)),nt.uponSanitizeAttribute.length>0&&(Wt=Pe(Wt)),t.removed=[];const $t=mt&&typeof ot!="string"&&Gi(ot);if($t){xy(ot);const Le=X(ot);if(typeof Le=="string"){const Fe=ie(Le);if(!D[Fe]||Re[Fe])throw $s(ot),Ir("root node is forbidden and cannot be sanitized in-place")}if(Is(ot))throw $s(ot),Ir("root node is clobbered and cannot be sanitized in-place");try{so(ot)}catch(Fe){throw $s(ot),Fe}}else if(Gi(ot))I=ch("<!---->"),rt=I.ownerDocument.importNode(ot,!0),rt.nodeType===$e.element&&rt.nodeName==="BODY"||rt.nodeName==="HTML"?I=rt:I.appendChild(rt),so(I);else{if(!T&&!ve&&!$&&ot.indexOf("<")===-1)return N&&et?v(ot):ot;if(I=ch(ot),!I)return T?null:et?z:""}I&&st&&_r(I.firstChild);const Kt=$t?ot:I;try{const Le=uh(Kt);for(;yt=Le.nextNode();)fh(yt,Kt),yh(yt),ai(yt.content)&&qs(yt.content)}catch(Le){throw $t&&($s(ot),zr(t.removed,Fe=>{Fe.element&&Ds(Fe.element)})),Le}if($t)return zr(t.removed,Le=>{Le.element&&Ds(Le.element)}),ve&&io(ot),ot;if(T){if(ve&&io(I),q)for(_t=pt.call(I.ownerDocument);I.firstChild;)_t.appendChild(I.firstChild);else _t=I;return(Wt.shadowroot||Wt.shadowrootmode)&&(_t=Tt.call(i,_t,!0)),_t}let ee=$?I.outerHTML:I.innerHTML;return $&&D["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&me(wC,I.ownerDocument.doctype.name)&&(ee="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
4
|
+
`+ee),ve&&(ee=Ps(ee)),N&&et?v(ee):ee},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ro(ot),V=!0,Q=D,G=Wt},t.clearConfig=function(){si=null,V=!1,Q=null,G=null,N=at,z=""},t.isValidAttribute=function(ot,_,I){si||ro({});const rt=ie(ot),yt=ie(_);return gh(rt,yt,I)},t.addHook=function(ot,_){typeof _=="function"&&Ae(nt,ot)&&Xi(nt[ot],_)},t.removeHook=function(ot,_){if(Ae(nt,ot)){if(_!==void 0){const I=oC(nt[ot],_);return I===-1?void 0:nC(nt[ot],I,1)[0]}return vh(nt[ot])}},t.removeHooks=function(ot){Ae(nt,ot)&&(nt[ot]=[])},t.removeAllHooks=function(){nt=qh()},t}var $i=xd(),an=f((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>an(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=an(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ce=an,or="#ffffff",nr="#f2f2f2",Ot=f((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),xi,MC=(xi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScale"+Ft]=U(this["cScale"+Ft],75);else for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScale"+Ft]=U(this["cScale"+Ft],25);for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScaleInv"+Ft]=this["cScaleInv"+Ft]||M(this["cScale"+Ft]);for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this.darkMode?this["cScalePeer"+Ft]=this["cScalePeer"+Ft]||Y(this["cScale"+Ft],10):this["cScalePeer"+Ft]=this["cScalePeer"+Ft]||U(this["cScale"+Ft],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScaleLabel"+Ft]=this["cScaleLabel"+Ft]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Ft=0;Ft<5;Ft++)this["surface"+Ft]=this["surface"+Ft]||b(this.mainBkg,{h:180,s:-15,l:t*(5+Ft*3)}),this["surfacePeer"+Ft]=this["surfacePeer"+Ft]||b(this.mainBkg,{h:180,s:-15,l:t*(8+Ft*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((p=this.cynefin)==null?void 0:p.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((S=this.radar)==null?void 0:S.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((X=this.radar)==null?void 0:X.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((z=this.wardley)==null?void 0:z.backgroundColor)||this.background,axisColor:((at=this.wardley)==null?void 0:at.axisColor)||this.lineColor,axisTextColor:((j=this.wardley)==null?void 0:j.axisTextColor)||this.primaryTextColor,gridColor:((A=this.wardley)==null?void 0:A.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((R=this.wardley)==null?void 0:R.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((H=this.wardley)==null?void 0:H.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((ut=this.wardley)==null?void 0:ut.annotationTextColor)||this.primaryTextColor,annotationFill:((pt=this.wardley)==null?void 0:pt.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((Tt=this.xyChart)==null?void 0:Tt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((At=this.xyChart)==null?void 0:At.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((qt=this.xyChart)==null?void 0:qt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((vt=this.xyChart)==null?void 0:vt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((lt=this.xyChart)==null?void 0:lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((gt=this.xyChart)==null?void 0:gt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Ut=this.xyChart)==null?void 0:Ut.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(xi,"Theme"),xi),OC=f(e=>{const t=new MC;return t.calculate(e),t},"getThemeVariables"),bi,$C=(bi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Ar(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ar(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.secondBkg=Y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Y(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=M(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||M(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||Y(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});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.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??Y(this["cScale"+D],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((E=this.xyChart)==null?void 0:E.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((X=this.xyChart)==null?void 0:X.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((j=this.radar)==null?void 0:j.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((ut=this.radar)==null?void 0:ut.legendBoxSize)||12,legendFontSize:((pt=this.radar)==null?void 0:pt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((bt=this.wardley)==null?void 0:bt.backgroundColor)||this.background,axisColor:((Tt=this.wardley)==null?void 0:Tt.axisColor)||this.lineColor,axisTextColor:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Lt=this.wardley)==null?void 0:Lt.componentFill)||this.mainBkg,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((vt=this.wardley)==null?void 0:vt.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((gt=this.wardley)==null?void 0:gt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(bi,"Theme"),bi),DC=f(e=>{const t=new $C;return t.calculate(e),t},"getThemeVariables"),ki,PC=(ki=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ar(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=U(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||b(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((z=this.wardley)==null?void 0:z.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((j=this.wardley)==null?void 0:j.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((ut=this.wardley)==null?void 0:ut.annotationFill)||this.background},this.xyChart={backgroundColor:((pt=this.xyChart)==null?void 0:pt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((vt=this.xyChart)==null?void 0:vt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ki,"Theme"),ki),IC=f(e=>{const t=new PC;return t.calculate(e),t},"getThemeVariables"),Ti,RC=(Ti=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=Y("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.actorBorder=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=U(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||b(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&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]||b(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,s:-30,l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((z=this.wardley)==null?void 0:z.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((j=this.wardley)==null?void 0:j.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((ut=this.wardley)==null?void 0:ut.annotationFill)||this.background},this.xyChart={backgroundColor:((pt=this.xyChart)==null?void 0:pt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((vt=this.xyChart)==null?void 0:vt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Ti,"Theme"),Ti),qC=f(e=>{const t=new RC;return t.calculate(e),t},"getThemeVariables"),Si,NC=(Si=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||M(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||Y(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||U(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]||b(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Y(this.contrast,30),this.sectionBkgColor2=Y(this.contrast,30),this.taskBorderColor=U(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Y(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((E=this.xyChart)==null?void 0:E.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((X=this.xyChart)==null?void 0:X.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((j=this.radar)==null?void 0:j.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((ut=this.radar)==null?void 0:ut.legendBoxSize)||12,legendFontSize:((pt=this.radar)==null?void 0:pt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((bt=this.wardley)==null?void 0:bt.backgroundColor)||this.background,axisColor:((Tt=this.wardley)==null?void 0:Tt.axisColor)||this.lineColor,axisTextColor:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Lt=this.wardley)==null?void 0:Lt.componentFill)||this.background,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((vt=this.wardley)==null?void 0:vt.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((gt=this.wardley)==null?void 0:gt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Si,"Theme"),Si),zC=f(e=>{const t=new NC;return t.calculate(e),t},"getThemeVariables"),wi,WC=(wi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,p,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(wi,"Theme"),wi),HC=f(e=>{const t=new WC;return t.calculate(e),t},"getThemeVariables"),_i,jC=(_i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(_i,"Theme"),_i),YC=f(e=>{const t=new jC;return t.calculate(e),t},"getThemeVariables"),Bi,UC=(Bi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,p,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Bi,"Theme"),Bi),GC=f(e=>{const t=new UC;return t.calculate(e),t},"getThemeVariables"),vi,XC=(vi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(vi,"Theme"),vi),VC=f(e=>{const t=new XC;return t.calculate(e),t},"getThemeVariables"),Li,ZC=(Li=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,p,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Li,"Theme"),Li),KC=f(e=>{const t=new ZC;return t.calculate(e),t},"getThemeVariables"),Fi,QC=(Fi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=U(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Fi,"Theme"),Fi),JC=f(e=>{const t=new QC;return t.calculate(e),t},"getThemeVariables"),Cr={base:{getThemeVariables:OC},dark:{getThemeVariables:DC},default:{getThemeVariables:IC},forest:{getThemeVariables:qC},neutral:{getThemeVariables:zC},neo:{getThemeVariables:HC},"neo-dark":{getThemeVariables:YC},redux:{getThemeVariables:GC},"redux-dark":{getThemeVariables:VC},"redux-color":{getThemeVariables:KC},"redux-dark-color":{getThemeVariables:JC}},de={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},bd={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Cr.default.getThemeVariables(),sequence:{...de.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},eventmodeling:{...de.eventmodeling},treeView:{...de.treeView,useWidth:void 0},radar:{...de.radar},railroad:{...de.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...de.ishikawa},sankey:{...de.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...de.venn},cynefin:{...de.cynefin}},kd=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...kd(e[i],"")]:[...r,t+i],[]),"keyify"),t0=new Set(kd(bd,"")),Td=bd,e0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},r0=f((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(W.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),da=f(e=>{if(W.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>da(t));return}for(const t of Object.keys(e)){if(W.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!t0.has(t)||e[t]==null){W.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=e0[t];i?r0(e[t],i):(W.debug("sanitizing object",t),da(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(W.debug("sanitizing css option",t),e[t]=Sd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}W.debug("After sanitization",e)}},"sanitizeDirective"),Sd=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Di=Object.freeze(Td),lr=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Me=ce({},Di),pa,Ur=[],fs=ce({},Di),Bs=f((e,t)=>{let r=ce({},e),i={};for(const s of t)Bd(s),i=ce(i,s);if(r=ce(r,i),i.theme&&i.theme in Cr){const s=ce({},pa),a=ce(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Cr&&(r.themeVariables=Cr[r.theme].getThemeVariables(a))}return fs=r,l0(fs),fs},"updateCurrentConfig"),i0=f(e=>(Me=ce({},Di),Me=ce(Me,e),e.theme&&Cr[e.theme]&&(Me.themeVariables=Cr[e.theme].getThemeVariables(e.themeVariables)),Bs(Me,Ur),Me),"setSiteConfig"),s0=f(e=>{pa=ce({},e)},"saveConfigFromInitialize"),a0=f(e=>(Me=ce(Me,e),Bs(Me,Ur),Me),"updateSiteConfig"),wd=f(()=>ce({},Me),"getSiteConfig"),_d=f(e=>(Bs(fs,[e]),te()),"setConfig"),te=f(()=>ce({},fs),"getConfig"),Bd=f(e=>{e&&(["secure",...Me.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Bd(e[t])}))},"sanitize"),o0=f(e=>{var t;da(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ur.push(e),Bs(Me,Ur)},"addDirective"),fa=f((e=Me)=>{Ur=[],Bs(e,Ur)},"reset"),n0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Nh={},vd=f(e=>{Nh[e]||(W.warn(n0[e]),Nh[e]=!0)},"issueWarning"),l0=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&vd("LAZY_LOAD_DEPRECATED")},"checkConfig"),vL=f(()=>{let e={};pa&&(e=ce(e,pa));for(const t of Ur)e=ce(e,t);return e},"getUserDefinedConfig"),be=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&vd("FLOWCHART_HTML_LABELS_DEPRECATED"),lr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ld=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,gs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,h0=/\s*%%.*\n/gm,Ei,Fd=(Ei=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Ei,"UnknownDiagramError"),Ei),Gr={},Hn=f(function(e,t){e=e.replace(Ld,"").replace(gs,"").replace(h0,`
|
|
5
|
+
`);for(const[r,{detector:i}]of Object.entries(Gr))if(i(e,t))return r;throw new Fd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),on=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ed(t,r,i)},"registerLazyLoadedDiagrams"),Ed=f((e,t,r)=>{Gr[e]&&W.warn(`Detector with key ${e} already exists. Overwriting.`),Gr[e]={detector:t,loader:r},W.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),c0=f(e=>Gr[e].loader,"getDiagramLoader"),vs=/<br\s*\/?>/gi,u0=f(e=>e?Od(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),d0=(()=>{let e=!1;return()=>{e||(Ad(),e=!0)}})();function Ad(){const e="data-temp-href-target";$i.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),$i.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f(Ad,"setupDompurifyHooks");var Md=f(e=>(d0(),$i.sanitize(e)),"removeScript"),zh=f((e,t)=>{if(be(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Md(e):r!=="loose"&&(e=Od(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=m0(e))}return e},"sanitizeMore"),ze=f((e,t)=>e&&(t.dompurifyConfig?e=$i.sanitize(zh(e,t),t.dompurifyConfig).toString():e=$i.sanitize(zh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),p0=f((e,t)=>typeof e=="string"?ze(e,t):e.flat().map(r=>ze(r,t)),"sanitizeTextOrArray"),f0=f(e=>vs.test(e),"hasBreaks"),g0=f(e=>e.split(vs),"splitBreaks"),m0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Od=f(e=>e.replace(vs,"#br#"),"breakToPlaceholder"),y0=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),C0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),x0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Wh=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];b0(a,o)&&(s=a+","+o,i++,r.pop())}r.push(k0(s))}return r.join("")},"parseGenericTypes"),nn=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),b0=f((e,t)=>{const r=nn(e,"~"),i=nn(t,"~");return r===1&&i===1},"shouldCombineSets"),k0=f(e=>{const t=nn(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Hh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ln=/\$\$(.*?)\$\$/g,xs=f(e=>{var t;return(((t=e.match(ln))==null?void 0:t.length)??0)>0},"hasKatex"),LL=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await $d(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),T0=f(async(e,t)=>{if(!xs(e))return e;if(!(Hh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ln,"MathML is unsupported in this environment.");{const{default:r}=await It(async()=>{const{default:s}=await import("./explorer-katex.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!Hh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(vs).map(s=>xs(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(ln,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),$d=f(async(e,t)=>ze(await T0(e,t),t),"renderKatexSanitized"),Ls={getRows:u0,sanitizeText:ze,sanitizeTextOrArray:p0,hasBreaks:f0,splitBreaks:g0,lineBreakRegex:vs,removeScript:Md,getUrl:y0,evaluate:lr,getMax:C0,getMin:x0},S0=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),w0=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Dd=f(function(e,t,r,i){const s=w0(t,r,i);S0(e,s)},"configureSvgSize"),_0=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;W.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;W.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,W.info(`Calculated bounds: ${n}x${l}`),Dd(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ea={};function hn(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
6
|
+
`)}f(hn,"cssStyleSheetToString");var B0=f((e,t,r,i)=>{let s="";return e in ea&&ea[e]?s=ea[e]({...r,svgId:i}):W.warn(`No theme found for ${e}`),`& {
|
|
7
7
|
font-family: ${r.fontFamily};
|
|
8
8
|
font-size: ${r.fontSize};
|
|
9
9
|
fill: ${r.textColor}
|
|
@@ -85,6 +85,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85
85
|
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
86
86
|
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
87
87
|
}
|
|
88
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
89
|
+
filter: none;
|
|
90
|
+
}
|
|
88
91
|
|
|
89
92
|
|
|
90
93
|
[data-look="neo"].node path {
|
|
@@ -121,92 +124,57 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
${t}
|
|
124
|
-
`},"getStyles"),
|
|
125
|
-
`)},"setAccDescription"),Oy=g(()=>Uo,"getAccDescription"),$y=g(e=>{Yo=jo(e)},"setDiagramTitle"),Iy=g(()=>Yo,"getDiagramTitle"),Sl=W,Dy=Wo,xt=_t,QT=tc,JT=ti,Go=g(e=>be(e,xt()),"sanitizeText"),Py=By,Ry=g(()=>hc,"getCommonDb"),Ls={},Fs=g((e,t,r)=>{var i;Ls[e]&&Sl.warn(`Diagram with id ${e} already registered. Overwriting.`),Ls[e]=t,r&&Xh(e,r),vy(e,t.styles),(i=t.injectUtils)==null||i.call(t,Sl,Dy,xt,Go,Py,Ry(),()=>{})},"registerDiagram"),Ja=g(e=>{if(e in Ls)return Ls[e];throw new qy(e)},"getDiagram"),Kr,qy=(Kr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Kr,"DiagramNotFoundError"),Kr),Ny=g(e=>{var s;const{securityLevel:t}=xt();let r=ht("body");if(t==="sandbox"){const o=((s=ht(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=ht(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Xo(e){return typeof e>"u"||e===null}g(Xo,"isNothing");function cc(e){return typeof e=="object"&&e!==null}g(cc,"isObject");function dc(e){return Array.isArray(e)?e:Xo(e)?[]:[e]}g(dc,"toArray");function uc(e,t){var r,i,s,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)s=a[r],e[s]=t[s];return e}g(uc,"extend");function pc(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(pc,"repeat");function gc(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(gc,"isNegativeZero");var Wy=Xo,zy=cc,Hy=dc,Yy=pc,Uy=gc,jy=uc,Dt={isNothing:Wy,isObject:zy,toArray:Hy,repeat:Yy,isNegativeZero:Uy,extend:jy};function Vo(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
`+n;for(h=gs(e.buffer,i[o],s[o],e.position,d),n+=Dt.repeat(" ",t.indent)+fs((e.line+1).toString(),c)+" | "+h.str+`
|
|
129
|
-
`,n+=Dt.repeat("-",t.indent+c+3+h.pos)+`^
|
|
130
|
-
`,l=1;l<=t.linesAfter&&!(o+l>=s.length);l++)h=gs(e.buffer,i[o+l],s[o+l],e.position-(i[o]-i[o+l]),d),n+=Dt.repeat(" ",t.indent)+fs((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
131
|
-
`;return n.replace(/\n$/,"")}g(fc,"makeSnippet");var Gy=fc,Xy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Vy=["scalar","sequence","mapping"];function mc(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(mc,"compileStyleAliases");function yc(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Xy.indexOf(r)===-1)throw new se('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=mc(t.styleAliases||null),Vy.indexOf(this.kind)===-1)throw new se('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(yc,"Type$1");var Xt=yc;function to(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(s=o)}),r[s]=i}),r}g(to,"compileList");function Cc(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Cc,"compileMap");function As(e){return this.extend(e)}g(As,"Schema$1");As.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Xt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new se("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new se("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new se("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Xt))throw new se("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(As.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=to(s,"implicit"),s.compiledExplicit=to(s,"explicit"),s.compiledTypeMap=Cc(s.compiledImplicit,s.compiledExplicit),s},"extend");var Zy=As,Ky=new Xt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),Qy=new Xt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),Jy=new Xt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),tC=new Zy({explicit:[Ky,Qy,Jy]});function xc(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(xc,"resolveYamlNull");function bc(){return null}g(bc,"constructYamlNull");function kc(e){return e===null}g(kc,"isNull");var eC=new Xt("tag:yaml.org,2002:null",{kind:"scalar",resolve:xc,construct:bc,predicate:kc,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Tc(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(Tc,"resolveYamlBoolean");function Sc(e){return e==="true"||e==="True"||e==="TRUE"}g(Sc,"constructYamlBoolean");function wc(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(wc,"isBoolean");var rC=new Xt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Tc,construct:Sc,predicate:wc,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Bc(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Bc,"isHexCode");function _c(e){return 48<=e&&e<=55}g(_c,"isOctCode");function vc(e){return 48<=e&&e<=57}g(vc,"isDecCode");function Lc(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Bc(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!_c(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!vc(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(Lc,"resolveYamlInteger");function Fc(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(Fc,"constructYamlInteger");function Ac(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Dt.isNegativeZero(e)}g(Ac,"isInteger");var iC=new Xt("tag:yaml.org,2002:int",{kind:"scalar",resolve:Lc,construct:Fc,predicate:Ac,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ec(e){return!(e===null||!sC.test(e)||e[e.length-1]==="_")}g(Ec,"resolveYamlFloat");function Mc(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Mc,"constructYamlFloat");var aC=/^[-+]?[0-9]+e/;function Oc(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Dt.isNegativeZero(e))return"-0.0";return r=e.toString(10),aC.test(r)?r.replace("e",".e"):r}g(Oc,"representYamlFloat");function $c(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Dt.isNegativeZero(e))}g($c,"isFloat");var oC=new Xt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ec,construct:Mc,predicate:$c,represent:Oc,defaultStyle:"lowercase"}),Ic=tC.extend({implicit:[eC,rC,iC,oC]}),nC=Ic,Dc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Pc=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 Rc(e){return e===null?!1:Dc.exec(e)!==null||Pc.exec(e)!==null}g(Rc,"resolveYamlTimestamp");function qc(e){var t,r,i,s,a,o,n,l=0,h=null,c,d,p;if(t=Dc.exec(e),t===null&&(t=Pc.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(a=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],d=+(t[11]||0),h=(c*60+d)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,a,o,n,l)),h&&p.setTime(p.getTime()-h),p}g(qc,"constructYamlTimestamp");function Nc(e){return e.toISOString()}g(Nc,"representYamlTimestamp");var lC=new Xt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Rc,construct:qc,instanceOf:Date,represent:Nc});function Wc(e){return e==="<<"||e===null}g(Wc,"resolveYamlMerge");var hC=new Xt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Wc}),Zo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
132
|
-
\r`;function zc(e){if(e===null)return!1;var t,r,i=0,s=e.length,a=Zo;for(r=0;r<s;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(zc,"resolveYamlBinary");function Hc(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=Zo,o=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}g(Hc,"constructYamlBinary");function Yc(e){var t="",r=0,i,s,a=e.length,o=Zo;for(i=0;i<a;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return s=a%3,s===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):s===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):s===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}g(Yc,"representYamlBinary");function Uc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(Uc,"isBinary");var cC=new Xt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:zc,construct:Hc,predicate:Uc,represent:Yc}),dC=Object.prototype.hasOwnProperty,uC=Object.prototype.toString;function jc(e){if(e===null)return!0;var t=[],r,i,s,a,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],o=!1,uC.call(s)!=="[object Object]")return!1;for(a in s)if(dC.call(s,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}g(jc,"resolveYamlOmap");function Gc(e){return e!==null?e:[]}g(Gc,"constructYamlOmap");var pC=new Xt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:jc,construct:Gc}),gC=Object.prototype.toString;function Xc(e){if(e===null)return!0;var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],gC.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;a[t]=[s[0],i[s[0]]]}return!0}g(Xc,"resolveYamlPairs");function Vc(e){if(e===null)return[];var t,r,i,s,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],s=Object.keys(i),a[t]=[s[0],i[s[0]]];return a}g(Vc,"constructYamlPairs");var fC=new Xt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Xc,construct:Vc}),mC=Object.prototype.hasOwnProperty;function Zc(e){if(e===null)return!0;var t,r=e;for(t in r)if(mC.call(r,t)&&r[t]!==null)return!1;return!0}g(Zc,"resolveYamlSet");function Kc(e){return e!==null?e:{}}g(Kc,"constructYamlSet");var yC=new Xt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Zc,construct:Kc}),Qc=nC.extend({implicit:[lC,hC],explicit:[cC,pC,fC,yC]}),er=Object.prototype.hasOwnProperty,Es=1,Jc=2,td=3,Ms=4,Oa=1,CC=2,wl=3,xC=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bC=/[\x85\u2028\u2029]/,kC=/[,\[\]\{\}]/,ed=/^(?:!|!!|![a-z\-]+!)$/i,rd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function eo(e){return Object.prototype.toString.call(e)}g(eo,"_class");function Ce(e){return e===10||e===13}g(Ce,"is_EOL");function Je(e){return e===9||e===32}g(Je,"is_WHITE_SPACE");function Jt(e){return e===9||e===32||e===10||e===13}g(Jt,"is_WS_OR_EOL");function ur(e){return e===44||e===91||e===93||e===123||e===125}g(ur,"is_FLOW_INDICATOR");function id(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(id,"fromHexCode");function sd(e){return e===120?2:e===117?4:e===85?8:0}g(sd,"escapedHexLen");function ad(e){return 48<=e&&e<=57?e-48:-1}g(ad,"fromDecimalCode");function ro(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
133
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(ro,"simpleEscapeSequence");function od(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(od,"charFromCodepoint");function Ko(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(Ko,"setProperty");var nd=new Array(256),ld=new Array(256);for(lr=0;lr<256;lr++)nd[lr]=ro(lr)?1:0,ld[lr]=ro(lr);var lr;function hd(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Qc,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(hd,"State$1");function Qo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Gy(r),new se(t,r)}g(Qo,"generateError");function rt(e,t){throw Qo(e,t)}g(rt,"throwError");function $i(e,t){e.onWarning&&e.onWarning.call(null,Qo(e,t))}g($i,"throwWarning");var Bl={YAML:g(function(t,r,i){var s,a,o;t.version!==null&&rt(t,"duplication of %YAML directive"),i.length!==1&&rt(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&rt(t,"ill-formed argument of the YAML directive"),a=parseInt(s[1],10),o=parseInt(s[2],10),a!==1&&rt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&$i(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,a;i.length!==2&&rt(t,"TAG directive accepts exactly two arguments"),s=i[0],a=i[1],ed.test(s)||rt(t,"ill-formed tag handle (first argument) of the TAG directive"),er.call(t.tagMap,s)&&rt(t,'there is a previously declared suffix for "'+s+'" tag handle'),rd.test(a)||rt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{rt(t,"tag prefix is malformed: "+a)}t.tagMap[s]=a},"handleTagDirective")};function qe(e,t,r,i){var s,a,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,a=n.length;s<a;s+=1)o=n.charCodeAt(s),o===9||32<=o&&o<=1114111||rt(e,"expected valid JSON character");else xC.test(n)&&rt(e,"the stream contains non-printable characters");e.result+=n}}g(qe,"captureSegment");function io(e,t,r,i){var s,a,o,n;for(Dt.isObject(r)||rt(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),o=0,n=s.length;o<n;o+=1)a=s[o],er.call(t,a)||(Ko(t,a,r[a]),i[a]=!0)}g(io,"mergeMappings");function pr(e,t,r,i,s,a,o,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&rt(e,"nested arrays are not supported inside keys"),typeof s=="object"&&eo(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&eo(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)io(e,t,a[h],r);else io(e,t,a,r);else!e.json&&!er.call(r,s)&&er.call(t,s)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,rt(e,"duplicated mapping key")),Ko(t,s,a),delete r[s];return t}g(pr,"storeMappingPair");function Ks(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):rt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Ks,"readLineBreak");function At(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Je(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(Ce(s))for(Ks(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&$i(e,"deficient indentation"),i}g(At,"skipSeparationSpace");function Hi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Jt(r)))}g(Hi,"testDocumentSeparator");function Qs(e,t){t===1?e.result+=" ":t>1&&(e.result+=Dt.repeat(`
|
|
134
|
-
`,t-1))}g(Qs,"writeFoldedLines");function cd(e,t,r){var i,s,a,o,n,l,h,c,d=e.kind,p=e.result,u;if(u=e.input.charCodeAt(e.position),Jt(u)||ur(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),Jt(s)||r&&ur(s)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),Jt(s)||r&&ur(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Jt(i))break}else{if(e.position===e.lineStart&&Hi(e)||r&&ur(u))break;if(Ce(u))if(l=e.line,h=e.lineStart,c=e.lineIndent,At(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(qe(e,a,o,!1),Qs(e,e.line-l),a=o=e.position,n=!1),Je(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return qe(e,a,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}g(cd,"readPlainScalar");function dd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(qe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else Ce(r)?(qe(e,i,s,!0),Qs(e,At(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Hi(e)?rt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);rt(e,"unexpected end of the stream within a single quoted scalar")}g(dd,"readSingleQuotedScalar");function ud(e,t){var r,i,s,a,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return qe(e,r,e.position,!0),e.position++,!0;if(n===92){if(qe(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Ce(n))At(e,!1,t);else if(n<256&&nd[n])e.result+=ld[n],e.position++;else if((o=sd(n))>0){for(s=o,a=0;s>0;s--)n=e.input.charCodeAt(++e.position),(o=id(n))>=0?a=(a<<4)+o:rt(e,"expected hexadecimal character");e.result+=od(a),e.position++}else rt(e,"unknown escape sequence");r=i=e.position}else Ce(n)?(qe(e,r,i,!0),Qs(e,At(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Hi(e)?rt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}rt(e,"unexpected end of the stream within a double quoted scalar")}g(ud,"readDoubleQuotedScalar");function pd(e,t){var r=!0,i,s,a,o=e.tag,n,l=e.anchor,h,c,d,p,u,y=Object.create(null),f,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,u=!1,n=[];else if(b===123)c=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(At(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=o,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&rt(e,"expected the node content, but found ','"):rt(e,"missed comma between flow collection entries"),m=f=C=null,d=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Jt(h)&&(d=p=!0,e.position++,At(e,!0,t))),i=e.line,s=e.lineStart,a=e.position,yr(e,t,Es,!1,!0),m=e.tag,f=e.result,At(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),At(e,!0,t),yr(e,t,Es,!1,!0),C=e.result),u?pr(e,n,y,m,f,C,i,s,a):d?n.push(pr(e,null,y,m,f,C,i,s,a)):n.push(f),At(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}rt(e,"unexpected end of the stream within a flow collection")}g(pd,"readFlowCollection");function gd(e,t){var r,i,s=Oa,a=!1,o=!1,n=t,l=0,h=!1,c,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Oa===s?s=d===43?wl:CC:rt(e,"repeat of a chomping mode identifier");else if((c=ad(d))>=0)c===0?rt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?rt(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(Je(d)){do d=e.input.charCodeAt(++e.position);while(Je(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ce(d)&&d!==0)}for(;d!==0;){for(Ks(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),Ce(d)){l++;continue}if(e.lineIndent<n){s===wl?e.result+=Dt.repeat(`
|
|
135
|
-
`,a?1+l:l):s===Oa&&a&&(e.result+=`
|
|
136
|
-
`);break}for(i?Je(d)?(h=!0,e.result+=Dt.repeat(`
|
|
137
|
-
`,a?1+l:l)):h?(h=!1,e.result+=Dt.repeat(`
|
|
138
|
-
`,l+1)):l===0?a&&(e.result+=" "):e.result+=Dt.repeat(`
|
|
139
|
-
`,l):e.result+=Dt.repeat(`
|
|
140
|
-
`,a?1+l:l),a=!0,o=!0,l=0,r=e.position;!Ce(d)&&d!==0;)d=e.input.charCodeAt(++e.position);qe(e,r,e.position,!1)}return!0}g(gd,"readBlockScalar");function so(e,t){var r,i=e.tag,s=e.anchor,a=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!Jt(o))));){if(n=!0,e.position++,At(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,yr(e,t,td,!1,!0),a.push(e.result),At(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)rt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=a,!0):!1}g(so,"readBlockSequence");function fd(e,t,r){var i,s,a,o,n,l,h=e.tag,c=e.anchor,d={},p=Object.create(null),u=null,y=null,f=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,rt(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&Jt(i))b===63?(m&&(pr(e,d,p,u,y,null,o,n,l),u=y=f=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):rt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(o=e.line,n=e.lineStart,l=e.position,!yr(e,r,Jc,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Je(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Jt(b)||rt(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(pr(e,d,p,u,y,null,o,n,l),u=y=f=null),C=!0,m=!1,s=!1,u=e.tag,y=e.result;else if(C)rt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)rt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===a||e.lineIndent>t)&&(m&&(o=e.line,n=e.lineStart,l=e.position),yr(e,t,Ms,!0,s)&&(m?y=e.result:f=e.result),m||(pr(e,d,p,u,y,f,o,n,l),u=y=f=null),At(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)rt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&pr(e,d,p,u,y,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=d),C}g(fd,"readBlockMapping");function md(e){var t,r=!1,i=!1,s,a,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&rt(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,s="!!",o=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):rt(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Jt(o);)o===33&&(i?rt(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),ed.test(s)||rt(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),kC.test(a)&&rt(e,"tag suffix cannot contain flow indicator characters")}a&&!rd.test(a)&&rt(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{rt(e,"tag name is malformed: "+a)}return r?e.tag=a:er.call(e.tagMap,s)?e.tag=e.tagMap[s]+a:s==="!"?e.tag="!"+a:s==="!!"?e.tag="tag:yaml.org,2002:"+a:rt(e,'undeclared tag handle "'+s+'"'),!0}g(md,"readTagProperty");function yd(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&rt(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Jt(r)&&!ur(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(yd,"readAnchorProperty");function Cd(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Jt(i)&&!ur(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&rt(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),er.call(e.anchorMap,r)||rt(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],At(e,!0,-1),!0}g(Cd,"readAlias");function yr(e,t,r,i,s){var a,o,n,l=1,h=!1,c=!1,d,p,u,y,f,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=n=Ms===r||td===r,i&&At(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;md(e)||yd(e);)At(e,!0,-1)?(h=!0,n=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||Ms===r)&&(Es===r||Jc===r?f=t:f=t+1,m=e.position-e.lineStart,l===1?n&&(so(e,m)||fd(e,m,f))||pd(e,f)?c=!0:(o&&gd(e,f)||dd(e,f)||ud(e,f)?c=!0:Cd(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&rt(e,"alias node should not have any properties")):cd(e,f,Es===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&so(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&rt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d<p;d+=1)if(y=e.implicitTypes[d],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(er.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,p=u.length;d<p;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){y=u[d];break}y||rt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&rt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):rt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}g(yr,"composeNode");function xd(e){var t=e.position,r,i,s,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(At(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&rt(e,"directive name must not be less than one character in length");o!==0;){for(;Je(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Ce(o));break}if(Ce(o))break;for(r=e.position;o!==0&&!Jt(o);)o=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}o!==0&&Ks(e),er.call(Bl,i)?Bl[i](e,i,s):$i(e,'unknown document directive "'+i+'"')}if(At(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,At(e,!0,-1)):a&&rt(e,"directives end mark is expected"),yr(e,e.lineIndent-1,Ms,!1,!0),At(e,!0,-1),e.checkLineBreaks&&bC.test(e.input.slice(t,e.position))&&$i(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Hi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,At(e,!0,-1));return}if(e.position<e.length-1)rt(e,"end of the stream or a document separator is expected");else return}g(xd,"readDocument");function Jo(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
141
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new hd(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,rt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)xd(r);return r.documents}g(Jo,"loadDocuments");function TC(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Jo(e,r);if(typeof t!="function")return i;for(var s=0,a=i.length;s<a;s+=1)t(i[s])}g(TC,"loadAll$1");function bd(e,t){var r=Jo(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new se("expected a single document in the stream, but found more")}}g(bd,"load$1");var SC=bd,wC={load:SC},kd=Object.prototype.toString,Td=Object.prototype.hasOwnProperty,tn=65279,BC=9,Ii=10,_C=13,vC=32,LC=33,FC=34,ao=35,AC=37,EC=38,MC=39,OC=42,Sd=44,$C=45,Os=58,IC=61,DC=62,PC=63,RC=64,wd=91,Bd=93,qC=96,_d=123,NC=124,vd=125,Vt={};Vt[0]="\\0";Vt[7]="\\a";Vt[8]="\\b";Vt[9]="\\t";Vt[10]="\\n";Vt[11]="\\v";Vt[12]="\\f";Vt[13]="\\r";Vt[27]="\\e";Vt[34]='\\"';Vt[92]="\\\\";Vt[133]="\\N";Vt[160]="\\_";Vt[8232]="\\L";Vt[8233]="\\P";var WC=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],zC=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Ld(e,t){var r,i,s,a,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,a=i.length;s<a;s+=1)o=i[s],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Td.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}g(Ld,"compileStyleMap");function Fd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new se("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Dt.repeat("0",i-t.length)+t}g(Fd,"encodeHex");var HC=1,Di=2;function Ad(e){this.schema=e.schema||Qc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Dt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Ld(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Di:HC,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Ad,"State");function oo(e,t){for(var r=Dt.repeat(" ",t),i=0,s=-1,a="",o,n=e.length;i<n;)s=e.indexOf(`
|
|
142
|
-
`,i),s===-1?(o=e.slice(i),i=n):(o=e.slice(i,s+1),i=s+1),o.length&&o!==`
|
|
143
|
-
`&&(a+=r),a+=o;return a}g(oo,"indentString");function $s(e,t){return`
|
|
144
|
-
`+Dt.repeat(" ",e.indent*t)}g($s,"generateNextLine");function Ed(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(Ed,"testImplicitResolving");function Pi(e){return e===vC||e===BC}g(Pi,"isWhitespace");function ri(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==tn||65536<=e&&e<=1114111}g(ri,"isPrintable");function no(e){return ri(e)&&e!==tn&&e!==_C&&e!==Ii}g(no,"isNsCharOrWhitespace");function lo(e,t,r){var i=no(e),s=i&&!Pi(e);return(r?i:i&&e!==Sd&&e!==wd&&e!==Bd&&e!==_d&&e!==vd)&&e!==ao&&!(t===Os&&!s)||no(t)&&!Pi(t)&&e===ao||t===Os&&s}g(lo,"isPlainSafe");function Md(e){return ri(e)&&e!==tn&&!Pi(e)&&e!==$C&&e!==PC&&e!==Os&&e!==Sd&&e!==wd&&e!==Bd&&e!==_d&&e!==vd&&e!==ao&&e!==EC&&e!==OC&&e!==LC&&e!==NC&&e!==IC&&e!==DC&&e!==MC&&e!==FC&&e!==AC&&e!==RC&&e!==qC}g(Md,"isPlainSafeFirst");function Od(e){return!Pi(e)&&e!==Os}g(Od,"isPlainSafeLast");function Ir(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Ir,"codePointAt");function en(e){var t=/^\n* /;return t.test(e)}g(en,"needIndentIndicator");var $d=1,ho=2,Id=3,Dd=4,Mr=5;function Pd(e,t,r,i,s,a,o,n){var l,h=0,c=null,d=!1,p=!1,u=i!==-1,y=-1,f=Md(Ir(e,0))&&Od(Ir(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Ir(e,l),!ri(h))return Mr;f=f&&lo(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Ir(e,l),h===Ii)d=!0,u&&(p=p||l-y-1>i&&e[y+1]!==" ",y=l);else if(!ri(h))return Mr;f=f&&lo(h,c,n),c=h}p=p||u&&l-y-1>i&&e[y+1]!==" "}return!d&&!p?f&&!o&&!s(e)?$d:a===Di?Mr:ho:r>9&&en(e)?Mr:o?a===Di?Mr:ho:p?Dd:Id}g(Pd,"chooseScalarStyle");function Rd(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Di?'""':"''";if(!e.noCompatMode&&(WC.indexOf(t)!==-1||zC.test(t)))return e.quotingType===Di?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return Ed(e,h)}switch(g(l,"testAmbiguity"),Pd(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,s)){case $d:return t;case ho:return"'"+t.replace(/'/g,"''")+"'";case Id:return"|"+co(t,e.indent)+uo(oo(t,a));case Dd:return">"+co(t,e.indent)+uo(oo(qd(t,o),a));case Mr:return'"'+Nd(t)+'"';default:throw new se("impossible error: invalid scalar style")}})()}g(Rd,"writeScalar");function co(e,t){var r=en(e)?String(t):"",i=e[e.length-1]===`
|
|
145
|
-
`,s=i&&(e[e.length-2]===`
|
|
146
|
-
`||e===`
|
|
147
|
-
`),a=s?"+":i?"":"-";return r+a+`
|
|
148
|
-
`}g(co,"blockHeader");function uo(e){return e[e.length-1]===`
|
|
149
|
-
`?e.slice(0,-1):e}g(uo,"dropEndingNewline");function qd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
|
|
150
|
-
`);return h=h!==-1?h:e.length,r.lastIndex=h,po(e.slice(0,h),t)})(),s=e[0]===`
|
|
151
|
-
`||e[0]===" ",a,o;o=r.exec(e);){var n=o[1],l=o[2];a=l[0]===" ",i+=n+(!s&&!a&&l!==""?`
|
|
152
|
-
`:"")+po(l,t),s=a}return i}g(qd,"foldString");function po(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,a,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(a=o>s?o:n,l+=`
|
|
153
|
-
`+e.slice(s,a),s=a+1),o=n;return l+=`
|
|
154
|
-
`,e.length-s>t&&o>s?l+=e.slice(s,o)+`
|
|
155
|
-
`+e.slice(o+1):l+=e.slice(s),l.slice(1)}g(po,"foldLine");function Nd(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Ir(e,s),i=Vt[r],!i&&ri(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Fd(r);return t}g(Nd,"escapeString");function Wd(e,t,r){var i="",s=e.tag,a,o,n;for(a=0,o=r.length;a<o;a+=1)n=r[a],e.replacer&&(n=e.replacer.call(r,String(a),n)),(Ee(e,t,n,!1,!1)||typeof n>"u"&&Ee(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(Wd,"writeFlowSequence");function go(e,t,r,i){var s="",a=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Ee(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ee(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=$s(e,t)),e.dump&&Ii===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=a,e.dump=s||"[]"}g(go,"writeBlockSequence");function zd(e,t,r){var i="",s=e.tag,a=Object.keys(r),o,n,l,h,c;for(o=0,n=a.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=a[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Ee(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ee(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}g(zd,"writeFlowMapping");function Hd(e,t,r,i){var s="",a=e.tag,o=Object.keys(r),n,l,h,c,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new se("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=$s(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Ee(e,t+1,h,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Ii===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=$s(e,t)),Ee(e,t+1,c,!0,d)&&(e.dump&&Ii===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=a,e.dump=s||"{}"}g(Hd,"writeBlockMapping");function fo(e,t,r){var i,s,a,o,n,l;for(s=r?e.explicitTypes:e.implicitTypes,a=0,o=s.length;a<o;a+=1)if(n=s[a],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,kd.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Td.call(n.represent,l))i=n.represent[l](t,l);else throw new se("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(fo,"detectType");function Ee(e,t,r,i,s,a,o){e.tag=null,e.dump=r,fo(e,r,!1)||fo(e,r,!0);var n=kd.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",d,p;if(c&&(d=e.duplicates.indexOf(r),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(c&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(Hd(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(zd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?go(e,t-1,e.dump,s):go(e,t,e.dump,s),p&&(e.dump="&ref_"+d+e.dump)):(Wd(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Rd(e,e.dump,t,a,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new se("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}g(Ee,"writeNode");function Yd(e,t){var r=[],i=[],s,a;for(Is(e,r,i),s=0,a=i.length;s<a;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(a)}g(Yd,"getDuplicateReferences");function Is(e,t,r){var i,s,a;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,a=e.length;s<a;s+=1)Is(e[s],t,r);else for(i=Object.keys(e),s=0,a=i.length;s<a;s+=1)Is(e[i[s]],t,r)}g(Is,"inspectNode");function YC(e,t){t=t||{};var r=new Ad(t);r.noRefs||Yd(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ee(r,0,i,!0,!0)?r.dump+`
|
|
156
|
-
`:""}g(YC,"dump$1");function UC(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(UC,"renamed");var jC=Ic,GC=wC.load;/*! Bundled license information:
|
|
157
|
-
|
|
158
|
-
js-yaml/dist/js-yaml.mjs:
|
|
159
|
-
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
160
|
-
*/var fi=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Gt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},_l={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Si(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Bt(e),t=Bt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}g(Si,"calculateDeltaAndAngle");var Bt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),XC=g(e=>({x:g(function(t,r,i){let s=0;const a=Bt(i[0]).x<Bt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaX:y}=Si(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.cos(u)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaX:y}=Si(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.cos(u)*(y>=0?1:-1)}const o=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),n=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),l=Math.abs(Bt(t).x-Bt(i[0]).x),h=Math.abs(Bt(t).y-Bt(i[0]).y),c=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=a==="right"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+p-l;u*=a==="right"?-1:1,s+=u}return Bt(t).x+s},"x"),y:g(function(t,r,i){let s=0;const a=Bt(i[0]).y<Bt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaY:y}=Si(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaY:y}=Si(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(y>=0?1:-1)}const o=Math.abs(Bt(t).y-Bt(i[i.length-1]).y),n=Math.abs(Bt(t).x-Bt(i[i.length-1]).x),l=Math.abs(Bt(t).y-Bt(i[0]).y),h=Math.abs(Bt(t).x-Bt(i[0]).x),c=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],p=1;if(o<d&&o>0&&n<d){let u=d+p-o;u*=a==="up"?-1:1,s-=u}if(l<c&&l>0&&h<c){let u=c+p-l;u*=a==="up"?-1:1,s+=u}return Bt(t).y+s},"y")}),"getLineFunctionsWithOffset"),rs={},$t={},vl;function VC(){return vl||(vl=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.BLANK_URL=$t.relativeFirstCharacters=$t.whitespaceEscapeCharsRegex=$t.urlSchemeRegex=$t.ctrlCharactersRegex=$t.htmlCtrlEntityRegex=$t.htmlEntitiesRegex=$t.invalidProtocolRegex=void 0,$t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$t.htmlCtrlEntityRegex=/&(newline|tab);/gi,$t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$t.urlSchemeRegex=/^.+(:|:)/gim,$t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$t.relativeFirstCharacters=[".","/"],$t.BLANK_URL="about:blank"),$t}var Ll;function ZC(){if(Ll)return rs;Ll=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.sanitizeUrl=a;var e=VC();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,h){return String.fromCharCode(h)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var h=l;if(!h)return e.BLANK_URL;if(t(h))return h;var c=h.trimStart(),d=c.match(e.urlSchemeRegex);if(!d)return h;var p=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var u=c.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return u;if(p==="http:"||p==="https:"){if(!i(u))return e.BLANK_URL;var y=new URL(u);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return u}return rs}var KC=ZC();function $a(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function QC(){}function Ud(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function rn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const JC="[object RegExp]",jd="[object String]",Gd="[object Number]",Xd="[object Boolean]",Vd="[object Arguments]",t0="[object Symbol]",e0="[object Date]",r0="[object Map]",i0="[object Set]",s0="[object Array]",a0="[object ArrayBuffer]",o0="[object Object]",n0="[object DataView]",l0="[object Uint8Array]",h0="[object Uint8ClampedArray]",c0="[object Uint16Array]",d0="[object Uint32Array]",u0="[object Int8Array]",p0="[object Int16Array]",g0="[object Int32Array]",f0="[object Float32Array]",m0="[object Float64Array]",Fl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function sn(e){return typeof Fl.Buffer<"u"&&Fl.Buffer.isBuffer(e)}function y0(e){return Number.isSafeInteger(e)&&e>=0}function Zd(e){return e!=null&&typeof e!="function"&&y0(e.length)}function C0(e){return e==="__proto__"}function an(e){return e==null||typeof e!="object"&&typeof e!="function"}function on(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function x0(e,t){return Dr(e,void 0,e,new Map,t)}function Dr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(an(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Dr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Dr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Dr(n,void 0,r,i,s));return o}if(sn(e))return e.subarray();if(on(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Dr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),ge(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,ge(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),ge(o,e,r,i,s),o}if(typeof e=="object"&&b0(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),ge(o,e,r,i,s),o}return e}function ge(e,t,r=e,i,s){const a=[...Object.keys(t),...Ud(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Dr(t[n],n,r,i,s))}}function b0(e){switch(rn(e)){case Vd:case s0:case a0:case n0:case Xd:case e0:case f0:case m0:case u0:case p0:case g0:case r0:case Gd:case o0:case JC:case i0:case jd:case t0:case l0:case h0:case c0:case d0:return!0;default:return!1}}function k0(e,t){return x0(e,(r,i,s,a)=>{if(typeof e=="object"){if(rn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),ge(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Gd:case jd:case Xd:{const o=new e.constructor(e==null?void 0:e.valueOf());return ge(o,e),o}case Vd:{const o={};return ge(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Al(e){return k0(e)}function mo(e){return e!==null&&typeof e=="object"&&rn(e)==="[object Arguments]"}function yo(e){return typeof e=="object"&&e!==null}function T0(e){return yo(e)&&Zd(e)}function Yi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Yi.Cache||Map),r}Yi.Cache=Map;function ms(e){return on(e)}function S0(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function w0(e){if(an(e))return e;if(Array.isArray(e)||on(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function B0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=ys(s,o,i,new Map)}return s}function ys(e,t,r,i){if(an(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return w0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...Ud(t)];for(let a=0;a<s.length;a++){const o=s[a];if(C0(o))continue;let n=t[o],l=e[o];if(mo(n)&&(n={...n}),mo(l)&&(l={...l}),sn(n)&&(n=Al(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],d=Reflect.ownKeys(l);for(let p=0;p<d.length;p++){const u=d[p];c[u]=l[u]}l=c}else if(T0(l)){const c=[];for(let d=0;d<l.length;d++)c[d]=l[d];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||yo(l)&&yo(n)&&($a(l)||$a(n)||ms(l)||ms(n))?e[o]=ys(l,n,r,i):l==null&&$a(n)?e[o]=ys({},n,r,i):l==null&&ms(n)?e[o]=Al(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function _0(e,...t){return B0(e,...t,QC)}function El(e){if(e==null)return!0;if(Zd(e))return typeof e.splice!="function"&&typeof e!="string"&&!sn(e)&&!ms(e)&&!mo(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return S0(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var v0="",L0={curveBasis:Ua,curveBasisClosed:Df,curveBasisOpen:Pf,curveBumpX:bh,curveBumpY:xh,curveBundle:Rf,curveCardinalClosed:qf,curveCardinalOpen:Nf,curveCardinal:Bh,curveCatmullRomClosed:Wf,curveCatmullRomOpen:zf,curveCatmullRom:vh,curveLinear:vi,curveLinearClosed:Hf,curveMonotoneX:Oh,curveMonotoneY:$h,curveNatural:Dh,curveStep:Ph,curveStepAfter:qh,curveStepBefore:Rh},F0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,A0=g(function(e,t){const r=Kd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Bs(o),i=It(i,[...o])}else i=r.args;if(!i)return;let s=zo(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Kd=g(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${F0.source})(?=[}][%]{2}).*
|
|
161
|
-
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Fi.exec(e))!==null;)if(a.index===Fi.lastIndex&&Fi.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return W.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),E0=g(function(e){return e.replace(Fi,"")},"removeDirectives"),M0=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function nn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return L0[r]??t}g(nn,"interpolateToCurve");function Qd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?KC.sanitizeUrl(r):r}g(Qd,"formatUrl");var O0=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){W.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function ln(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(ln,"distance");function Jd(e){let t,r=0;e.forEach(s=>{r+=ln(s,t),t=s});const i=r/2;return hn(e,i)}g(Jd,"traverseEdge");function tu(e){return e.length===1?e[0]:Jd(e)}g(tu,"calcLabelPosition");var Ml=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),hn=g((e,t)=>{let r,i=t;for(const s of e){if(r){const a=ln(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Ml((1-o)*r.x+o*s.x,5),y:Ml((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),$0=g((e,t,r)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=hn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function eu(e,t,r){const i=structuredClone(r);W.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=hn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}g(eu,"calcTerminalLabelPosition");function ru(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(ru,"getStylesFromArray");var Ol=0,I0=g(()=>(Ol++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ol),"generateId");function iu(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(iu,"makeRandomHex");var D0=g(e=>iu(e.length),"random"),P0=g(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"),R0=g(function(e,t){const r=t.text.replace(zi.lineBreakRegex," "),[,i]=Js(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),q0=Yi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),zi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ne(`${o} `,r),h=Ne(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:u}=N0(o,t,"-",r);s.push(a,...p),a=u}else h+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),N0=Yi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const h=`${o}${n}`;if(Ne(h,i)>=t){const d=l+1,p=s.length===d,u=`${h}${r}`;a.push(p?h:u),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function su(e,t){return cn(e,t).height}g(su,"calculateTextHeight");function Ne(e,t){return cn(e,t).width}g(Ne,"calculateTextWidth");var cn=Yi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Js(r),o=["sans-serif",i],n=e.split(zi.lineBreakRegex),l=[],h=ht("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of o){let u=0;const y={width:0,height:0,lineHeight:0};for(const f of n){const m=P0();m.text=f||v0;const C=R0(c,m).style("font-size",a).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),u=Math.round(b.height),y.height+=u,y.lineHeight=Math.round(Math.max(y.lineHeight,u))}l.push(y)}c.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Qr,W0=(Qr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Qr,"InitIDGenerator"),Qr),is,z0=g(function(e){return is=is||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),is.innerHTML=e,unescape(is.textContent)},"entityDecode");function dn(e){return"str"in e}g(dn,"isDetailedError");var H0=g((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Js=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function un(e,t){return _0({},e,t)}g(un,"cleanAndMerge");var ye={assignWithDepth:It,wrapLabel:q0,calculateTextHeight:su,calculateTextWidth:Ne,calculateTextDimensions:cn,cleanAndMerge:un,detectInit:A0,detectDirective:Kd,isSubstringInArray:M0,interpolateToCurve:nn,calcLabelPosition:tu,calcCardinalityPosition:$0,calcTerminalLabelPosition:eu,formatUrl:Qd,getStylesFromArray:ru,generateId:I0,random:D0,runFunc:O0,entityDecode:z0,insertTitle:H0,isLabelCoordinateInPath:au,parseFontSize:Js,InitIDGenerator:W0},Y0=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Cr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tS=g((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function qt(e){return e??null}g(qt,"handleUndefinedAttr");function au(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(au,"isLabelCoordinateInPath");var pn=g(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function ou(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(a=>{function o(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Kh.fontSize]=Js(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";a(s)}g(o,"setupImage"),setTimeout(()=>{s.complete&&o()}),s.addEventListener("error",o),s.addEventListener("load",o)})))}g(ou,"configureLabelImages");var U0=g(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ai=g(e=>{const t=j0([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),j0=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),nu=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Q=g(e=>{const{stylesArray:t}=ai(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];nu(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),K=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=ai(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:G0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),G0=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const X0=Object.freeze({left:0,top:0,width:16,height:16}),Ds=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),lu=Object.freeze({...X0,...Ds}),V0=Object.freeze({...lu,body:"",hidden:!1}),Z0=Object.freeze({width:null,height:null}),K0=Object.freeze({...Z0,...Ds}),Q0=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return Ia(h)?h:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Ia(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return Ia(n,r)?n:null}return null},Ia=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function J0(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function $l(e,t){const r=J0(e,t);for(const i in V0)i in Ds?i in e&&!(i in r)&&(r[i]=Ds[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function tx(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Il(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=$l(i[n]||s[n],a)}return o(t),r.forEach(o),$l(e,a)}function ex(e,t){if(e.icons[t])return Il(e,t,[]);const r=tx(e,[t])[t];return r?Il(e,t,r):null}const rx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ix=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Dl(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(rx);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=ix.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function sx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function ax(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ox(e,t,r){const i=sx(e);return ax(i.defs,t+i.content+r)}const nx=e=>e==="unset"||e==="undefined"||e==="none";function lx(e,t){const r={...lu,...e},i={...K0,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(f=>{const m=[],C=f.hFlip,b=f.vFlip;let k=f.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=s.height/2+s.top,m.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,m.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),m.length&&(a=ox(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,h=s.height;let c,d;o===null?(d=n===null?"1em":n==="auto"?h:n,c=Dl(d,l/h)):(c=o==="auto"?l:o,d=n===null?Dl(c,h/l):n==="auto"?h:n);const p={},u=(f,m)=>{nx(m)||(p[f]=m.toString())};u("width",c),u("height",d);const y=[s.left,s.top,l,h];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:a}}const hx=/\sid="(\S+)"/g,Pl=new Map;function cx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Pl.get(e)||0;return Pl.set(e,t+1),t?`${e}${t}`:e}function dx(e){const t=[];let r;for(;r=hx.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=cx(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function ux(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function gn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var kr=gn();function hu(e){kr=e}var Ei={exec:()=>null};function bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(te.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var px=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),te={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},gx=/^(?:[ \t]*(?:\n|$))+/,fx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ui=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fn=/(?:[*+-]|\d{1,9}[.)])/,cu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,du=bt(cu).replace(/bull/g,fn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Cx=bt(cu).replace(/bull/g,fn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),mn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xx=/^[^\n]+/,yn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,bx=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",yn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),kx=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fn).getRegex(),ta="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",Cn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Tx=bt("^ {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",Cn).replace("tag",ta).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uu=bt(mn).replace("hr",Ui).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",ta).getRegex(),Sx=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",uu).getRegex(),xn={blockquote:Sx,code:fx,def:bx,fences:mx,heading:yx,hr:Ui,html:Tx,lheading:du,list:kx,newline:gx,paragraph:uu,table:Ei,text:xx},Rl=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ui).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ta).getRegex(),wx={...xn,lheading:Cx,table:Rl,paragraph:bt(mn).replace("hr",Ui).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Rl).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",ta).getRegex()},Bx={...xn,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cn).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:Ei,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(mn).replace("hr",Ui).replace("heading",` *#{1,6} *[^
|
|
162
|
-
]`).replace("lheading",du).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_x=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,vx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pu=/^( {2,}|\\)\n(?!\s*$)/,Lx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ea=/[\p{P}\p{S}]/u,bn=/[\s\p{P}\p{S}]/u,gu=/[^\s\p{P}\p{S}]/u,Fx=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,bn).getRegex(),fu=/(?!~)[\p{P}\p{S}]/u,Ax=/(?!~)[\s\p{P}\p{S}]/u,Ex=/(?:[^\s\p{P}\p{S}]|~)/u,Mx=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",px?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),mu=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ox=bt(mu,"u").replace(/punct/g,ea).getRegex(),$x=bt(mu,"u").replace(/punct/g,fu).getRegex(),yu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ix=bt(yu,"gu").replace(/notPunctSpace/g,gu).replace(/punctSpace/g,bn).replace(/punct/g,ea).getRegex(),Dx=bt(yu,"gu").replace(/notPunctSpace/g,Ex).replace(/punctSpace/g,Ax).replace(/punct/g,fu).getRegex(),Px=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gu).replace(/punctSpace/g,bn).replace(/punct/g,ea).getRegex(),Rx=bt(/\\(punct)/,"gu").replace(/punct/g,ea).getRegex(),qx=bt(/^<(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(),Nx=bt(Cn).replace("(?:-->|$)","-->").getRegex(),Wx=bt("^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",Nx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ps=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,zx=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ps).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cu=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ps).replace("ref",yn).getRegex(),xu=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",yn).getRegex(),Hx=bt("reflink|nolink(?!\\()","g").replace("reflink",Cu).replace("nolink",xu).getRegex(),ql=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,kn={_backpedal:Ei,anyPunctuation:Rx,autolink:qx,blockSkip:Mx,br:pu,code:vx,del:Ei,emStrongLDelim:Ox,emStrongRDelimAst:Ix,emStrongRDelimUnd:Px,escape:_x,link:zx,nolink:xu,punctuation:Fx,reflink:Cu,reflinkSearch:Hx,tag:Wx,text:Lx,url:Ei},Yx={...kn,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ps).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ps).getRegex()},Co={...kn,emStrongRDelimAst:Dx,emStrongLDelim:$x,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ql).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ql).getRegex()},Ux={...Co,br:bt(pu).replace("{2,}","*").getRegex(),text:bt(Co.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ss={normal:xn,gfm:wx,pedantic:Bx},mi={normal:kn,gfm:Co,breaks:Ux,pedantic:Yx},jx={"&":"&","<":"<",">":">",'"':""","'":"'"},Nl=e=>jx[e];function ve(e,t){if(t){if(te.escapeTest.test(e))return e.replace(te.escapeReplace,Nl)}else if(te.escapeTestNoEncode.test(e))return e.replace(te.escapeReplaceNoEncode,Nl);return e}function Wl(e){try{e=encodeURI(e).replace(te.percentDecode,"%")}catch{return null}return e}function zl(e,t){var a;let r=e.replace(te.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(te.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(te.slashPipe,"|");return i}function yi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Gx(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Hl(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Xx(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
127
|
+
`},"getStyles"),v0=f((e,t)=>{t!==void 0&&(ea[e]=t)},"addStylesForDiagram"),L0=B0,Pd={};Ny(Pd,{clear:()=>F0,getAccDescription:()=>O0,getAccTitle:()=>A0,getDiagramTitle:()=>D0,setAccDescription:()=>M0,setAccTitle:()=>E0,setDiagramTitle:()=>$0});var jn="",Yn="",Un="",Gn=f(e=>ze(e,te()),"sanitizeText"),F0=f(()=>{jn="",Un="",Yn=""},"clear"),E0=f(e=>{jn=Gn(e).replace(/^\s+/g,"")},"setAccTitle"),A0=f(()=>jn,"getAccTitle"),M0=f(e=>{Un=Gn(e).replace(/\n\s+/g,`
|
|
128
|
+
`)},"setAccDescription"),O0=f(()=>Un,"getAccDescription"),$0=f(e=>{Yn=Gn(e)},"setDiagramTitle"),D0=f(()=>Yn,"getDiagramTitle"),jh=W,P0=Wn,zt=te,FL=_d,EL=Di,Xn=f(e=>ze(e,zt()),"sanitizeText"),I0=_0,R0=f(()=>Pd,"getCommonDb"),ga={},ma=f((e,t,r)=>{var i;ga[e]&&jh.warn(`Diagram with id ${e} already registered. Overwriting.`),ga[e]=t,r&&Ed(e,r),v0(e,t.styles),(i=t.injectUtils)==null||i.call(t,jh,P0,zt,Xn,I0,R0(),()=>{})},"registerDiagram"),cn=f(e=>{if(e in ga)return ga[e];throw new q0(e)},"getDiagram"),Ai,q0=(Ai=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(Ai,"DiagramNotFoundError"),Ai),N0=f(e=>{var s;const{securityLevel:t}=zt();let r=Pt("body");if(t==="sandbox"){const o=((s=Pt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Pt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),z0=f(e=>{const{handDrawnSeed:t}=zt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),W0=f(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),qi=f(e=>{const t=H0([...e.cssCompiledStyles||[],...e.cssStyles||[],...W0(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),H0=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Id=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),xt=f(e=>{const{stylesArray:t}=qi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Id(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),dt=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=zt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=qi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:j0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),j0=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const Y0=Object.freeze({left:0,top:0,width:16,height:16}),ya=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Rd=Object.freeze({...Y0,...ya}),U0=Object.freeze({...Rd,body:"",hidden:!1}),G0=Object.freeze({width:null,height:null}),X0=Object.freeze({...G0,...ya}),V0=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return fo(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return fo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return fo(n,r)?n:null}return null},fo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Z0(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Yh(e,t){const r=Z0(e,t);for(const i in U0)i in ya?i in e&&!(i in r)&&(r[i]=ya[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function K0(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Uh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Yh(i[n]||s[n],a)}return o(t),r.forEach(o),Yh(e,a)}function Q0(e,t){if(e.icons[t])return Uh(e,t,[]);const r=K0(e,[t])[t];return r?Uh(e,t,r):null}const J0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,tx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Gh(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(J0);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=tx.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function ex(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function rx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ix(e,t,r){const i=ex(e);return rx(i.defs,t+i.content+r)}const sx=e=>e==="unset"||e==="undefined"||e==="none";function ax(e,t){const r={...Rd,...e},i={...X0,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,k=y.vFlip;let S=y.rotate;C?k?S+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):k&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let w;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:w=s.height/2+s.top,x.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,x.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}S%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),x.length&&(a=ix(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Gh(u,l/c)):(h=o==="auto"?l:o,u=n===null?Gh(h,c/l):n==="auto"?c:n);const p={},d=(y,x)=>{sx(x)||(p[y]=x.toString())};d("width",h),d("height",u);const m=[s.left,s.top,l,c];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const ox=/\sid="(\S+)"/g,Xh=new Map;function nx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Xh.get(e)||0;return Xh.set(e,t+1),t?`${e}${t}`:e}function lx(e){const t=[];let r;for(;r=ox.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=nx(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function hx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var cx={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},un=new Map,qd=new Map,ux=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(W.debug("Registering icon pack:",t.name),"loader"in t)qd.set(t.name,t.loader);else if("icons"in t)un.set(t.name,t.icons);else throw W.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Nd=f(async(e,t)=>{const r=V0(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=un.get(i);if(!s){const o=qd.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},un.set(i,s)}catch(n){throw W.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Q0(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),dx=f(async e=>{try{return await Nd(e),!0}catch{return!1}},"isIconAvailable"),Fs=f(async(e,t,r)=>{let i;try{i=await Nd(e,t==null?void 0:t.fallbackPrefix)}catch(o){W.error(o),i=cx}const s=ax(i,t),a=hx(lx(s.body),{...s.attributes,...r});return ze(a,te())},"getIconSVG"),zs={},le={},Vh;function px(){return Vh||(Vh=1,Object.defineProperty(le,"__esModule",{value:!0}),le.BLANK_URL=le.relativeFirstCharacters=le.whitespaceEscapeCharsRegex=le.urlSchemeRegex=le.ctrlCharactersRegex=le.htmlCtrlEntityRegex=le.htmlEntitiesRegex=le.invalidProtocolRegex=void 0,le.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,le.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,le.htmlCtrlEntityRegex=/&(newline|tab);/gi,le.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,le.urlSchemeRegex=/^.+(:|:)/gim,le.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,le.relativeFirstCharacters=[".","/"],le.BLANK_URL="about:blank"),le}var Zh;function fx(){if(Zh)return zs;Zh=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.sanitizeUrl=a;var e=px();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return d;if(p==="http:"||p==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return zs}var gx=fx();function go(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function mx(){}function zd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Vn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const yx="[object RegExp]",Wd="[object String]",Hd="[object Number]",jd="[object Boolean]",Yd="[object Arguments]",Cx="[object Symbol]",xx="[object Date]",bx="[object Map]",kx="[object Set]",Tx="[object Array]",Sx="[object ArrayBuffer]",wx="[object Object]",_x="[object DataView]",Bx="[object Uint8Array]",vx="[object Uint8ClampedArray]",Lx="[object Uint16Array]",Fx="[object Uint32Array]",Ex="[object Int8Array]",Ax="[object Int16Array]",Mx="[object Int32Array]",Ox="[object Float32Array]",$x="[object Float64Array]",Kh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Zn(e){return typeof Kh.Buffer<"u"&&Kh.Buffer.isBuffer(e)}function Dx(e){return Number.isSafeInteger(e)&&e>=0}function Ud(e){return e!=null&&typeof e!="function"&&Dx(e.length)}function Px(e){return e==="__proto__"}function Kn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Qn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ix(e,t){return fi(e,void 0,e,new Map,t)}function fi(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Kn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=fi(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,fi(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(fi(n,void 0,r,i,s));return o}if(Zn(e))return e.subarray();if(Qn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=fi(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),je(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,je(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(typeof e=="object"&&Rx(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),je(o,e,r,i,s),o}return e}function je(e,t,r=e,i,s){const a=[...Object.keys(t),...zd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=fi(t[n],n,r,i,s))}}function Rx(e){switch(Vn(e)){case Yd:case Tx:case Sx:case _x:case jd:case xx:case Ox:case $x:case Ex:case Ax:case Mx:case bx:case Hd:case wx:case yx:case kx:case Wd:case Cx:case Bx:case vx:case Lx:case Fx:return!0;default:return!1}}function qx(e,t){return Ix(e,(r,i,s,a)=>{if(typeof e=="object"){if(Vn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),je(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Hd:case Wd:case jd:{const o=new e.constructor(e==null?void 0:e.valueOf());return je(o,e),o}case Yd:{const o={};return je(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Qh(e){return qx(e)}function dn(e){return e!==null&&typeof e=="object"&&Vn(e)==="[object Arguments]"}function pn(e){return typeof e=="object"&&e!==null}function Nx(e){return pn(e)&&Ud(e)}function Es(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Es.Cache||Map),r}Es.Cache=Map;function ra(e){return Qn(e)}function zx(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Wx(e){if(Kn(e))return e;if(Array.isArray(e)||Qn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function Hx(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=ia(s,o,i,new Map)}return s}function ia(e,t,r,i){if(Kn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return Wx(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...zd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(Px(o))continue;let n=t[o],l=e[o];if(dn(n)&&(n={...n}),dn(l)&&(l={...l}),Zn(n)&&(n=Qh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];h[d]=l[d]}l=h}else if(Nx(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||pn(l)&&pn(n)&&(go(l)||go(n)||ra(l)||ra(n))?e[o]=ia(l,n,r,i):l==null&&go(n)?e[o]=ia({},n,r,i):l==null&&ra(n)?e[o]=Qh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function jx(e,...t){return Hx(e,...t,mx)}function Jh(e){if(e==null)return!0;if(Ud(e))return typeof e.splice!="function"&&typeof e!="string"&&!Zn(e)&&!ra(e)&&!dn(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return zx(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Yx="",Ux={curveBasis:en,curveBasisClosed:My,curveBasisOpen:Oy,curveBumpX:Gu,curveBumpY:Uu,curveBundle:$y,curveCardinalClosed:Dy,curveCardinalOpen:Py,curveCardinal:Qu,curveCatmullRomClosed:Iy,curveCatmullRomOpen:Ry,curveCatmullRom:td,curveLinear:ds,curveLinearClosed:qy,curveMonotoneX:od,curveMonotoneY:nd,curveNatural:hd,curveStep:cd,curveStepAfter:dd,curveStepBefore:ud},Gx=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xx=f(function(e,t){const r=Gd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);da(o),i=ce(i,[...o])}else i=r.args;if(!i)return;let s=Hn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Gd=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${Gx.source})(?=[}][%]{2}).*
|
|
129
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=gs.exec(e))!==null;)if(a.index===gs.lastIndex&&gs.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return W.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Vx=f(function(e){return e.replace(gs,"")},"removeDirectives"),Zx=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Jn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Ux[r]??t}f(Jn,"interpolateToCurve");function Xd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?gx.sanitizeUrl(r):r}f(Xd,"formatUrl");var Kx=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){W.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function tl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(tl,"distance");function Vd(e){let t,r=0;e.forEach(s=>{r+=tl(s,t),t=s});const i=r/2;return el(e,i)}f(Vd,"traverseEdge");function Zd(e){return e.length===1?e[0]:Vd(e)}f(Zd,"calcLabelPosition");var tc=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),el=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=tl(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:tc((1-o)*r.x+o*s.x,5),y:tc((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Qx=f((e,t,r)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=el(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Kd(e,t,r){const i=structuredClone(r);W.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=el(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(Kd,"calcTerminalLabelPosition");function Qd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(Qd,"getStylesFromArray");var ec=0,Jx=f(()=>(ec++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ec),"generateId");function Jd(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Jd,"makeRandomHex");var tb=f(e=>Jd(e.length),"random"),eb=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),rb=f(function(e,t){const r=t.text.replace(Ls.lineBreakRegex," "),[,i]=Oa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),ib=Es((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ls.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=br(`${o} `,r),c=br(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=sb(o,t,"-",r);s.push(a,...p),a=d}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sb=Es((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(br(c,i)>=t){const u=l+1,p=s.length===u,d=`${c}${r}`;a.push(p?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function tp(e,t){return rl(e,t).height}f(tp,"calculateTextHeight");function br(e,t){return rl(e,t).width}f(br,"calculateTextWidth");var rl=Es((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Oa(r),o=["sans-serif",i],n=e.split(Ls.lineBreakRegex),l=[],c=Pt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const x=eb();x.text=y||Yx;const C=rb(h,x).style("font-size",a).style("font-weight",s).style("font-family",p),k=(C._groups||C)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),d=Math.round(k.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Mi,ab=(Mi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(Mi,"InitIDGenerator"),Mi),Ws,ob=f(function(e){return Ws=Ws||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ws.innerHTML=e,unescape(Ws.textContent)},"entityDecode");function il(e){return"str"in e}f(il,"isDetailedError");var nb=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Oa=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function sl(e,t){return jx({},e,t)}f(sl,"cleanAndMerge");var xe={assignWithDepth:ce,wrapLabel:ib,calculateTextHeight:tp,calculateTextWidth:br,calculateTextDimensions:rl,cleanAndMerge:sl,detectInit:Xx,detectDirective:Gd,isSubstringInArray:Zx,interpolateToCurve:Jn,calcLabelPosition:Zd,calcCardinalityPosition:Qx,calcTerminalLabelPosition:Kd,formatUrl:Xd,getStylesFromArray:Qd,generateId:Jx,random:tb,runFunc:Kx,entityDecode:ob,insertTitle:nb,isLabelCoordinateInPath:ep,parseFontSize:Oa,InitIDGenerator:ab},lb=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Or=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),AL=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function oe(e){return e??null}f(oe,"handleUndefinedAttr");function ep(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(ep,"isLabelCoordinateInPath");var sa={exports:{}},rc=sa.exports,ic;function hb(){return ic||(ic=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var p=u?h.bind(u):h;return this.reads.push(p),a(this),p},mutate:function(h,u){var p=u?h.bind(u):h;return this.writes.push(p),a(this),p},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function a(h){h.scheduled||(h.scheduled=!0,h.raf(o.bind(null,h)))}function o(h){var u=h.writes,p=h.reads,d;try{r("flushing reads",p.length),h.runTasks(p),r("flushing writes",u.length),h.runTasks(u)}catch(m){d=m}if(h.scheduled=!1,(p.length||u.length)&&a(h),d)if(r("task errored",d.message),h.catch)h.catch(d);else throw d}function n(h,u){var p=h.indexOf(u);return!!~p&&!!h.splice(p,1)}function l(h,u){for(var p in u)u.hasOwnProperty(p)&&(h[p]=u[p])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof rc<"u"?rc:globalThis)})(sa)),sa.exports}var cb=hb();const ub=In(cb);var mo={exports:{}},sc;function db(){return sc||(sc=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,a=s.get(i);this.fastdom.clear(a),s.delete(i)}};function r(i,s,a,o){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(u,p){c=l[s](function(){n.delete(h);try{u(o?a.call(o):a())}catch(d){p(d)}},o)});return n.set(h,c),h}e.exports=t})()})(mo)),mo.exports}var pb=db();const fb=In(pb);function al(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jr=al();function rp(e){Jr=e}var ms={exec:()=>null};function Gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Se.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var gb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},mb=/^(?:[ \t]*(?:\n|$))+/,yb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Cb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,As=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ol=/(?:[*+-]|\d{1,9}[.)])/,ip=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sp=Gt(ip).replace(/bull/g,ol).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),bb=Gt(ip).replace(/bull/g,ol).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kb=/^[^\n]+/,ll=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Tb=Gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ll).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Sb=Gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ol).getRegex(),$a="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",hl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wb=Gt("^ {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",hl).replace("tag",$a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ap=Gt(nl).replace("hr",As).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",$a).getRegex(),_b=Gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ap).getRegex(),cl={blockquote:_b,code:yb,def:Tb,fences:Cb,heading:xb,hr:As,html:wb,lheading:sp,list:Sb,newline:mb,paragraph:ap,table:ms,text:kb},ac=Gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),Bb={...cl,lheading:bb,table:ac,paragraph:Gt(nl).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ac).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",$a).getRegex()},vb={...cl,html:Gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hl).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:ms,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gt(nl).replace("hr",As).replace("heading",` *#{1,6} *[^
|
|
130
|
+
]`).replace("lheading",sp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,op=/^( {2,}|\\)\n(?!\s*$)/,Eb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Da=/[\p{P}\p{S}]/u,ul=/[\s\p{P}\p{S}]/u,np=/[^\s\p{P}\p{S}]/u,Ab=Gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ul).getRegex(),lp=/(?!~)[\p{P}\p{S}]/u,Mb=/(?!~)[\s\p{P}\p{S}]/u,Ob=/(?:[^\s\p{P}\p{S}]|~)/u,$b=Gt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),hp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Db=Gt(hp,"u").replace(/punct/g,Da).getRegex(),Pb=Gt(hp,"u").replace(/punct/g,lp).getRegex(),cp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ib=Gt(cp,"gu").replace(/notPunctSpace/g,np).replace(/punctSpace/g,ul).replace(/punct/g,Da).getRegex(),Rb=Gt(cp,"gu").replace(/notPunctSpace/g,Ob).replace(/punctSpace/g,Mb).replace(/punct/g,lp).getRegex(),qb=Gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,np).replace(/punctSpace/g,ul).replace(/punct/g,Da).getRegex(),Nb=Gt(/\\(punct)/,"gu").replace(/punct/g,Da).getRegex(),zb=Gt(/^<(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(),Wb=Gt(hl).replace("(?:-->|$)","-->").getRegex(),Hb=Gt("^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",Wb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ca=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,jb=Gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ca).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),up=Gt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ca).replace("ref",ll).getRegex(),dp=Gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",ll).getRegex(),Yb=Gt("reflink|nolink(?!\\()","g").replace("reflink",up).replace("nolink",dp).getRegex(),oc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,dl={_backpedal:ms,anyPunctuation:Nb,autolink:zb,blockSkip:$b,br:op,code:Fb,del:ms,emStrongLDelim:Db,emStrongRDelimAst:Ib,emStrongRDelimUnd:qb,escape:Lb,link:jb,nolink:dp,punctuation:Ab,reflink:up,reflinkSearch:Yb,tag:Hb,text:Eb,url:ms},Ub={...dl,link:Gt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ca).getRegex(),reflink:Gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ca).getRegex()},fn={...dl,emStrongRDelimAst:Rb,emStrongLDelim:Pb,url:Gt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",oc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Gt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",oc).getRegex()},Gb={...fn,br:Gt(op).replace("{2,}","*").getRegex(),text:Gt(fn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Hs={normal:cl,gfm:Bb,pedantic:vb},Ki={normal:dl,gfm:fn,breaks:Gb,pedantic:Ub},Xb={"&":"&","<":"<",">":">",'"':""","'":"'"},nc=e=>Xb[e];function Je(e,t){if(t){if(Se.escapeTest.test(e))return e.replace(Se.escapeReplace,nc)}else if(Se.escapeTestNoEncode.test(e))return e.replace(Se.escapeReplaceNoEncode,nc);return e}function lc(e){try{e=encodeURI(e).replace(Se.percentDecode,"%")}catch{return null}return e}function hc(e,t){var a;let r=e.replace(Se.findPipe,(o,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Se.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Se.slashPipe,"|");return i}function Qi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Vb(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function cc(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Zb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
163
131
|
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
|
|
164
|
-
`)}var
|
|
165
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=
|
|
166
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=
|
|
132
|
+
`)}var xa=class{constructor(t){Zt(this,"options");Zt(this,"rules");Zt(this,"lexer");this.options=t||Jr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Qi(i,`
|
|
133
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Zb(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Qi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Qi(r[0],`
|
|
134
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Qi(r[0],`
|
|
167
135
|
`).split(`
|
|
168
|
-
`),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],
|
|
169
|
-
`),
|
|
136
|
+
`),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
137
|
+
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
170
138
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
171
|
-
${
|
|
172
|
-
${
|
|
139
|
+
${h}`:h,a=a?`${a}
|
|
140
|
+
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=p,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let m=d,y=m.raw+`
|
|
173
141
|
`+i.join(`
|
|
174
|
-
`),
|
|
142
|
+
`),x=this.blockquote(y);o[o.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,a=a.substring(0,a.length-m.text.length)+x.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,y=m.raw+`
|
|
175
143
|
`+i.join(`
|
|
176
|
-
`),
|
|
177
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let
|
|
178
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,
|
|
179
|
-
`,1)[0],
|
|
180
|
-
`,t=t.substring(
|
|
181
|
-
`,1)[0],
|
|
182
|
-
`+
|
|
183
|
-
`+
|
|
184
|
-
`,t=t.substring(
|
|
185
|
-
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(
|
|
186
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=
|
|
187
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(
|
|
188
|
-
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let
|
|
144
|
+
`),x=this.list(y);o[o.length-1]=x,s=s.substring(0,s.length-d.raw.length)+x.raw,a=a.substring(0,a.length-m.raw.length)+x.raw,i=y.substring(o.at(-1).raw.length).split(`
|
|
145
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let p=r[2].split(`
|
|
146
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),d=t.split(`
|
|
147
|
+
`,1)[0],m=!p.trim(),y=0;if(this.options.pedantic?(y=2,u=p.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=p.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(h+=d+`
|
|
148
|
+
`,t=t.substring(d.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),w=this.rules.other.fencesBeginRegex(y),B=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let E=t.split(`
|
|
149
|
+
`,1)[0],F;if(d=E,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),F=d):F=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||B.test(d)||L.test(d)||k.test(d)||S.test(d))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
|
|
150
|
+
`+F.slice(y);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(p)||B.test(p)||S.test(p))break;u+=`
|
|
151
|
+
`+d}!m&&!d.trim()&&(m=!0),h+=E+`
|
|
152
|
+
`,t=t.substring(E.length+1),p=F.slice(y)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(C=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!x,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(p=>p.type==="space"),u=h.length>0&&h.some(p=>this.rules.other.anyLine.test(p.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=hc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
153
|
+
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(hc(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
154
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Qi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=Vb(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),cc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return cc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,p=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ye=class gn{constructor(t){Zt(this,"tokens");Zt(this,"options");Zt(this,"state");Zt(this,"tokenizer");Zt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Jr,this.options.tokenizer=this.options.tokenizer||new xa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Se,block:Hs.normal,inline:Ki.normal};this.options.pedantic?(r.block=Hs.pedantic,r.inline=Ki.pedantic):this.options.gfm&&(r.block=Hs.gfm,this.options.breaks?r.inline=Ki.breaks:r.inline=Ki.gfm),this.tokenizer.rules=r}static get rules(){return{block:Hs,inline:Ki}}static lex(t,r){return new gn(r).lex(t)}static lexInline(t,r){return new gn(r).inlineTokens(t)}lex(t){t=t.replace(Se.carriageReturn,`
|
|
155
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(Se.tabCharGlobal," ").replace(Se.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
|
|
156
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
189
157
|
`)?"":`
|
|
190
|
-
`)+n.raw,
|
|
191
|
-
`+n.text,this.inlineQueue.at(-1).src=
|
|
158
|
+
`)+n.raw,c.text+=`
|
|
159
|
+
`+n.text,this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
192
160
|
`)?"":`
|
|
193
|
-
`)+n.raw,
|
|
194
|
-
`+n.raw,this.inlineQueue.at(-1).src=
|
|
161
|
+
`)+n.raw,c.text+=`
|
|
162
|
+
`+n.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
195
163
|
`)?"":`
|
|
196
|
-
`)+n.raw,
|
|
197
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=
|
|
164
|
+
`)+n.raw,c.text+=`
|
|
165
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
198
166
|
`)?"":`
|
|
199
|
-
`)+n.raw,
|
|
200
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=
|
|
201
|
-
`;return s?'<pre><code class="language-'+
|
|
202
|
-
`:"<pre><code>"+(i?a:
|
|
167
|
+
`)+n.raw,c.text+=`
|
|
168
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let y=1/0,x=t.slice(1),C;this.options.extensions.startInline.forEach(k=>{C=k.call({lexer:this},x),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},ba=class{constructor(t){Zt(this,"options");Zt(this,"parser");this.options=t||Jr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Se.notSpaceStart))==null?void 0:o[0],a=t.replace(Se.endingNewline,"")+`
|
|
169
|
+
`;return s?'<pre><code class="language-'+Je(s)+'">'+(i?a:Je(a,!0))+`</code></pre>
|
|
170
|
+
`:"<pre><code>"+(i?a:Je(a,!0))+`</code></pre>
|
|
203
171
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
204
172
|
${this.parser.parse(t)}</blockquote>
|
|
205
173
|
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
206
174
|
`}hr(t){return`<hr>
|
|
207
175
|
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
|
|
208
176
|
`+s+"</"+a+`>
|
|
209
|
-
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+
|
|
177
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Je(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
210
178
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
211
179
|
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
212
180
|
<thead>
|
|
@@ -215,95 +183,130 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
215
183
|
`}tablerow({text:t}){return`<tr>
|
|
216
184
|
${t}</tr>
|
|
217
185
|
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
218
|
-
`}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>${
|
|
219
|
-
`+this.renderer.text(
|
|
220
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+
|
|
186
|
+
`}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>${Je(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=lc(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Je(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=lc(t);if(a===null)return Je(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Je(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Je(t.text)}},pl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ue=class mn{constructor(t){Zt(this,"options");Zt(this,"renderer");Zt(this,"textRenderer");this.options=t||Jr,this.options.renderer=this.options.renderer||new ba,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pl}static parse(t,r){return new mn(r).parse(t)}static parseInline(t,r){return new mn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let c=n,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],h+=`
|
|
187
|
+
`+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=c||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Qs,os=(Qs=class{constructor(t){Zt(this,"options");Zt(this,"block");this.options=t||Jr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}},Zt(Qs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Zt(Qs,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Qs),Kb=class{constructor(...t){Zt(this,"defaults",al());Zt(this,"options",this.setOptions);Zt(this,"parse",this.parseMarkdown(!0));Zt(this,"parseInline",this.parseMarkdown(!1));Zt(this,"Parser",Ue);Zt(this,"Renderer",ba);Zt(this,"TextRenderer",pl);Zt(this,"Lexer",Ye);Zt(this,"Tokenizer",xa);Zt(this,"Hooks",os);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let c=n[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new ba(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new xa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new os;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=a[n];os.passThroughHooks.has(o)?a[n]=h=>{if(this.defaults.async&&os.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await l.call(a,h);return c.call(a,p)})();let u=l.call(a,h);return c.call(a,u)}:a[n]=(...h)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(a,h);return p===!1&&(p=await c.apply(a,h)),p})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ye.lex(t,r??this.defaults)}parser(t,r){return Ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(n,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
188
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Je(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Xr=new Kb;function Xt(e,t){return Xr.parse(e,t)}Xt.options=Xt.setOptions=function(e){return Xr.setOptions(e),Xt.defaults=Xr.defaults,rp(Xt.defaults),Xt};Xt.getDefaults=al;Xt.defaults=Jr;Xt.use=function(...e){return Xr.use(...e),Xt.defaults=Xr.defaults,rp(Xt.defaults),Xt};Xt.walkTokens=function(e,t){return Xr.walkTokens(e,t)};Xt.parseInline=Xr.parseInline;Xt.Parser=Ue;Xt.parser=Ue.parse;Xt.Renderer=ba;Xt.TextRenderer=pl;Xt.Lexer=Ye;Xt.lexer=Ye.lex;Xt.Tokenizer=xa;Xt.Hooks=os;Xt.parse=Xt;Xt.options;Xt.setOptions;Xt.use;Xt.walkTokens;Xt.parseInline;Ue.parse;Ye.lex;function pp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,p;return(p=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var a=new RegExp(`
|
|
221
189
|
[ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(a,`
|
|
222
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var
|
|
223
|
-
`)&&(
|
|
224
|
-
`).map(function(p,
|
|
225
|
-
`)),o+=
|
|
190
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
|
|
191
|
+
`)&&(u=String(n).split(`
|
|
192
|
+
`).map(function(p,d){return d===0?p:""+h+p}).join(`
|
|
193
|
+
`)),o+=u+i[l+1]}),o}var yn=typeof performance<"u"&&typeof performance.now=="function",ni=f(()=>yn?performance.now():0,"now"),yo="🧜 ",Qb="Mermaid render",Jb="Mermaid",tk={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Oi;Oi=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=ni();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(ni()-i)}}async tick(t,r){if(!this.enabled)return r();const i=ni();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(ni()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:ni(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),yn&&typeof performance.mark=="function")try{performance.mark(`${yo}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=ni();if(t.duration=r-t.start,yn&&typeof performance.measure=="function")try{performance.measure(`${yo}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:Qb,trackGroup:Jb,color:tk[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],o=f((l,c)=>{const h=" ".repeat(c),u=l.duration.toFixed(1).padStart(8),p=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${p} ${h}${l.name}`);for(const d of l.children)o(d,c+1);if(l.children.length>0){const d=l.children.reduce((y,x)=>y+x.duration,0),m=l.duration-d;if(m>.5){const y=m.toFixed(1).padStart(8);a.push(`${y} ${h} (self)`)}}},"walk");o(t,0);const n=Object.keys(this.buckets);if(n.length>0){a.push("—— buckets (summed) ——");for(const l of n)a.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${yo}mermaid render profile · ${s}
|
|
194
|
+
${a.join(`
|
|
195
|
+
`)}`)}},f(Oi,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var ek=ub.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(fb),Vr=ek;function fp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
226
196
|
`).replace(/\n{2,}/g,`
|
|
227
|
-
`);return
|
|
228
|
-
`).forEach((
|
|
229
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return
|
|
230
|
-
`),a):be(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),To(c,t.labelStyle),c.attr("class",`${h} ${i}`),To(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),o.node()}g(Eu,"addHtmlSpan");function ra(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(ra,"createTspan");function Mu(e,t,r){const i=e.append("text"),s=ra(i,1,t);ia(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}g(Mu,"computeWidthOfText");function Jx(e,t,r){var o;const i=e.append("text"),s=ra(i,1,t);ia(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(Jx,"computeDimensionOfText");function Ou(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const d=g(u=>Mu(o,1.1,u)<=e,"checkWidth"),p=d(c)?[c]:Au(c,d);for(const u of p){const y=ra(l,h,1.1,s);ia(y,u),h++}}if(i){const c=l.node().getBBox(),d=2;return n.attr("x",c.x-d).attr("y",c.y-d).attr("width",c.width+2*d).attr("height",c.height+2*d),o.node()}else return l.node()}g(Ou,"createFormattedText");function So(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(So,"decodeHTMLEntities");function ia(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(So(r.content)):s.text(" "+So(r.content))})}g(ia,"updateTextContentAndStyles");async function $u(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await Qx(n)?await ji(n,void 0,{class:"label-icon"}):`<i class='${be(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g($u,"replaceIconSubstring");var ze=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(W.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",h),a){const d=o?vu(t,c):_u(t),p=await $u(Cr(d),c),u=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Oi(t)?u:p,labelStyle:r.replace("fill:","color:")};return await Eu(e,y,l,s,h,c)}else{const d=Cr(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?Bu(d.replace("<br>","<br/>"),c):wu(d),u=Ou(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(u).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(u).select("rect").attr("style",y.replace(/background:/g,"fill:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(u).select("text").attr("style",f)}return i?ht(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ht(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Da(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*o+s}}}function tb(e,t){return e[0]===t[0]&&e[1]===t[1]}function eb(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of o)Da(h,n,s);const l=(function(h,c,d){const p=[];for(const b of h){const k=[...b];tb(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const u=[];c=Math.max(c,.1);const y=[];for(const b of p)for(let k=0;k<b.length-1;k++){const S=b[k],B=b[k+1];if(S[1]!==B[1]){const _=Math.min(S[1],B[1]);y.push({ymin:_,ymax:Math.max(S[1],B[1]),x:_===S[1]?S[0]:B[0],islope:(B[0]-S[0])/(B[1]-S[1])})}}if(y.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!y.length)return u;let f=[],m=y[0].ymin,C=0;for(;f.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach((k=>{f.push({s:m,edge:k})}))}if(f=f.filter((b=>!(b.edge.ymax<=m))),f.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%c==0)&&f.length>1)for(let b=0;b<f.length;b+=2){const k=b+1;if(k>=f.length)break;const S=f[b].edge,B=f[k].edge;u.push([[Math.round(S.x),m],[Math.round(B.x),m]])}m+=d,f.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return u})(o,a,i);if(s){for(const h of o)Da(h,n,-s);(function(h,c,d){const p=[];h.forEach((u=>p.push(...u))),Da(p,c,d)})(l,n,-s)}return l}function Gi(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),eb(e,s,i,a||1)}class wn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Gi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function sa(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class rb extends wn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Gi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[h,c]of s)sa([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class ib extends wn{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class sb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=sa(n),h=l/s,c=Math.ceil(h)-1,d=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let y=0;y<c;y++){const f=u+d+y*s,m=p-o+2*Math.random()*o,C=f-o+2*Math.random()*o,b=this.helper.ellipse(m,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class ab{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gi(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=sa(o),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=o[0],d=o[1];c[0]>d[0]&&(c=o[1],d=o[0]);const p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u<l;u++){const y=u*(i+s),f=y+i,m=[c[0]+y*Math.cos(p)+h*Math.cos(p),c[1]+y*Math.sin(p)+h*Math.sin(p)],C=[c[0]+f*Math.cos(p)+h*Math.cos(p),c[1]+f*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}})),a}}class ob{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Gi(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=sa(a),n=Math.round(o/(2*r));let l=a[0],h=a[1];l[0]>h[0]&&(l=a[1],h=a[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d<n;d++){const p=2*d*r,u=2*(d+1)*r,y=Math.sqrt(2*Math.pow(r,2)),f=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],m=[l[0]+u*Math.cos(c),l[1]+u*Math.sin(c)],C=[f[0]+y*Math.cos(c+Math.PI/4),f[1]+y*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(f[0],f[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}})),s}}const re={};class nb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const lb=0,Pa=1,Ul=2,as={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 Ra(e,t){return e.type===t}function Bn(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:lb,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Pa,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Ul,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!Ra(a,Ul);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return Bn("M0,0"+e);s++,o=as[a.text],i=a.text}else Ra(a,Pa)?o=as[i]:(s++,o=as[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const h=r[l];if(!Ra(h,Pa))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof as[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Iu(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((h,c)=>c%2?h+r:h+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Du(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[a,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=s+(s-l)):(d=i,p=s),t.push({key:"C",data:[d,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[d,p]=c;let u=0,y=0;r==="Q"||r==="T"?(u=i+(i-n),y=s+(s-l)):(u=i,y=s);const f=i+2*(u-i)/3,m=s+2*(y-s)/3,C=d+2*(u-d)/3,b=p+2*(y-p)/3;t.push({key:"C",data:[f,m,C,b,d,p]}),n=u,l=y,i=d,s=p;break}case"Q":{const[d,p,u,y]=c,f=i+2*(d-i)/3,m=s+2*(p-s)/3,C=u+2*(d-u)/3,b=y+2*(p-y)/3;t.push({key:"C",data:[f,m,C,b,u,y]}),n=d,l=p,i=u,s=y;break}case"A":{const d=Math.abs(c[0]),p=Math.abs(c[1]),u=c[2],y=c[3],f=c[4],m=c[5],C=c[6];d===0||p===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(Pu(i,s,m,C,d,p,u,y,f).forEach((function(b){t.push({key:"C",data:b})})),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=h}return t}function Ci(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Pu(e,t,r,i,s,a,o,n,l,h){const c=(d=o,Math.PI*d/180);var d;let p=[],u=0,y=0,f=0,m=0;if(h)[u,y,f,m]=h;else{[e,t]=Ci(e,t,-c),[r,i]=Ci(r,i,-c);const H=(e-r)/2,P=(t-i)/2;let E=H*H/(s*s)+P*P/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const L=s*s,$=a*a,A=L*$-L*P*P-$*H*H,w=L*P*P+$*H*H,N=(n===l?-1:1)*Math.sqrt(Math.abs(A/w));f=N*s*P/a+(e+r)/2,m=N*-a*H/s+(t+i)/2,u=Math.asin(parseFloat(((t-m)/a).toFixed(9))),y=Math.asin(parseFloat(((i-m)/a).toFixed(9))),e<f&&(u=Math.PI-u),r<f&&(y=Math.PI-y),u<0&&(u=2*Math.PI+u),y<0&&(y=2*Math.PI+y),l&&u>y&&(u-=2*Math.PI),!l&&y>u&&(y-=2*Math.PI)}let C=y-u;if(Math.abs(C)>120*Math.PI/180){const H=y,P=r,E=i;y=l&&y>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Pu(r=f+s*Math.cos(y),i=m+a*Math.sin(y),P,E,s,a,o,0,l,[y,H,f,m])}C=y-u;const b=Math.cos(u),k=Math.sin(u),S=Math.cos(y),B=Math.sin(y),_=Math.tan(C/4),M=4/3*s*_,v=4/3*a*_,z=[e,t],D=[e+M*k,t-v*b],I=[r+M*B,i-v*S],Y=[r,i];if(D[0]=2*z[0]-D[0],D[1]=2*z[1]-D[1],h)return[D,I,Y].concat(p);{p=[D,I,Y].concat(p);const H=[];for(let P=0;P<p.length;P+=3){const E=Ci(p[P][0],p[P][1],c),L=Ci(p[P+1][0],p[P+1][1],c),$=Ci(p[P+2][0],p[P+2][1],c);H.push([E[0],E[1],L[0],L[1],$[0],$[1]])}return H}}const hb={randOffset:function(e,t){return at(e,t)},randOffsetWithRange:function(e,t,r){return Ws(e,t,r)},ellipse:function(e,t,r,i,s){const a=qu(r,i,s);return wo(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return rr(e,t,r,i,s,!0)}};function Ru(e,t,r,i,s){return{type:"path",ops:rr(e,t,r,i,s)}}function Cs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...rr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...rr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Ru(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function cb(e,t,r,i,s){return(function(a,o){return Cs(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function jl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=os(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:os(r[0],1.5*(1+.22*t.roughness),Vl(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=os(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:os(o,1.5*(1+.22*t.roughness),Vl(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function qu(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=at(o*l,r),n+=at(n*l,r),{increment:a,rx:o,ry:n}}function wo(e,t,r,i){const[s,a]=Zl(i.increment,e,t,i.rx,i.ry,1,i.increment*Ws(.1,Ws(.4,1,r),r),r);let o=zs(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Zl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=zs(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Gl(e,t,r,i,s,a,o,n,l){const h=e,c=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=at(.01*d,l),p+=at(.01*p,l);let u=s,y=a;for(;u<0;)u+=2*Math.PI,y+=2*Math.PI;y-u>2*Math.PI&&(u=0,y=2*Math.PI);const f=2*Math.PI/l.curveStepCount,m=Math.min(f/2,(y-u)/2),C=Kl(m,h,c,d,p,u,y,1,l);if(!l.disableMultiStroke){const b=Kl(m,h,c,d,p,u,y,1.5,l);C.push(...b)}return o&&(n?C.push(...rr(h,c,h+d*Math.cos(u),c+p*Math.sin(u),l),...rr(h,c,h+d*Math.cos(y),c+p*Math.sin(y),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(u),c+p*Math.sin(u)]})),{type:"path",ops:C}}function Xl(e,t){const r=Du(Iu(Bn(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...rr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,h,c,d,p,u]=n;i.push(...db(l,h,c,d,p,u,a,t)),a=[p,u];break}case"Z":i.push(...rr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function qa(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+at(s,t),i[0][1]+at(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+at(s,t),i[o][1]+at(s,t)]})}}return{type:"fillPath",ops:r}}function Fr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!re[s])switch(s){case"zigzag":re[s]||(re[s]=new rb(i));break;case"cross-hatch":re[s]||(re[s]=new ib(i));break;case"dots":re[s]||(re[s]=new sb(i));break;case"dashed":re[s]||(re[s]=new ab(i));break;case"zigzag-line":re[s]||(re[s]=new ob(i));break;default:s="hachure",re[s]||(re[s]=new wn(i))}return re[s]})(t,hb).fillPolygons(e,t)}function Vl(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Nu(e){return e.randomizer||(e.randomizer=new nb(e.seed||0)),e.randomizer.next()}function Ws(e,t,r,i=1){return r.roughness*i*(Nu(r)*(t-e)+e)}function at(e,t,r=1){return Ws(-e,e,t,r)}function rr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=Bo(e,t,r,i,s,!0,!1);if(o)return n;const l=Bo(e,t,r,i,s,!0,!0);return n.concat(l)}function Bo(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,p=.2+.2*Nu(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=at(u,s,h),y=at(y,s,h);const f=[],m=()=>at(d,s,h),C=()=>at(c,s,h),b=s.preserveVertices;return o?f.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):f.push({op:"move",data:[e+(b?0:at(c,s,h)),t+(b?0:at(c,s,h))]}),o?f.push({op:"bcurveTo",data:[u+e+(r-e)*p+m(),y+t+(i-t)*p+m(),u+e+2*(r-e)*p+m(),y+t+2*(i-t)*p+m(),r+(b?0:m()),i+(b?0:m())]}):f.push({op:"bcurveTo",data:[u+e+(r-e)*p+C(),y+t+(i-t)*p+C(),u+e+2*(r-e)*p+C(),y+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),f}function os(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]),i.push([e[0][0]+at(t,r),e[0][1]+at(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]),s===e.length-1&&i.push([e[s][0]+at(t,r),e[s][1]+at(t,r)]);return zs(i,null,r)}function zs(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Bo(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Zl(e,t,r,i,s,a,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const d=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(d),h.push(d)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=at(.5,n)-Math.PI/2;h.push([at(a,n)+t+.9*i*Math.cos(c-e),at(a,n)+r+.9*s*Math.sin(c-e)]);const d=2*Math.PI+c-.01;for(let p=c;p<d;p+=e){const u=[at(a,n)+t+i*Math.cos(p),at(a,n)+r+s*Math.sin(p)];l.push(u),h.push(u)}h.push([at(a,n)+t+i*Math.cos(c+2*Math.PI+.5*o),at(a,n)+r+s*Math.sin(c+2*Math.PI+.5*o)]),h.push([at(a,n)+t+.98*i*Math.cos(c+o),at(a,n)+r+.98*s*Math.sin(c+o)]),h.push([at(a,n)+t+.9*i*Math.cos(c+.5*o),at(a,n)+r+.9*s*Math.sin(c+.5*o)])}return[h,l]}function Kl(e,t,r,i,s,a,o,n,l){const h=a+at(.1,l),c=[];c.push([at(n,l)+t+.9*i*Math.cos(h-e),at(n,l)+r+.9*s*Math.sin(h-e)]);for(let d=h;d<=o;d+=e)c.push([at(n,l)+t+i*Math.cos(d),at(n,l)+r+s*Math.sin(d)]);return c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),c.push([t+i*Math.cos(o),r+s*Math.sin(o)]),zs(c,null,l)}function db(e,t,r,i,s,a,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:at(h[0],n)),o[1]+(p?0:at(h[0],n))]}),c=p?[s,a]:[s+at(h[u],n),a+at(h[u],n)],l.push({op:"bcurveTo",data:[e+at(h[u],n),t+at(h[u],n),r+at(h[u],n),i+at(h[u],n),c[0],c[1]]});return l}function xi(e){return[...e]}function Ql(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(xi(e[0]),xi(e[1]),xi(e[2]),xi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(xi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function xs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ub(e,t,r){const i=xs(t,r);if(i===0)return xs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),xs(e,cr(t,r,s))}function cr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function _o(e,t,r,i){const s=i||[];if((function(n,l){const h=n[l+0],c=n[l+1],d=n[l+2],p=n[l+3];let u=3*c[0]-2*h[0]-p[0];u*=u;let y=3*c[1]-2*h[1]-p[1];y*=y;let f=3*d[0]-2*p[0]-h[0];f*=f;let m=3*d[1]-2*p[1]-h[1];return m*=m,u<f&&(u=f),y<m&&(y=m),u+y})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(xs(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],d=e[t+3],p=cr(l,h,.5),u=cr(h,c,.5),y=cr(c,d,.5),f=cr(p,u,.5),m=cr(u,y,.5),C=cr(f,m,.5);_o([l,p,f,C],0,r,s),_o([C,m,y,d],0,r,s)}var a,o;return s}function pb(e,t){return Hs(e,0,e.length,t)}function Hs(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const d=ub(e[c],o,n);d>l&&(l=d,h=c)}return Math.sqrt(l)>i?(Hs(e,t,h+1,i,a),Hs(e,h,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Na(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)_o(e,3*a,t,i);return r&&r>0?Hs(i,0,i.length,r):i}const oe="none";class Ys{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Ru(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=cb(t,r,i,s,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(qa([h],o)):n.push(Fr([h],o))}return o.stroke!==oe&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=qu(i,s,o),h=wo(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=wo(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(Fr([h.estimatedPoints],o));return o.stroke!==oe&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Cs(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const h=this._o(l),c=[],d=Gl(t,r,i,s,a,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const u=Gl(t,r,i,s,a,o,!0,!1,p);u.type="fillPath",c.push(u)}else c.push((function(p,u,y,f,m,C,b){const k=p,S=u;let B=Math.abs(y/2),_=Math.abs(f/2);B+=at(.01*B,b),_+=at(.01*_,b);let M=m,v=C;for(;M<0;)M+=2*Math.PI,v+=2*Math.PI;v-M>2*Math.PI&&(M=0,v=2*Math.PI);const z=(v-M)/b.curveStepCount,D=[];for(let I=M;I<=v;I+=z)D.push([k+B*Math.cos(I),S+_*Math.sin(I)]);return D.push([k+B*Math.cos(v),S+_*Math.sin(v)]),D.push([k,S]),Fr([D],b)})(t,r,i,s,a,o,h));return h.stroke!==oe&&c.push(d),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],a=jl(t,i);if(i.fill&&i.fill!==oe)if(i.fillStyle==="solid"){const o=jl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...Na(Ql([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Na(Ql(h),10,(1+i.roughness)/2))}o.length&&s.push(Fr([o],i))}return i.stroke!==oe&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Cs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(qa([t],i)):s.push(Fr([t],i))),i.stroke!==oe&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==oe,o=i.stroke!==oe,n=!!(i.simplification&&i.simplification<1),l=(function(c,d,p){const u=Du(Iu(Bn(c))),y=[];let f=[],m=[0,0],C=[];const b=()=>{C.length>=4&&f.push(...Na(C,d)),C=[]},k=()=>{b(),f.length&&(y.push(f),f=[])};for(const{key:B,data:_}of u)switch(B){case"M":k(),m=[_[0],_[1]],f.push(m);break;case"L":b(),f.push([_[0],_[1]]);break;case"C":if(!C.length){const M=f.length?f[f.length-1]:m;C.push([M[0],M[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),f.push([m[0],m[1]])}if(k(),!p)return y;const S=[];for(const B of y){const _=pb(B,p);_.length&&S.push(_)}return S})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Xl(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const c=Xl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(qa(l,i));else s.push(Fr(l,i));return o&&(n?l.forEach((c=>{s.push(Cs(c,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:oe};break;case"fillPath":o={d:this.opsToPath(a),stroke:oe,strokeWidth:0,fill:i.fill||oe};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||oe,strokeWidth:i,fill:oe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class gb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const ns="http://www.w3.org/2000/svg";class fb{constructor(t,r){this.svg=t,this.gen=new Ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(ns,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(ns,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(ns,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(ns,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const h=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var Z={canvas:(e,t)=>new gb(e,t),svg:(e,t)=>new fb(e,t),generator:e=>new Ys(e),newSeed:()=>Ys.newSeed()},st=g(async(e,t,r)=>{var u,y;let i;const s=t.useHtmlLabels||We((u=xt())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",qt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await ze(o,be(Cr(n),xt()),{useHtmlLabels:s,width:t.width||((y=xt().flowchart)==null?void 0:y.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},xt());let d=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const f=c.children[0],m=ht(c);await ou(f,n),d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height)}return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:p,label:o}},"labelHelper"),Wa=g(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??ee(xt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ze(s,be(Cr(t),xt()),{useHtmlLabels:i,width:r.width||((h=(l=xt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const n=r.padding/2;if(ee(xt())){const c=a.children[0],d=ht(a);o=c.getBoundingClientRect(),d.attr("width",o.width),d.attr("height",o.height)}return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),J=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function pt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(pt,"createPathFromPoints");function ir(e,t,r,i,s,a){const o=[],l=r-e,h=i-t,c=l/a,d=2*Math.PI/c,p=t+h/2;for(let u=0;u<=50;u++){const y=u/50,f=e+y*l,m=p+s*Math.sin(d*(f-e));o.push({x:f,y:m})}return o}g(ir,"generateFullSineWavePoints");function Ri(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:-u,y:-y})}return o}g(Ri,"generateCirclePoints");function vo(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=g((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(vo,"mergePaths");var mb=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,h=n):(s<0&&(o=-o),l=o,h=s===0?0:o*a/s),{x:r+l,y:i+h}},"intersectRect"),oi=mb,yb=g(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=xt(),n=ee(o);return await ze(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Ze=yb,sr=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Wu=g(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),u=d.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ze(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):y=await Ze(u,t.label,t.labelStyle||"",!1,!0);let f=y.getBBox();if(ee(r)){const M=y.children[0],v=ht(y);f=M.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=Z.svg(d),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),z=M.path(sr(b,k,m,C,0),v);S=d.insert(()=>(W.debug("Rough node insert CXC",z),z),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:B}=pn(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+B})`),n){const M=u.select("span");M&&M.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return oi(t,M)},{cluster:d,labelBBox:f}},"rect"),Cb=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return oi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),xb=g(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const u=await Ze(d,t.label,t.labelStyle,void 0,!0);let y=u.getBBox();if(ee(r)){const z=u.children[0],D=ht(u);y=z.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}const f=0*t.padding,m=f/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+f;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+f,k=t.height+f-y.height-6,S=t.x-C/2,B=t.y-b/2;t.width=C;const _=t.y-t.height/2-m+y.height+2;let M;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),D=Z.svg(h),I=t.rx||t.ry?D.path(sr(S,B,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):D.rectangle(S,B,C,b,{seed:s});M=h.insert(()=>I,":first-child");const Y=D.rectangle(S,_,C,k,{fill:z?a:o,fillStyle:z?"hachure":"solid",stroke:l,seed:s});M=h.insert(()=>I,":first-child"),p=h.insert(()=>Y)}else M=c.insert("rect",":first-child"),M.attr("class","outer").attr("x",S).attr("y",B).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",S).attr("y",_).attr("width",C).attr("height",k);d.attr("transform",`translate(${t.x-y.width/2}, ${B+1-(ee(r)?0:3)})`);const v=M.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(z){return oi(t,z)},{cluster:h,labelBBox:y}},"roundedWithTitle"),bb=g(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Q(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=ee(r),u=d.insert("g").attr("class","cluster-label "),y=await ze(u,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let f=y.getBBox();if(ee(r)){const M=y.children[0],v=ht(y);f=M.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}const m=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const M=Z.svg(d),v=K(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),z=M.path(sr(b,k,m,C,t.rx),v);S=d.insert(()=>(W.debug("Rough node insert CXC",z),z),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:B}=pn(r);if(u.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+B})`),n){const M=u.select("span");M&&M.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=f.height-t.padding/2,t.intersect=function(M){return oi(t,M)},{cluster:d,labelBBox:f}},"kanbanSection"),kb=g((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,d=t.x-h/2,p=t.y-c/2;t.width=h;let u;if(t.look==="handDrawn"){const m=Z.svg(o).rectangle(d,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});u=o.insert(()=>m,":first-child")}else{u=n.insert("rect",":first-child");let f="outer";t.look,f="divider",u.attr("class",f).attr("x",d).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const y=u.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(f){return oi(t,f)},{cluster:o,labelBBox:{}}},"divider"),Tb=Wu,Sb={rect:Wu,squareRect:Tb,roundedWithTitle:xb,noteGroup:Cb,divider:kb,kanbanSection:bb},zu=new Map,wb=g(async(e,t)=>{const r=t.shape||"rect",i=await Sb[r](e,t);return zu.set(t.id,i),i},"insertCluster"),oS=g(()=>{zu=new Map},"clear");function Hu(e,t){return e.intersect(t)}g(Hu,"intersectNode");var Bb=Hu;function Yu(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<a&&(c=-c),{x:s+h,y:a+c}}g(Yu,"intersectEllipse");var Uu=Yu;function ju(e,t,r){return Uu(e,t,t,r)}g(ju,"intersectCircle");var _b=ju;function Gu(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,h=1e-6;if(n!==0&&l!==0&&Lo(n,l))return;const c=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,u=c*e.x+d*e.y+p,y=c*t.x+d*t.y+p;if(Math.abs(u)<h&&Math.abs(y)<h&&Lo(u,y))return;const f=s*d-c*a;if(f===0)return;const m=Math.abs(f/2);let C=a*p-d*o;const b=C<0?(C-m)/f:(C+m)/f;C=c*o-s*p;const k=C<0?(C-m)/f:(C+m)/f;return{x:b,y:k}}}g(Gu,"intersectLine");function Lo(e,t){return e*t>0}g(Lo,"sameSign");var vb=Gu;function Xu(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let d=t[c],p=t[c<t.length-1?c+1:0],u=vb(e,r,{x:l+d.x,y:h+d.y},{x:l+p.x,y:h+p.y});u&&a.push(u)}return a.length?(a.length>1&&a.sort(function(c,d){let p=c.x-r.x,u=c.y-r.y,y=Math.sqrt(p*p+u*u),f=d.x-r.x,m=d.y-r.y,C=Math.sqrt(f*f+m*m);return y<C?-1:y===C?0:1}),a[0]):e}g(Xu,"intersectPolygon");var Lb=Xu,G={node:Bb,circle:_b,ellipse:Uu,polygon:Lb,rect:oi};function Vu(e,t){const{labelStyles:r}=Q(t);t.labelStyle=r;const i=it(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=Z.svg(a),h=K(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),d=a.insert(()=>c,":first-child");return d.attr("class","anchor").attr("style",qt(n)),J(t,d),t.intersect=function(p){return W.info("Circle intersect",t,o,p),G.circle(t,o,p)},a}g(Vu,"anchor");function Fo(e,t,r,i,s,a,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,u=d/s,y=p/a,f=Math.sqrt(u**2+y**2);if(f>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-f**2),C=l+m*a*Math.sin(c)*(o?-1:1),b=h-m*s*Math.cos(c)*(o?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let B=Math.atan2((i-b)/a,(r-C)/s)-k;o&&B<0&&(B+=2*Math.PI),!o&&B>0&&(B-=2*Math.PI);const _=[];for(let M=0;M<20;M++){const v=M/19,z=k+v*B,D=C+s*Math.cos(z),I=b+a*Math.sin(z);_.push({x:D,y:I})}return _}g(Fo,"generateArcPoints");function Zu(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Zu,"calculateArcSagitta");async function Ku(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=g(z=>z+o,"calcTotalHeight"),l=g(z=>{const D=z/2;return[D/(2.5+z/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await st(e,t,it(t)),d=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,u]=l(d),y=Zu(d,p,u),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+y-y,C=d,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...Fo(-m/2,-C/2,-m/2,C/2,p,u,!1),{x:m/2,y:C/2},...Fo(m/2,C/2,m/2,-C/2,p,u,!0)],S=Z.svg(h),B=K(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const _=pt(k),M=S.path(_,B),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${p/2}, 0)`),J(t,v),t.intersect=function(z){return G.polygon(t,k,z)},h}g(Ku,"bowTieRect");function He(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(He,"insertPolygonShape");var ls=12;async function Qu(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+ls),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),d=0,p=h,u=-c,y=0,f=[{x:d+ls,y:u},{x:p,y:u},{x:p,y},{x:d,y},{x:d,y:u+ls},{x:d+ls,y:u}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(n),k=K(t,{}),S=pt(f),B=b.path(S,k);m=n.insert(()=>B,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=He(n,h,c,f);return i&&m.attr("style",i),J(t,m),t.intersect=function(b){return G.polygon(t,f,b)},n}g(Qu,"card");function Ju(e,t){const{nodeStyles:r}=Q(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=Z.svg(i),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=pt(o),c=n.path(h,l),d=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return G.polygon(t,o,p)},i}g(Ju,"choice");async function _n(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await st(e,t,it(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=Z.svg(a),y=K(t,{}),f=u.circle(0,0,c*2,y);d=a.insert(()=>f,":first-child"),d.attr("class","basic label-container").attr("style",qt(p))}else d=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return J(t,d),t.calcIntersect=function(u,y){const f=u.width/2;return G.circle(u,f,y)},t.intersect=function(u){return W.info("Circle intersect",t,c,u),G.circle(t,c,u)},a}g(_n,"circle");function tp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
231
|
-
M ${s.x},${s.y} L ${o.x},${o.y}`}g(tp,"createLine");function ep(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=Z.svg(s),l=K(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,a*2,l),c=tp(a),d=n.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>d),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),J(t,p),t.intersect=function(u){return W.info("crossedCircle intersect",t,{radius:a,point:u}),G.circle(t,a,u)},s}g(ep,"crossedCircle");function De(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:-u,y:-y})}return o}g(De,"generateCirclePoints");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+n,c=a.height+l,d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...De(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...De(h/2+d*2,-d,d,20,-180,-270),...De(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...De(h/2,c/2,d,20,0,90)],y=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...De(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...De(h/2+h*.1,-d,d,20,-180,-270),...De(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...De(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=Z.svg(s),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=pt(u).replace("Z",""),k=f.path(b,m),S=pt(y),B=f.path(S,{...m}),_=s.insert("g",":first-child");return _.insert(()=>B,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),o.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,_),t.intersect=function(M){return G.polygon(t,y,M)},s}g(rp,"curlyBraceLeft");function Pe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:u,y})}return o}g(Pe,"generateCirclePoints");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...Pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Pe(h/2+d*2,-d,d,20,-180,-270),...Pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Pe(h/2,c/2,d,20,0,90)],y=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...Pe(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Pe(h/2+d*2,-d,d,20,-180,-270),...Pe(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Pe(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=Z.svg(s),m=K(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=pt(u).replace("Z",""),k=f.path(b,m),S=pt(y),B=f.path(S,{...m}),_=s.insert("g",":first-child");return _.insert(()=>B,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,_),t.intersect=function(M){return G.polygon(t,y,M)},s}g(ip,"curlyBraceRight");function zt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,c=(a*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const p=n+d*c,u=e+r*Math.cos(p),y=t+r*Math.sin(p);o.push({x:-u,y:-y})}return o}g(zt,"generateCirclePoints");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?n*2:n),c=a.height+(t.look==="neo"?l*2:l),d=Math.max(5,c*.1),{cssStyles:p}=t,u=[...zt(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...zt(h/2+d*2,-d,d,20,-180,-270),...zt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...zt(h/2,c/2,d,20,0,90)],y=[...zt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...zt(-h/2-d/2,-d,d,20,0,90),...zt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...zt(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...zt(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...zt(h/2+d*2,-d,d,20,-180,-270),...zt(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...zt(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...zt(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...zt(-h/2-d/2,-d,d,20,0,90),...zt(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...zt(-h/2+d+d/2,c/2,d,30,-180,-270)],m=Z.svg(s),C=K(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=pt(u).replace("Z",""),S=m.path(k,C),_=pt(y).replace("Z",""),M=m.path(_,C),v=pt(f),z=m.path(v,{...C}),D=s.insert("g",":first-child");return D.insert(()=>z,":first-child").attr("stroke-opacity",0),D.insert(()=>S,":first-child"),D.insert(()=>M,":first-child"),D.attr("class","text"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${d-d/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-c/2+(t.padding??0)/2-(a.y-(a.top??0))})`),J(t,D),t.intersect=function(I){return G.polygon(t,f,I)},s}g(sp,"curlyBraces");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await st(e,t,it(t)),d=Math.max(n,(c.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),u=p/2,{cssStyles:y}=t,f=Z.svg(h),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=d,b=p,k=C-u,S=b/4,B=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...Ri(-k,-b/2,u,50,270,90)],_=pt(B),M=f.path(_,m),v=h.insert(()=>M,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-p/2})`),J(t,v),t.intersect=function(z){return G.polygon(t,B,z)},h}g(ap,"curvedTrapezoid");var Fb=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Ab=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Eb=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Jl=8,th=8;async function op(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<th&&(t.width=th);const b=m/2/(2.5+m/50);t.height=(t.height??0)-a-b*3,t.height<Jl&&(t.height=Jl)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t.width?t.width:l.width)+o,d=c/2,p=d/(2.5+c/50),u=(t.height?t.height:l.height)+a+p;let y;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=Z.svg(n),C=Ab(0,0,c,u,d,p),b=Eb(0,p,c,u,d,p),k=K(t,{}),S=m.path(C,k),B=m.path(b,K(t,{fill:"none"}));y=n.insert(()=>B,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),f&&y.attr("style",f)}else{const m=Fb(0,0,c,u,d,p);y=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",qt(f)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-c/2}, ${-(u/2+p)})`),J(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=G.rect(t,m),b=C.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=p-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}g(op,"cylinder");async function ni(e,t,r){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await st(e,t,it(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let d,{rx:p,ry:u}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,u=r.ry),t.look==="handDrawn"){const f=Z.svg(a),m=K(t,{}),C=p||u?f.path(sr(h,c,n,l,p||0),m):f.rectangle(h,c,n,l,m);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",qt(y))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",qt(p)).attr("ry",qt(u)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return J(t,d),t.calcIntersect=function(f,m){return G.rect(f,m)},t.intersect=function(f){return G.rect(t,f)},a}g(ni,"drawRect");async function np(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await ni(e,t,l);if(t.look==="handDrawn"){const u=Z.svg(h),y=K(t,{}),f=h.select(".basic.label-container > path:nth-child(2)"),m=f.node();if(!m)return h;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return h;return h.insert(()=>u.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),h.insert(()=>u.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),f.remove(),h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||o)??0,p=(Number(c.attr("height"))||n)??0;return d>0&&p>0&&c.attr("stroke-dasharray",`${d} ${p}`),h}g(np,"datastore");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=n.width+s,c=n.height+a,d=c*.2,p=-h/2,u=-c/2-d/2,{cssStyles:y}=t,f=Z.svg(o),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:u+d},{x:-p,y:u+d},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+d}],b=f.polygon(C.map(S=>[S.x,S.y]),m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),J(t,k),t.intersect=function(S){return G.rect(t,S)},o}g(lp,"dividedRectangle");async function hp(e,t){var u,y;const{labelStyles:r,nodeStyles:i}=Q(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-s;let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const f=Z.svg(n),m=K(t,{roughness:.2,strokeWidth:2.5}),C=K(t,{roughness:.2,strokeWidth:1.5}),b=f.circle(0,0,h*2,m),k=f.circle(0,0,c*2,C);d=n.insert("g",":first-child"),d.attr("class",qt(t.cssClasses)).attr("style",qt(p)),(u=d.node())==null||u.appendChild(b),(y=d.node())==null||y.appendChild(k)}else{d=n.insert("g",":first-child");const f=d.insert("circle",":first-child"),m=d.insert("circle");d.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return J(t,d),t.intersect=function(f){return W.info("DoubleCircle intersect",t,h,f),G.circle(t,h,f)},n}g(hp,"doublecircle");function cp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=Z.svg(a),{nodeBorder:h}=r,c=K(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const d=l.circle(0,0,o*2,c),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),J(t,p),t.intersect=function(u){return W.info("filledCircle intersect",t,{radius:o,point:u}),G.circle(t,o,u)},a}g(cp,"filledCircle");var eh=10,rh=10;async function dp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<eh&&(t.height=eh),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<rh&&(t.width=rh));const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=c,p=[{x:0,y:-c},{x:d,y:-c},{x:d/2,y:0}],{cssStyles:u}=t,y=Z.svg(o),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=pt(p),C=y.path(m,f),b=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,J(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return W.info("Triangle intersect",t,p,k),G.polygon(t,p,k)},o}g(dp,"flippedTriangle");function up(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=Q(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,d=-1*h/2,p=Z.svg(o),u=K(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const y=p.rectangle(c,d,l,h,u),f=o.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),J(t,f);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return G.rect(t,C)},o}g(up,"forkJoin");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+o*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+n*2,p=d/2,{cssStyles:u}=t,y=Z.svg(l),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2,y:-d/2},{x:c/2-p,y:-d/2},...Ri(-c/2+p,0,p,50,90,270),{x:c/2-p,y:d/2},{x:-c/2,y:d/2}],C=pt(m),b=y.path(C,f),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),J(t,k),t.intersect=function(S){return W.info("Pill intersect",t,{radius:p,point:S}),G.polygon(t,m,S)},l}g(pp,"halfRoundedRectangle");var Mb=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,h=t.look==="neo"?n:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:d}=await st(e,t,it(t)),p=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,u=p/s,y=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*u+h,f=[{x:u,y:0},{x:y-u,y:0},{x:y,y:-p/2},{x:y-u,y:-p},{x:u,y:-p},{x:0,y:-p/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=Z.svg(c),k=K(t,{}),S=Mb(0,0,y,p,u),B=b.path(S,k);m=c.insert(()=>B,":first-child").attr("transform",`translate(${-y/2}, ${p/2})`),C&&m.attr("style",C)}else m=He(c,y,p,f);return i&&m.attr("style",i),t.width=y,t.height=p,J(t,m),t.intersect=function(b){return G.polygon(t,f,b)},c}g(gp,"hexagon");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await st(e,t,it(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=Z.svg(s),h=K(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=pt(c),p=l.path(d,h),u=s.insert(()=>p,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-a/2}, ${-o/2})`),J(t,u),t.intersect=function(y){return W.info("Pill intersect",t,{points:c}),G.polygon(t,c,y)},s}g(fp,"hourglass");async function mp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await st(e,t,"icon-shape default"),p=t.pos==="t",u=n,y=n,{nodeBorder:f}=r,{stylesMap:m}=ai(t),C=-y/2,b=-u/2,k=t.label?8:0,S=Z.svg(h),B=K(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const _=S.rectangle(C,b,y,u,B),M=Math.max(y,c.width),v=u+c.height+k,z=S.rectangle(-M/2,-v/2,M,v,{...B,fill:"transparent",stroke:"none"}),D=h.insert(()=>_,":first-child"),I=h.insert(()=>z);if(t.icon){const Y=h.append("g");Y.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const H=Y.node().getBBox(),P=H.width,E=H.height,L=H.x,$=H.y;Y.attr("transform",`translate(${-P/2-L},${p?c.height/2+k/2-E/2-$:-c.height/2-k/2-E/2-$})`),Y.attr("style",`color: ${m.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-v/2:v/2-c.height})`),D.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),J(t,I),t.intersect=function(Y){if(W.info("iconSquare intersect",t,Y),!t.label)return G.rect(t,Y);const H=t.x??0,P=t.y??0,E=t.height??0;let L=[];return p?L=[{x:H-c.width/2,y:P-E/2},{x:H+c.width/2,y:P-E/2},{x:H+c.width/2,y:P-E/2+c.height+k},{x:H+y/2,y:P-E/2+c.height+k},{x:H+y/2,y:P+E/2},{x:H-y/2,y:P+E/2},{x:H-y/2,y:P-E/2+c.height+k},{x:H-c.width/2,y:P-E/2+c.height+k}]:L=[{x:H-y/2,y:P-E/2},{x:H+y/2,y:P-E/2},{x:H+y/2,y:P-E/2+u},{x:H+c.width/2,y:P-E/2+u},{x:H+c.width/2/2,y:P+E/2},{x:H-c.width/2,y:P+E/2},{x:H-c.width/2,y:P-E/2+u},{x:H-y/2,y:P-E/2+u}],G.polygon(t,L,Y)},h}g(mp,"icon");async function yp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await st(e,t,"icon-shape default"),p=20,u=t.label?8:0,y=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:C}=ai(t),b=Z.svg(h),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??m;const B=h.append("g");t.icon&&B.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=B.node().getBBox(),M=_.width,v=_.height,z=_.x,D=_.y,I=Math.max(M,v)*Math.SQRT2+p*2,Y=b.circle(0,0,I,k),H=Math.max(I,c.width),P=I+c.height+u,E=b.rectangle(-H/2,-P/2,H,P,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>Y,":first-child"),$=h.insert(()=>E);return B.attr("transform",`translate(${-M/2-z},${y?c.height/2+u/2-v/2-D:-c.height/2-u/2-v/2-D})`),B.attr("style",`color: ${C.get("stroke")??f};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${y?-P/2:P/2-c.height})`),L.attr("transform",`translate(0,${y?c.height/2+u/2:-c.height/2-u/2})`),J(t,$),t.intersect=function(A){return W.info("iconSquare intersect",t,A),G.rect(t,A)},h}g(yp,"iconCircle");async function Cp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await st(e,t,"icon-shape default"),u=t.pos==="t",y=n+d*2,f=n+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=ai(t),k=-f/2,S=-y/2,B=t.label?8:0,_=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const z=_.path(sr(k,S,f,y,5),M),D=Math.max(f,c.width),I=y+c.height+B,Y=_.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>z,":first-child").attr("class","icon-shape2"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),$=L.width,A=L.height,w=L.x,N=L.y;E.attr("transform",`translate(${-$/2-w},${u?c.height/2+B/2-A/2-N:-c.height/2-B/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${u?c.height/2+B/2:-c.height/2-B/2})`),J(t,P),t.intersect=function(E){if(W.info("iconSquare intersect",t,E),!t.label)return G.rect(t,E);const L=t.x??0,$=t.y??0,A=t.height??0;let w=[];return u?w=[{x:L-c.width/2,y:$-A/2},{x:L+c.width/2,y:$-A/2},{x:L+c.width/2,y:$-A/2+c.height+B},{x:L+f/2,y:$-A/2+c.height+B},{x:L+f/2,y:$+A/2},{x:L-f/2,y:$+A/2},{x:L-f/2,y:$-A/2+c.height+B},{x:L-c.width/2,y:$-A/2+c.height+B}]:w=[{x:L-f/2,y:$-A/2},{x:L+f/2,y:$-A/2},{x:L+f/2,y:$-A/2+y},{x:L+c.width/2,y:$-A/2+y},{x:L+c.width/2/2,y:$+A/2},{x:L-c.width/2,y:$+A/2},{x:L-c.width/2,y:$-A/2+y},{x:L-f/2,y:$-A/2+y}],G.polygon(t,w,E)},h}g(Cp,"iconRounded");async function xp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=Q(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await st(e,t,"icon-shape default"),u=t.pos==="t",y=n+d*2,f=n+d*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=ai(t),k=-f/2,S=-y/2,B=t.label?8:0,_=Z.svg(h),M=K(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const v=b.get("fill");M.stroke=v??C;const z=_.path(sr(k,S,f,y,.1),M),D=Math.max(f,c.width),I=y+c.height+B,Y=_.rectangle(-D/2,-I/2,D,I,{...M,fill:"transparent",stroke:"none"}),H=h.insert(()=>z,":first-child"),P=h.insert(()=>Y);if(t.icon){const E=h.append("g");E.html(`<g>${await ji(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),$=L.width,A=L.height,w=L.x,N=L.y;E.attr("transform",`translate(${-$/2-w},${u?c.height/2+B/2-A/2-N:-c.height/2-B/2-A/2-N})`),E.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-I/2:I/2-c.height})`),H.attr("transform",`translate(0,${u?c.height/2+B/2:-c.height/2-B/2})`),J(t,P),t.intersect=function(E){if(W.info("iconSquare intersect",t,E),!t.label)return G.rect(t,E);const L=t.x??0,$=t.y??0,A=t.height??0;let w=[];return u?w=[{x:L-c.width/2,y:$-A/2},{x:L+c.width/2,y:$-A/2},{x:L+c.width/2,y:$-A/2+c.height+B},{x:L+f/2,y:$-A/2+c.height+B},{x:L+f/2,y:$+A/2},{x:L-f/2,y:$+A/2},{x:L-f/2,y:$-A/2+c.height+B},{x:L-c.width/2,y:$-A/2+c.height+B}]:w=[{x:L-f/2,y:$-A/2},{x:L+f/2,y:$-A/2},{x:L+f/2,y:$-A/2+y},{x:L+c.width/2,y:$-A/2+y},{x:L+c.width/2/2,y:$+A/2},{x:L-c.width/2,y:$+A/2},{x:L-c.width/2,y:$-A/2+y},{x:L-f/2,y:$-A/2+y}],G.polygon(t,w,E)},h}g(xp,"iconSquare");async function bp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=Q(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,n??0);const{shapeSvg:d,bbox:p,label:u}=await st(e,t,"image-shape default"),y=t.pos==="t",f=-h/2,m=-c/2,C=t.label?8:0,b=Z.svg(d),k=K(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(f,m,h,c,k),B=Math.max(h,p.width),_=c+p.height+C,M=b.rectangle(-B/2,-_/2,B,_,{...k,fill:"none",stroke:"none"}),v=d.insert(()=>S,":first-child"),z=d.insert(()=>M);if(t.img){const D=d.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",c),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${y?_/2-c:-_/2})`)}return u.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),v.attr("transform",`translate(0,${y?p.height/2+C/2:-p.height/2-C/2})`),J(t,z),t.intersect=function(D){if(W.info("iconSquare intersect",t,D),!t.label)return G.rect(t,D);const I=t.x??0,Y=t.y??0,H=t.height??0;let P=[];return y?P=[{x:I-p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2},{x:I+p.width/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y-H/2+p.height+C},{x:I+h/2,y:Y+H/2},{x:I-h/2,y:Y+H/2},{x:I-h/2,y:Y-H/2+p.height+C},{x:I-p.width/2,y:Y-H/2+p.height+C}]:P=[{x:I-h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2},{x:I+h/2,y:Y-H/2+c},{x:I+p.width/2,y:Y-H/2+c},{x:I+p.width/2/2,y:Y+H/2},{x:I-p.width/2,y:Y+H/2},{x:I-p.width/2,y:Y-H/2+c},{x:I-h/2,y:Y-H/2+c}],G.polygon(t,P,D)},d}g(bp,"imageSquare");async function kp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(a??0)*2,(t==null?void 0:t.height)??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&p.attr("style",u)}else p=He(n,h,c,d);return i&&p.attr("style",i),t.width=h,t.height=c,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(kp,"inv_trapezoid");async function Tp(e,t){const{shapeSvg:r,bbox:i,label:s}=await st(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),J(t,a),t.intersect=function(l){return G.rect(t,l)},r}g(Tp,"labelRect");async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=He(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(Sp,"lean_left");async function wp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.height)??l.height)+a,c=((t==null?void 0:t.width)??l.width)+o,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:u}=t;if(t.look==="handDrawn"){const y=Z.svg(n),f=K(t,{}),m=pt(d),C=y.path(m,f);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&p.attr("style",u)}else p=He(n,c,h,d);return i&&p.attr("style",i),t.width=c,t.height=h,J(t,p),t.intersect=function(y){return G.polygon(t,d,y)},n}g(wp,"lean_right");function Bp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=Z.svg(s),d=K(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=pt(h),u=c.path(p,d),y=s.insert(()=>u,":first-child");return y.attr("class","outer-path"),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-n})`),J(t,y),t.intersect=function(f){return W.info("lightningBolt intersect",t,f),G.polygon(t,h,f)},s}g(Bp,"lightningBolt");var Ob=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),$b=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ib=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ih=10,sh=10;async function _p(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<sh&&(t.width=sh);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<ih&&(t.height=ih)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=c/2,p=d/(2.5+c/50),u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,y=u*.1;let f;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=Z.svg(n),b=$b(0,0,c,u,d,p,y),k=Ib(0,p,c,u,d,p),S=K(t,{}),B=C.path(b,S),_=C.path(k,S);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>B,":first-child"),f.attr("class","basic label-container"),m&&f.attr("style",m)}else{const C=Ob(0,0,c,u,d,p,y);f=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",qt(m)).attr("style",i)}return f.attr("label-offset-y",p),f.attr("transform",`translate(${-c/2}, ${-(u/2+p)})`),J(t,f),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let S=p*p*(1-k*k/(d*d));S>0&&(S=Math.sqrt(S)),S=p-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}g(_p,"linedCylinder");async function vp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?d/4:d/8,u=d+p,{cssStyles:y}=t,f=Z.svg(n),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:u/2},...ir(-c/2-c/2*.1,u/2,c/2+c/2*.1,u/2,p,.8),{x:c/2+c/2*.1,y:-u/2},{x:-c/2-c/2*.1,y:-u/2},{x:-c/2,y:-u/2},{x:-c/2,y:u/2*1.1},{x:-c/2,y:-u/2}],b=f.polygon(C.map(S=>[S.x,S.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),J(t,k),t.intersect=function(S){return G.polygon(t,C,S)},n}g(vp,"linedWaveEdgedRect");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await st(e,t,it(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,u=d-2*n,y=p-2*n,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Z.svg(l),k=K(t,{}),S=[{x:f-n,y:m+n},{x:f-n,y:m+y+n},{x:f+u-n,y:m+y+n},{x:f+u-n,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m+y-n},{x:f+u+n,y:m+y-n},{x:f+u+n,y:m-n},{x:f+n,y:m-n},{x:f+n,y:m},{x:f,y:m},{x:f,y:m+n}],B=[{x:f,y:m+n},{x:f+u-n,y:m+n},{x:f+u-n,y:m+y},{x:f+u,y:m+y},{x:f+u,y:m},{x:f,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=pt(S);let M=b.path(_,k);const v=pt(B);let z=b.path(v,k);t.look!=="handDrawn"&&(M=vo(M),z=vo(z));const D=l.insert("g",":first-child");return D.insert(()=>M),D.insert(()=>z),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),J(t,D),t.intersect=function(I){return G.polygon(t,S,I)},l}g(Lp,"multiRect");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const d=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,u=t.look==="neo"?p/4:p/8,y=p+(c?u/2:-u/2),f=-d/2,m=-y/2,C=10,{cssStyles:b}=t,k=ir(f-C,m+y+C,f+d-C,m+y+C,u,.8),S=k==null?void 0:k[k.length-1],B=[{x:f-C,y:m+C},{x:f-C,y:m+y+C},...k,{x:f+d-C,y:S.y-C},{x:f+d,y:S.y-C},{x:f+d,y:S.y-2*C},{x:f+d+C,y:S.y-2*C},{x:f+d+C,y:m-C},{x:f+C,y:m-C},{x:f+C,y:m},{x:f,y:m},{x:f,y:m+C}],_=[{x:f,y:m+C},{x:f+d-C,y:m+C},{x:f+d-C,y:S.y-C},{x:f+d,y:S.y-C},{x:f+d,y:m},{x:f,y:m}],M=Z.svg(s),v=K(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const z=pt(B),D=M.path(z,v),I=pt(_),Y=M.path(I,v),H=s.insert(()=>D,":first-child");return H.insert(()=>Y),H.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&H.selectAll("path").attr("style",i),H.attr("transform",`translate(0,${-u/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-u/2-(a.y-(a.top??0))})`),J(t,H),t.intersect=function(P){return G.polygon(t,B,P)},s}g(Fp,"multiWaveEdgedRectangle");async function Ap(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i,t.useHtmlLabels||ee(_t())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,p=-c/2,{cssStyles:u}=t,y=Z.svg(o),f=K(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=y.rectangle(d,p,h,c,f),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,C),t.intersect=function(b){return G.rect(t,b)},o}g(Ap,"note");var Db=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const u=Z.svg(s),y=K(t,{}),f=Db(0,0,l),m=u.path(f,y);d=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&d.attr("style",p)}else d=He(s,l,l,c),d.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&d.attr("style",i),J(t,d),t.calcIntersect=function(u,y){const f=u.width,m=[{x:f/2,y:0},{x:f,y:-f/2},{x:f/2,y:-f},{x:0,y:-f/2}],C=G.polygon(u,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(Ep,"question");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a),d=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),p=-c/2,u=-d/2,y=u/2,f=[{x:p+y,y:u},{x:p,y:0},{x:p+y,y:-u},{x:-p,y:-u},{x:-p,y:u}],{cssStyles:m}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=pt(f),S=C.path(k,b),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-y/2},0)`),h.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),J(t,B),t.intersect=function(_){return G.polygon(t,f,_)},n}g(Mp,"rect_left_inv_arrow");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Ze(n,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(ee(xt())){const v=c.children[0],z=ht(c);d=v.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}W.info("Text 2",l);const p=l||[],u=c.getBBox(),y=await Ze(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),f=y.children[0],m=ht(y);d=f.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);const C=(t.padding||0)/2;ht(y).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+C+5)+")"),ht(c).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),S=-d.width/2-C,B=-d.height/2-C;let _,M;if(t.look==="handDrawn"){const v=Z.svg(a),z=K(t,{}),D=v.path(sr(S,B,b,k,t.rx||0),z),I=v.line(-d.width/2-C,-d.height/2-C+u.height+C,d.width/2+C,-d.height/2-C+u.height+C,z);M=a.insert(()=>(W.debug("Rough node insert CXC",D),I),":first-child"),_=a.insert(()=>(W.debug("Rough node insert CXC",D),D),":first-child")}else _=o.insert("rect",":first-child"),M=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),M.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+u.height+C).attr("y2",-d.height/2-C+u.height+C);return J(t,_),t.intersect=function(v){return G.rect(t,v)},a}g(Op,"rectWithTitle");async function $p(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return ni(e,t,s)}g($p,"roundedRect");var hr=8;async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?hr:hr*2),c=((t==null?void 0:t.height)??n.height)+a*2,d=h-hr,p=c,u=hr-h/2,y=-c/2,{cssStyles:f}=t,m=Z.svg(o),C=K(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:u,y},{x:u+d,y},{x:u+d,y:y+p},{x:u-hr,y:y+p},{x:u-hr,y},{x:u,y},{x:u,y:y+p}],k=m.polygon(b.map(B=>[B.x,B.y]),C),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",qt(f)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${hr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),J(t,S),t.intersect=function(B){return G.rect(t,B)},o}g(Ip,"shadedProcess");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=c,u=d/1.5,y=-p/2,f=-u/2,{cssStyles:m}=t,C=Z.svg(n),b=K(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:f},{x:y,y:f+u},{x:y+p,y:f+u},{x:y+p,y:f-u/2}],S=pt(k),B=C.path(S,b),_=n.insert(()=>B,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),J(t,_),t.intersect=function(M){return G.polygon(t,k,M)},n}g(Dp,"slopedRect");async function Pp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return ni(e,t,a)}g(Pp,"squareRect");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?a*2:a),d=h/2,{cssStyles:p}=t,u=Z.svg(n),y=K(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...Ri(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...Ri(c/2-d,0,d,50,270,450)],m=pt(f),C=u.path(m,y),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),J(t,b),t.intersect=function(k){return G.polygon(t,f,k)},n}g(Rp,"stadium");async function qp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ni(e,t,r)}g(qp,"state");function Np(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=Z.svg(c),p=K(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const u=d.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),y=n??l,f=(t.width??0)*5/14,m=d.circle(0,0,f,{...p,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>u,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const S=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",B=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${B})`)}return J(t,C),t.intersect=function(S){return G.circle(t,(t.width??0)/2,S)},c}g(Np,"stateEnd");function Wp(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=Z.svg(a).circle(0,0,t.width,U0(i));o=a.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return J(t,o),t.intersect=function(h){return G.circle(t,(t.width??7)/2,h)},a}g(Wp,"stateStart");var Ar=8;async function zp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=((t==null?void 0:t.width)??l.width)+2*Ar+a,c=((t==null?void 0:t.height)??l.height)+o,d=h-2*Ar,p=c,u=-h/2,y=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const m=Z.svg(n),C=K(t,{}),b=m.rectangle(u,y,d+16,p,C),k=m.line(u+Ar,y,u+Ar,y+p,C),S=m.line(u+Ar+d,y,u+Ar+d,y+p,C);n.insert(()=>k,":first-child"),n.insert(()=>S,":first-child");const B=n.insert(()=>b,":first-child"),{cssStyles:_}=t;B.attr("class","basic label-container").attr("style",qt(_)),J(t,B)}else{const m=He(n,d,p,f);i&&m.attr("style",i),J(t,m)}return t.intersect=function(m){return G.polygon(t,f,m)},n}g(zp,"subroutine");var za=.2;async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-za*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await st(e,t,it(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=za*h,d=za*h,u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+c-c,y=h,f=-u/2,m=-y/2,{cssStyles:C}=t,b=Z.svg(n),k=K(t,{}),S=[{x:f-c/2,y:m},{x:f+u+c/2,y:m},{x:f+u+c/2,y:m+y},{x:f-c/2,y:m+y}],B=[{x:f+u-c/2,y:m+y},{x:f+u+c/2,y:m+y},{x:f+u+c/2,y:m+y-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=pt(S),M=b.path(_,k),v=pt(B),z=b.path(v,{...k,fillStyle:"solid"}),D=n.insert(()=>z,":first-child");return D.insert(()=>M,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),J(t,D),t.intersect=function(I){return G.polygon(t,S,I)},n}g(Hp,"taggedRect");async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await st(e,t,it(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,d=.2*l,p=l+h,{cssStyles:u}=t,y=Z.svg(s),f=K(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:p/2},...ir(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-d*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-d},{x:C+n,y:(b+l)*.9},...ir(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],S=pt(m),B=y.path(S,f),_=pt(k),M=y.path(_,{...f,fillStyle:"solid"}),v=s.insert(()=>M,":first-child");return v.insert(()=>B,":first-child"),v.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),J(t,v),t.intersect=function(z){return G.polygon(t,m,z)},s}g(Yp,"taggedWaveEdgedRectangle");async function Up(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await st(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=s.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",n),J(t,c),t.intersect=function(d){return G.rect(t,d)},s}g(Up,"text");var Pb=g((e,t,r,i,s,a)=>`M${e},${t}
|
|
197
|
+
`);return pp(i)}f(fp,"preprocessMarkdown");function gp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}f(gp,"nonMarkdownToLines");function mp(e,t={}){const r=fp(e,t),i=Xt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
|
|
198
|
+
`).forEach((h,u)=>{u!==0&&(a++,s.push([])),h.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&s[a].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return f(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}f(mp,"markdownToLines");function yp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(yp,"nonMarkdownToHTML");function Cp(e,{markdownAutoWrap:t}={}){const r=Xt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(W.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(Cp,"markdownToHTML");function xp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(xp,"splitTextToChars");function bp(e,t){const r=xp(t.content);return fl(e,[],r,t.type)}f(bp,"splitWordToFitWidth");function fl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?fl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(fl,"splitWordToFitWidthRecursion");function kp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
199
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ka(e,t)}f(kp,"splitLineToFitWidth");function ka(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return ka(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=bp(t,a);r.push([n]),l.content&&e.unshift(l)}return ka(e,t,r)}f(ka,"splitLineToFitWidthRecursion");function Cn(e,t){t&&e.attr("style",t)}f(Cn,"applyStyle");var uc=16384;async function Tp(e,t,r,i,s=!1,a=te()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,uc)}px`),o.attr("height",`${Math.min(10*r,uc)}px`);const n=o.append("xhtml:div"),l=xs(t.label)?await $d(t.label.replace(Ls.lineBreakRegex,`
|
|
200
|
+
`),a):ze(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),Cn(h,t.labelStyle),h.attr("class",`${c} ${i}`),Cn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await Vr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),o.node()}f(Tp,"addHtmlSpan");function Pa(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(Pa,"createTspan");function Sp(e,t,r){const i=e.append("text"),s=Pa(i,1,t);Ia(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(Sp,"computeWidthOfText");function rk(e,t,r){var o;const i=e.append("text"),s=Pa(i,1,t);Ia(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(rk,"computeDimensionOfText");function wp(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=f(d=>Sp(o,1.1,d)<=e,"checkWidth"),p=u(h)?[h]:kp(h,u);for(const d of p){const m=Pa(l,c,1.1,s);Ia(m,d),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}f(wp,"createFormattedText");function xn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(xn,"decodeHTMLEntities");function Ia(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(xn(r.content)):s.text(" "+xn(r.content))})}f(Ia,"updateTextContentAndStyles");async function _p(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await dx(n)?await Fs(n,void 0,{class:"label-icon"}):`<i class='${ze(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(_p,"replaceIconSubstring");var Ve=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(W.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?Cp(t,h):yp(t),p=await _p(Or(u),h),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:xs(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Tp(e,m,l,s,c,h)}else{const u=Or(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?mp(u.replace("<br>","<br/>"),h):gp(u),d=wp(l,e,p,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Pt(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(d).select("text").attr("style",y)}return i?Pt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Pt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Co(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function ik(e,t){return e[0]===t[0]&&e[1]===t[1]}function sk(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)Co(c,n,s);const l=(function(c,h,u){const p=[];for(const k of c){const S=[...k];ik(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&p.push(S)}const d=[];h=Math.max(h,.1);const m=[];for(const k of p)for(let S=0;S<k.length-1;S++){const w=k[S],B=k[S+1];if(w[1]!==B[1]){const L=Math.min(w[1],B[1]);m.push({ymin:L,ymax:Math.max(w[1],B[1]),x:L===w[1]?w[0]:B[0],islope:(B[0]-w[0])/(B[1]-w[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return d;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>x);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:x,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=x))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(u!==1||C%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const w=y[k].edge,B=y[S].edge;d.push([[Math.round(w.x),x],[Math.round(B.x),x]])}x+=u,y.forEach((k=>{k.edge.x=k.edge.x+u*k.edge.islope})),C++}return d})(o,a,i);if(s){for(const c of o)Co(c,n,-s);(function(c,h,u){const p=[];c.forEach((d=>p.push(...d))),Co(p,h,u)})(l,n,-s)}return l}function Ms(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),sk(e,s,i,a||1)}class gl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ms(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Ra(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class ak extends gl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ms(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)Ra([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class ok extends gl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class nk{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ms(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Ra(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=d+u+m*s,x=p-o+2*Math.random()*o,C=y-o+2*Math.random()*o,k=this.helper.ellipse(x,C,a,a,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class lk{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ms(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=Ra(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const p=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const m=d*(i+s),y=m+i,x=[h[0]+m*Math.cos(p)+c*Math.cos(p),h[1]+m*Math.sin(p)+c*Math.sin(p)],C=[h[0]+y*Math.cos(p)+c*Math.cos(p),h[1]+y*Math.sin(p)+c*Math.sin(p)];a.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),a}}class hk{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Ms(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=Ra(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const p=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const Ee={};class ck{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const uk=0,xo=1,dc=2,js={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 bo(e,t){return e.type===t}function ml(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:uk,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:xo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:dc,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!bo(a,dc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return ml("M0,0"+e);s++,o=js[a.text],i=a.text}else bo(a,xo)?o=js[i]:(s++,o=js[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!bo(c,xo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof js[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Bp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function vp(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,p]=h;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const y=i+2*(d-i)/3,x=s+2*(m-s)/3,C=u+2*(d-u)/3,k=p+2*(m-p)/3;t.push({key:"C",data:[y,x,C,k,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=h,y=i+2*(u-i)/3,x=s+2*(p-s)/3,C=d+2*(u-d)/3,k=m+2*(p-m)/3;t.push({key:"C",data:[y,x,C,k,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(h[0]),p=Math.abs(h[1]),d=h[2],m=h[3],y=h[4],x=h[5],C=h[6];u===0||p===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(Lp(i,s,x,C,u,p,d,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Ji(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Lp(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,y=0,x=0;if(c)[d,m,y,x]=c;else{[e,t]=Ji(e,t,-h),[r,i]=Ji(r,i,-h);const j=(e-r)/2,A=(t-i)/2;let O=j*j/(s*s)+A*A/(a*a);O>1&&(O=Math.sqrt(O),s*=O,a*=O);const v=s*s,R=a*a,P=v*R-v*A*A-R*j*j,H=v*A*A+R*j*j,Z=(n===l?-1:1)*Math.sqrt(Math.abs(P/H));y=Z*s*A/a+(e+r)/2,x=Z*-a*j/s+(t+i)/2,d=Math.asin(parseFloat(((t-x)/a).toFixed(9))),m=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const j=m,A=r,O=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Lp(r=y+s*Math.cos(m),i=x+a*Math.sin(m),A,O,s,a,o,0,l,[m,j,y,x])}C=m-d;const k=Math.cos(d),S=Math.sin(d),w=Math.cos(m),B=Math.sin(m),L=Math.tan(C/4),E=4/3*s*L,F=4/3*a*L,X=[e,t],N=[e+E*S,t-F*k],z=[r+E*B,i-F*w],at=[r,i];if(N[0]=2*X[0]-N[0],N[1]=2*X[1]-N[1],c)return[N,z,at].concat(p);{p=[N,z,at].concat(p);const j=[];for(let A=0;A<p.length;A+=3){const O=Ji(p[A][0],p[A][1],h),v=Ji(p[A+1][0],p[A+1][1],h),R=Ji(p[A+2][0],p[A+2][1],h);j.push([O[0],O[1],v[0],v[1],R[0],R[1]])}return j}}const dk={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return Ta(e,t,r)},ellipse:function(e,t,r,i,s){const a=Ep(r,i,s);return bn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return $r(e,t,r,i,s,!0)}};function Fp(e,t,r,i,s){return{type:"path",ops:$r(e,t,r,i,s)}}function aa(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...$r(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...$r(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Fp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function pk(e,t,r,i,s){return(function(a,o){return aa(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function pc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ys(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ys(r[0],1.5*(1+.22*t.roughness),mc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Ys(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ys(o,1.5*(1+.22*t.roughness),mc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Ep(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=Mt(o*l,r),n+=Mt(n*l,r),{increment:a,rx:o,ry:n}}function bn(e,t,r,i){const[s,a]=yc(i.increment,e,t,i.rx,i.ry,1,i.increment*Ta(.1,Ta(.4,1,r),r),r);let o=Sa(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=yc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Sa(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function fc(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=Mt(.01*u,l),p+=Mt(.01*p,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,x=Math.min(y/2,(m-d)/2),C=Cc(x,c,h,u,p,d,m,1,l);if(!l.disableMultiStroke){const k=Cc(x,c,h,u,p,d,m,1.5,l);C.push(...k)}return o&&(n?C.push(...$r(c,h,c+u*Math.cos(d),h+p*Math.sin(d),l),...$r(c,h,c+u*Math.cos(m),h+p*Math.sin(m),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+p*Math.sin(d)]})),{type:"path",ops:C}}function gc(e,t){const r=vp(Bp(ml(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...$r(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,p,d]=n;i.push(...fk(l,c,h,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...$r(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function ko(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+Mt(s,t),i[o][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function li(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Ee[s])switch(s){case"zigzag":Ee[s]||(Ee[s]=new ak(i));break;case"cross-hatch":Ee[s]||(Ee[s]=new ok(i));break;case"dots":Ee[s]||(Ee[s]=new nk(i));break;case"dashed":Ee[s]||(Ee[s]=new lk(i));break;case"zigzag-line":Ee[s]||(Ee[s]=new hk(i));break;default:s="hachure",Ee[s]||(Ee[s]=new gl(i))}return Ee[s]})(t,dk).fillPolygons(e,t)}function mc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ap(e){return e.randomizer||(e.randomizer=new ck(e.seed||0)),e.randomizer.next()}function Ta(e,t,r,i=1){return r.roughness*i*(Ap(r)*(t-e)+e)}function Mt(e,t,r=1){return Ta(-e,e,t,r)}function $r(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=kn(e,t,r,i,s,!0,!1);if(o)return n;const l=kn(e,t,r,i,s,!0,!0);return n.concat(l)}function kn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,p=.2+.2*Ap(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=Mt(d,s,c),m=Mt(m,s,c);const y=[],x=()=>Mt(u,s,c),C=()=>Mt(h,s,c),k=s.preserveVertices;return o?y.push({op:"move",data:[e+(k?0:x()),t+(k?0:x())]}):y.push({op:"move",data:[e+(k?0:Mt(h,s,c)),t+(k?0:Mt(h,s,c))]}),o?y.push({op:"bcurveTo",data:[d+e+(r-e)*p+x(),m+t+(i-t)*p+x(),d+e+2*(r-e)*p+x(),m+t+2*(i-t)*p+x(),r+(k?0:x()),i+(k?0:x())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(k?0:C()),i+(k?0:C())]}),y}function Ys(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return Sa(i,null,r)}function Sa(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...kn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function yc(e,t,r,i,s,a,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=Mt(.5,n)-Math.PI/2;c.push([Mt(a,n)+t+.9*i*Math.cos(h-e),Mt(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let p=h;p<u;p+=e){const d=[Mt(a,n)+t+i*Math.cos(p),Mt(a,n)+r+s*Math.sin(p)];l.push(d),c.push(d)}c.push([Mt(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),Mt(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([Mt(a,n)+t+.98*i*Math.cos(h+o),Mt(a,n)+r+.98*s*Math.sin(h+o)]),c.push([Mt(a,n)+t+.9*i*Math.cos(h+.5*o),Mt(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function Cc(e,t,r,i,s,a,o,n,l){const c=a+Mt(.1,l),h=[];h.push([Mt(n,l)+t+.9*i*Math.cos(c-e),Mt(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([Mt(n,l)+t+i*Math.cos(u),Mt(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Sa(h,null,l)}function fk(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:Mt(c[0],n)),o[1]+(p?0:Mt(c[0],n))]}),h=p?[s,a]:[s+Mt(c[d],n),a+Mt(c[d],n)],l.push({op:"bcurveTo",data:[e+Mt(c[d],n),t+Mt(c[d],n),r+Mt(c[d],n),i+Mt(c[d],n),h[0],h[1]]});return l}function ts(e){return[...e]}function xc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(ts(e[0]),ts(e[1]),ts(e[2]),ts(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(ts(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function oa(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function gk(e,t,r){const i=oa(t,r);if(i===0)return oa(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),oa(e,Wr(t,r,s))}function Wr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Tn(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],p=n[l+3];let d=3*h[0]-2*c[0]-p[0];d*=d;let m=3*h[1]-2*c[1]-p[1];m*=m;let y=3*u[0]-2*p[0]-c[0];y*=y;let x=3*u[1]-2*p[1]-c[1];return x*=x,d<y&&(d=y),m<x&&(m=x),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(oa(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],p=Wr(l,c,.5),d=Wr(c,h,.5),m=Wr(h,u,.5),y=Wr(p,d,.5),x=Wr(d,m,.5),C=Wr(y,x,.5);Tn([l,p,y,C],0,r,s),Tn([C,x,m,u],0,r,s)}var a,o;return s}function mk(e,t){return wa(e,0,e.length,t)}function wa(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=gk(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(wa(e,t,c+1,i,a),wa(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function To(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Tn(e,3*a,t,i);return r&&r>0?wa(i,0,i.length,r):i}const De="none";class _a{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Fp(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=pk(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(ko([c],o)):n.push(li([c],o))}return o.stroke!==De&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Ep(i,s,o),c=bn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=bn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(li([c.estimatedPoints],o));return o.stroke!==De&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[aa(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=fc(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const d=fc(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",h.push(d)}else h.push((function(p,d,m,y,x,C,k){const S=p,w=d;let B=Math.abs(m/2),L=Math.abs(y/2);B+=Mt(.01*B,k),L+=Mt(.01*L,k);let E=x,F=C;for(;E<0;)E+=2*Math.PI,F+=2*Math.PI;F-E>2*Math.PI&&(E=0,F=2*Math.PI);const X=(F-E)/k.curveStepCount,N=[];for(let z=E;z<=F;z+=X)N.push([S+B*Math.cos(z),w+L*Math.sin(z)]);return N.push([S+B*Math.cos(F),w+L*Math.sin(F)]),N.push([S,w]),li([N],k)})(t,r,i,s,a,o,c));return c.stroke!==De&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=pc(t,i);if(i.fill&&i.fill!==De)if(i.fillStyle==="solid"){const o=pc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...To(xc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...To(xc(c),10,(1+i.roughness)/2))}o.length&&s.push(li([o],i))}return i.stroke!==De&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=aa(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ko([t],i)):s.push(li([t],i))),i.stroke!==De&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==De,o=i.stroke!==De,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,p){const d=vp(Bp(ml(h))),m=[];let y=[],x=[0,0],C=[];const k=()=>{C.length>=4&&y.push(...To(C,u)),C=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of d)switch(B){case"M":S(),x=[L[0],L[1]],y.push(x);break;case"L":k(),y.push([L[0],L[1]]);break;case"C":if(!C.length){const E=y.length?y[y.length-1]:x;C.push([E[0],E[1]])}C.push([L[0],L[1]]),C.push([L[2],L[3]]),C.push([L[4],L[5]]);break;case"Z":k(),y.push([x[0],x[1]])}if(S(),!p)return m;const w=[];for(const B of m){const L=mk(B,p);L.length&&w.push(L)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=gc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=gc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(ko(l,i));else s.push(li(l,i));return o&&(n?l.forEach((h=>{s.push(aa(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:De};break;case"fillPath":o={d:this.opsToPath(a),stroke:De,strokeWidth:0,fill:i.fill||De};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||De,strokeWidth:i,fill:De}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class yk{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Us="http://www.w3.org/2000/svg";class Ck{constructor(t,r){this.svg=t,this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Us,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Us,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Us,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Us,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var ft={canvas:(e,t)=>new yk(e,t),svg:(e,t)=>new Ck(e,t),generator:e=>new _a(e),newSeed:()=>_a.newSeed()},xk=1,bk=3;async function yl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Cl(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const o=zt().fontSize?zt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=Td.fontSize]=Oa(o),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}f(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}f(yl,"configureLabelImages");function Cl(e){var r;return e.nodeType===bk?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==xk||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Cl)}f(Cl,"hasTextBesidesImages");var bc=3,kk=32,Tk=f(async(e,t,r)=>{var C,k,S;const i=zt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",oe(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(w=>({text:w,cssClass:"c4-descr"}))].filter(w=>w.text),l=t.width?Math.max(t.width-2*(t.padding??0),kk):((k=zt().flowchart)==null?void 0:k.wrappingWidth)??200,h=((S=i.c4)==null?void 0:S.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async w=>{const B=a.append("g").attr("class",w.cssClass),L=await Ve(B,ze(Or(w.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Pt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Pt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:B,box:B.node().getBBox()}})),p=Math.max(...u.map(({box:w})=>w.width),0);let d=0;for(const{el:w,box:B}of u)w.attr("transform",`translate(${p/2-B.x-B.width/2}, ${d-B.y})`),d+=B.height+bc;const m=u.length>0?d-bc:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-p/2}, ${-m/2})`);const y=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:a}},"c4LabelHelper"),St=f(async(e,t,r)=>{var d,m;if(t.stereotype!==void 0)return Tk(e,t,r);let i;const s=t.useHtmlLabels||lr((d=zt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",oe(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ve(o,ze(Or(n),zt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((m=zt().flowchart)==null?void 0:m.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},zt()),u=((t==null?void 0:t.padding)??0)/2;let p;if(s){const y=h.children[0],x=Pt(h);await yl(y),p=await Vr.measure(()=>y.getBoundingClientRect()),x.attr("width",p.width),x.attr("height",p.height)}else p=await Vr.measure(()=>h.getBBox());return s?o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):o.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:p,halfPadding:u,label:o}},"labelHelper"),So=f(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??be(zt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ve(s,ze(Or(t),zt()),{useHtmlLabels:i,width:r.width||((c=(l=zt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2;let n;if(be(zt())){const h=a.children[0],u=Pt(a);n=await Vr.measure(()=>h.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await Vr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),Ct=f((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),wt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function jt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(jt,"createPathFromPoints");function Dr(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,p=t+c/2;for(let d=0;d<=50;d++){const m=d/50,y=e+m*l,x=p+s*Math.sin(u*(y-e));o.push({x:y,y:x})}return o}f(Dr,"generateFullSineWavePoints");function ir(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(ir,"generateCirclePoints");function Sn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(Sn,"mergePaths");var Sk=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),ti=Sk,He=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),wk=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=zt(),n=be(o);return await Ve(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Fr=wk;function Mp(e,t){return e.intersect(t)}f(Mp,"intersectNode");var _k=Mp;function Op(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}f(Op,"intersectEllipse");var $p=Op;function Dp(e,t,r){return $p(e,t,t,r)}f(Dp,"intersectCircle");var Bk=Dp;function Pp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&wn(n,l))return;const h=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+p,m=h*t.x+u*t.y+p;if(Math.abs(d)<c&&Math.abs(m)<c&&wn(d,m))return;const y=s*u-h*a;if(y===0)return;const x=Math.abs(y/2);let C=a*p-u*o;const k=C<0?(C-x)/y:(C+x)/y;C=h*o-s*p;const S=C<0?(C-x)/y:(C+x)/y;return{x:k,y:S}}}f(Pp,"intersectLine");function wn(e,t){return e*t>0}f(wn,"sameSign");var vk=Pp;function Ip(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],p=t[h<t.length-1?h+1:0],d=vk(e,r,{x:l+u.x,y:c+u.y},{x:l+p.x,y:c+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let p=h.x-r.x,d=h.y-r.y,m=Math.sqrt(p*p+d*d),y=u.x-r.x,x=u.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),a[0]):e}f(Ip,"intersectPolygon");var Lk=Ip,ht={node:_k,circle:Bk,ellipse:$p,polygon:Lk,rect:ti};function Rp(e,t){const{labelStyles:r}=xt(t);t.labelStyle=r;const i=wt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=ft.svg(a),c=dt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",oe(n)),Ct(t,u),t.intersect=function(p){return W.info("Circle intersect",t,o,p),ht.circle(t,o,p)},a}f(Rp,"anchor");function _n(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,m=p/a,y=Math.sqrt(d**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=l+x*a*Math.sin(h)*(o?-1:1),k=c-x*s*Math.cos(h)*(o?-1:1),S=Math.atan2((t-k)/a,(e-C)/s);let B=Math.atan2((i-k)/a,(r-C)/s)-S;o&&B<0&&(B+=2*Math.PI),!o&&B>0&&(B-=2*Math.PI);const L=[];for(let E=0;E<20;E++){const F=E/19,X=S+F*B,N=C+s*Math.cos(X),z=k+a*Math.sin(X);L.push({x:N,y:z})}return L}f(_n,"generateArcPoints");function qp(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(qp,"calculateArcSagitta");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(X=>X+o,"calcTotalHeight"),l=f(X=>{const N=X/2;return[N/(2.5+X/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[p,d]=l(u),m=qp(u,p,d),x=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+m-m,C=u,{cssStyles:k}=t,S=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},..._n(-x/2,-C/2,-x/2,C/2,p,d,!1),{x:x/2,y:C/2},..._n(x/2,C/2,x/2,-C/2,p,d,!0)],w=ft.svg(c),B=dt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=jt(S),E=w.path(L,B),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${p/2}, 0)`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,S,X)},c}f(Np,"bowTieRect");async function zp(e,t,{config:{themeVariables:r}}){var E;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(o.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),p=Math.max(o.height+c*2+u,t.height??0),d=-p/2+u,m=p/2,y=h*.72,x=[`M${-h/2},${d}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${h/2},${d}`,`A${h/2},${u} 0 0 0 ${-h/2},${d}`,"Z"].join(" "),{cssStyles:C}=t,k=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const X=ft.svg(a).path(x,dt(t,{}));(E=k.node())==null||E.appendChild(X),C&&k.attr("style",C)}else k.append("path").attr("d",x).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Ct(t,k);const S=d+(m-d)/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`);const w=12,B=f((F,X,N)=>Array.from({length:w+1},(z,at)=>{const j=Math.PI-at*Math.PI/w;return{x:F*Math.cos(j),y:X+N*u*Math.sin(j)}}),"arc"),L=[...B(h/2,d,-1),...B(y/2,m,1).reverse()];return t.intersect=function(F){return ht.polygon(t,L,F)},a}f(zp,"bucket");var kc=20,Tc=8,Fk=80,wo=8;async function Wp(e,t){const{themeVariables:r}=zt(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:a}=xt(t),{shapeSvg:o,bbox:n}=await St(e,t,wt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,Fk,(t==null?void 0:t.width)??0),u=Math.max(c+Tc+kc+l*2,(t==null?void 0:t.height)??0),p=-h/2,d=-u/2,m=-28/2,y=o.select(".label");y&&(t.useHtmlLabels??be(zt())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let x;if(t.look==="handDrawn"){const B=ft.svg(o),L=dt(t,{fill:i,stroke:s,fillStyle:"solid"}),E=B.path(He(p,d,h,u,wo),L);x=o.insert(()=>E,":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",oe(t.cssStyles))}else x=o.insert("rect",":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",wo).attr("ry",wo).attr("x",p).attr("y",d).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const C=d+l+c+Tc;o.append("line").attr("class","collapsed-separator").attr("x1",p+8).attr("y1",C).attr("x2",p+h-8).attr("y2",C).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=C+kc/2,S=2.5,w=10;for(let B=-1;B<=1;B++)o.append("circle").attr("class","collapsed-indicator").attr("cx",B*w).attr("cy",k).attr("r",S).attr("fill",s);return Ct(t,x),t.calcIntersect=function(B,L){return ht.rect(B,L)},t.intersect=function(B){return ht.rect(t,B)},o}f(Wp,"collapsedGroup");function hr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(hr,"insertPolygonShape");var Ek=["right","left","up","down"],xl="point",Ak=f(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),Mk=f(e=>Ek.filter(t=>e.has(t)).join("|")||xl,"getDirectionKey"),Sc={"right|left|up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":f(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":f(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":f(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[xl]:()=>[{x:0,y:0}]},Ok=f((e,t,r,i)=>{const s=Ak(e),a=(r.padding??0)/2,o=t.height+4*a,n=o/2,l=i??t.width+2*n+2*a,c=Mk(s);return(Sc[c]??Sc[xl])({height:o,midpoint:n,padding:a,width:l})},"getArrowPoints");async function Hp(e,t){const r=t,{shapeSvg:i,bbox:s}=await St(e,r,wt(r)),a=r.padding??0,o=s.height+2*a,n=o/2,l=s.width+2*n+a,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,p=Ok(r.directions??[],s,r,u),d=hr(i,u,o,p);return d.attr("style",r.style??null),Ct(r,d),r.intersect=function(m){return ht.polygon(r,p,m)},i}f(Hp,"block_arrow");async function jp(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,p=Math.max(o.width+c*2,t.width??0,90),d=Math.max(o.height+c*2+h,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=ft.svg(a).path(He(-p/2,m,p,d,u),dt(t,{}));(k=x.node())==null||k.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",m).attr("width",p).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-p/2).attr("y1",m+h).attr("x2",p/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let S=0;S<3;S++)x.append("circle").attr("cx",-p/2+12+S*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",m+4).attr("width",Math.max(p-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Ct(t,x);const C=m+h+(d-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.rect(t,S)},a}f(jp,"browser");var Gs=12;async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Gs),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=c,d=-h,m=0,y=[{x:u+Gs,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Gs},{x:u+Gs,y:d}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=ft.svg(n),S=dt(t,{}),w=jt(y),B=k.path(w,S);x=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&x.attr("style",C)}else x=hr(n,c,h,y);return i&&x.attr("style",i),Ct(t,x),t.intersect=function(k){return ht.polygon(t,y,k)},n}f(Yp,"card");function Up(e,t){const{nodeStyles:r}=xt(t);t.label="";const i=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=ft.svg(i),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=jt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return ht.polygon(t,o,p)},i}f(Up,"choice");async function bl(e,t,r){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await St(e,t,wt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=ft.svg(a),m=dt(t,{}),y=d.circle(0,0,h*2,m);u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",oe(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return Ct(t,u),t.calcIntersect=function(d,m){const y=d.width/2;return ht.circle(d,y,m)},t.intersect=function(d){return W.info("Circle intersect",t,h,d),ht.circle(t,h,d)},a}f(bl,"circle");async function Gp(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:o}=await St(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:a.width+l,h=r.positioned?r.height??0:a.height+l,u=r.positioned?-c/2:-a.width/2-o,p=r.positioned?-h/2:-a.height/2-o;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",p).attr("width",c).attr("height",h),Ct(r,n),r.intersect=function(d){return ht.rect(r,d)},s}f(Gp,"composite");async function Xp(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,p=Math.max(o.width+c*2,t.width??0,90),d=Math.max(o.height+c*2+h,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=ft.svg(a).path(He(-p/2,m,p,d,u),dt(t,{}));(k=x.node())==null||k.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",m).attr("width",p).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-p/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Ct(t,x);const C=m+h+(d-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.rect(t,S)},a}f(Xp,"consoleWindow");function Vp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
201
|
+
M ${s.x},${s.y} L ${o.x},${o.y}`}f(Vp,"createLine");function Zp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=ft.svg(s),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=Vp(a),u=n.path(h,l),p=s.insert(()=>c,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Ct(t,p),t.intersect=function(d){return W.info("crossedCircle intersect",t,{radius:a,point:d}),ht.circle(t,a,d)},s}f(Zp,"crossedCircle");function gr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(gr,"generateCirclePoints");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...gr(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...gr(c/2+u*2,-u,u,20,-180,-270),...gr(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...gr(c/2,h/2,u,20,0,90)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...gr(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...gr(c/2+c*.1,-u,u,20,-180,-270),...gr(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...gr(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=ft.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=jt(d).replace("Z",""),S=y.path(k,x),w=jt(m),B=y.path(w,{...x}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(E){return ht.polygon(t,m,E)},s}f(Kp,"curlyBraceLeft");function mr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:d,y:m})}return o}f(mr,"generateCirclePoints");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...mr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...mr(c/2,h/2,u,20,0,90)],m=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...mr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...mr(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=ft.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=jt(d).replace("Z",""),S=y.path(k,x),w=jt(m),B=y.path(w,{...x}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(E){return ht.polygon(t,m,E)},s}f(Qp,"curlyBraceRight");function pe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(pe,"generateCirclePoints");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...pe(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...pe(c/2+u*2,-u,u,20,-180,-270),...pe(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...pe(c/2,h/2,u,20,0,90)],m=[...pe(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...pe(-c/2-u/2,-u,u,20,0,90),...pe(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...pe(-c/2+u+u/2,h/2,u,30,-180,-270)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...pe(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...pe(c/2+u*2,-u,u,20,-180,-270),...pe(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...pe(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...pe(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...pe(-c/2-u/2,-u,u,20,0,90),...pe(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...pe(-c/2+u+u/2,h/2,u,30,-180,-270)],x=ft.svg(s),C=dt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=jt(d).replace("Z",""),w=x.path(S,C),L=jt(m).replace("Z",""),E=x.path(L,C),F=jt(y),X=x.path(F,{...C}),N=s.insert("g",":first-child");return N.insert(()=>X,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>E,":first-child"),N.attr("class","text"),p&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,N),t.intersect=function(z){return ht.polygon(t,y,z)},s}f(Jp,"curlyBraces");async function tf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:m}=t,y=ft.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=u,k=p,S=C-d,w=k/4,B=[{x:S,y:0},{x:w,y:0},{x:0,y:k/2},{x:w,y:k},{x:S,y:k},...ir(-S,-k/2,d,50,270,90)],L=jt(B),E=y.path(L,x),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(${-u/2}, ${-p/2})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,B,X)},c}f(tf,"curvedTrapezoid");async function ef(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??20,l=Math.max(a.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(a.height+n*2,t.height?t.height-(2*c-h):0),p=Math.min(l*.177,u*.45),d=u+2*c-h,m=-d/2,y=m+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const F=ft.svg(s),X=dt(t,{}),N=F.path(He(-l/2,y,l,u,p),X),z=F.circle(0,m+c,c*2,X);x.insert(()=>z,":first-child"),x.insert(()=>N,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",p).attr("ry",p).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);Ct(t,x);const k=y+u/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const S=m+c,w=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,E=[...ir(0,-S,c,24,180+w,-w),...ir(-(-l/2+p),-(y+p),p,12,90,0),...ir(-(-l/2+p),-(d/2-p),p,12,360,270),...ir(-(l/2-p),-(d/2-p),p,12,270,180),...ir(-(l/2-p),-(y+p),p,12,180,90)];return t.intersect=function(F){return ht.polygon(t,E,F)},s}f(ef,"person");var $k=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Dk=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Pk=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),wc=8,_c=8;async function rf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-o,t.width<_c&&(t.width=_c)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-a-k*3,t.height<wc&&(t.height=wc)}const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=Math.max(t.width??0,c.width)+o,p=u/2,d=p/(2.5+u/50),m=Math.max(t.height??0,c.height)+a+d;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=ft.svg(l),k=Dk(0,0,u,m,p,d),S=Pk(0,d,u,m,p,d),w=dt(t,{}),B=C.path(k,w),L=C.path(S,dt(t,{fill:"none"}));y=l.insert(()=>L,":first-child"),y=l.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=$k(0,0,u,m,p,d);y=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-u/2}, ${-(m/2+d)})`),Ct(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(C){const k=ht.rect(t,C),S=k.x-(t.x??0);if(p!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let w=d*d*(1-S*S/(p*p));w>0&&(w=Math.sqrt(w)),w=d-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},l}f(rf,"cylinder");async function Ni(e,t,r){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await St(e,t,wt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const y=ft.svg(a),x=dt(t,{}),C=p||d?y.path(He(c,h,n,l,p||0),x):y.rectangle(c,h,n,l,x);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",oe(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",oe(p)).attr("ry",oe(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,x){return ht.rect(y,x)},t.intersect=function(y){return ht.rect(t,y)},a}f(Ni,"drawRect");async function sf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await Ni(e,t,l);if(t.look==="handDrawn"){const d=ft.svg(c),m=dt(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),c.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,p=(Number(h.attr("height"))||n)??0;return u>0&&p>0&&h.attr("stroke-dasharray",`${u} ${p}`),c}f(sf,"datastore");async function af(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=n.width+s,h=n.height+a,u=h*.2,p=-c/2,d=-h/2-u/2,{cssStyles:m}=t,y=ft.svg(o),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],k=y.polygon(C.map(w=>[w.x,w.y]),x),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Ct(t,S),t.intersect=function(w){return ht.rect(t,w)},o}f(af,"dividedRectangle");async function of(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=xt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const y=ft.svg(n),x=dt(t,{roughness:.2,strokeWidth:2.5}),C=dt(t,{roughness:.2,strokeWidth:1.5}),k=y.circle(0,0,c*2,x),S=y.circle(0,0,h*2,C);u=n.insert("g",":first-child"),u.attr("class",oe(t.cssClasses)).attr("style",oe(p)),(d=u.node())==null||d.appendChild(k),(m=u.node())==null||m.appendChild(S)}else{u=n.insert("g",":first-child");const y=u.insert("circle",":first-child"),x=u.insert("circle");u.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Ct(t,u),t.intersect=function(y){return W.info("DoubleCircle intersect",t,c,y),ht.circle(t,c,y)},n}f(of,"doublecircle");function nf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=xt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=ft.svg(a),{nodeBorder:c}=r,h=dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),Ct(t,p),t.intersect=function(d){return W.info("filledCircle intersect",t,{radius:o,point:d}),ht.circle(t,o,d)},a}f(nf,"filledCircle");var Bc=10,vc=10;async function lf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Bc&&(t.height=Bc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<vc&&(t.width=vc));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,p=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,m=ft.svg(o),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=jt(p),C=m.path(x,y),k=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,Ct(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return W.info("Triangle intersect",t,p,S),ht.polygon(t,p,S)},o}f(lf,"flippedTriangle");async function hf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??12,l=Math.max(a.width+n*2,t.width??0,90),c=a.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),p=u-h,d=Math.max(l*.38,28),m=-u/2,y=[{x:-l/2,y:m},{x:-l/2+d,y:m},{x:-l/2+d,y:m+h},{x:l/2,y:m+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(w=>`L${w.x},${w.y}`),"Z"].join(" "),{cssStyles:C}=t;let k;if(t.look==="handDrawn"){const B=ft.svg(s).path(x,dt(t,{}));k=s.insert(()=>B,":first-child").attr("class","basic label-container"),C&&k.attr("style",C)}else k=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ct(t,k):Ct(t,k,{width:l,height:u});const S=m+h+p/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(w){return ht.polygon(t,y,w)},s}f(hf,"folder");function cf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=xt(t);t.label="";const o=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,p=ft.svg(o),d=dt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(h,u,l,c,d),y=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ct(t,y);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return ht.rect(t,C)},o}f(cf,"forkJoin");async function uf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,p=u/2,{cssStyles:d}=t,m=ft.svg(l),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:-u/2},{x:h/2-p,y:-u/2},...ir(-h/2+p,0,p,50,90,270),{x:h/2-p,y:u/2},{x:-h/2,y:u/2}],C=jt(x),k=m.path(C,y),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),Ct(t,S),t.intersect=function(w){return W.info("Pill intersect",t,{radius:p,point:w}),ht.polygon(t,x,w)},l}f(uf,"halfRoundedRectangle");var Ik=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function df(e,t){const{labelStyles:r,nodeStyles:i}=xt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const S=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await St(e,t,wt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,y=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=ft.svg(h),S=dt(t,{}),w=Ik(0,0,m,p,d),B=k.path(w,S);x=h.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&x.attr("style",C)}else x=hr(h,m,p,y);return i&&x.attr("style",i),t.width=m,t.height=p,Ct(t,x),t.intersect=function(k){return ht.polygon(t,y,k)},h}f(df,"hexagon");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await St(e,t,wt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=ft.svg(s),c=dt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=jt(h),p=l.path(u,c),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Ct(t,d),t.intersect=function(m){return W.info("Pill intersect",t,{points:h}),ht.polygon(t,h,m)},s}f(pf,"hourglass");async function ff(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await St(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:y}=r,{stylesMap:x}=qi(t),C=-m/2,k=-d/2,S=t.label?8:0,w=ft.svg(c),B=dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=w.rectangle(C,k,m,d,B),E=Math.max(m,h.width),F=d+h.height+S,X=w.rectangle(-E/2,-F/2,E,F,{...B,fill:"transparent",stroke:"none"}),N=c.insert(()=>L,":first-child"),z=c.insert(()=>X);if(t.icon){const at=c.append("g");at.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const j=at.node().getBBox(),A=j.width,O=j.height,v=j.x,R=j.y;at.attr("transform",`translate(${-A/2-v},${p?h.height/2+S/2-O/2-R:-h.height/2-S/2-O/2-R})`),at.attr("style",`color: ${x.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-F/2:F/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),Ct(t,z),t.intersect=function(at){if(W.info("iconSquare intersect",t,at),!t.label)return ht.rect(t,at);const j=t.x??0,A=t.y??0,O=t.height??0;let v=[];return p?v=[{x:j-h.width/2,y:A-O/2},{x:j+h.width/2,y:A-O/2},{x:j+h.width/2,y:A-O/2+h.height+S},{x:j+m/2,y:A-O/2+h.height+S},{x:j+m/2,y:A+O/2},{x:j-m/2,y:A+O/2},{x:j-m/2,y:A-O/2+h.height+S},{x:j-h.width/2,y:A-O/2+h.height+S}]:v=[{x:j-m/2,y:A-O/2},{x:j+m/2,y:A-O/2},{x:j+m/2,y:A-O/2+d},{x:j+h.width/2,y:A-O/2+d},{x:j+h.width/2/2,y:A+O/2},{x:j-h.width/2,y:A+O/2},{x:j-h.width/2,y:A-O/2+d},{x:j-m/2,y:A-O/2+d}],ht.polygon(t,v,at)},c}f(ff,"icon");async function gf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await St(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=qi(t),k=ft.svg(c),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=C.get("fill");S.stroke=w??x;const B=c.append("g");t.icon&&B.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),E=L.width,F=L.height,X=L.x,N=L.y,z=Math.max(E,F)*Math.SQRT2+p*2,at=k.circle(0,0,z,S),j=Math.max(z,h.width),A=z+h.height+d,O=k.rectangle(-j/2,-A/2,j,A,{...S,fill:"transparent",stroke:"none"}),v=c.insert(()=>at,":first-child"),R=c.insert(()=>O);return B.attr("transform",`translate(${-E/2-X},${m?h.height/2+d/2-F/2-N:-h.height/2-d/2-F/2-N})`),B.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-A/2:A/2-h.height})`),v.attr("transform",`translate(0,${m?h.height/2+d/2:-h.height/2-d/2})`),Ct(t,R),t.intersect=function(P){return W.info("iconSquare intersect",t,P),ht.rect(t,P)},c}f(gf,"iconCircle");async function mf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await St(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=qi(t),S=-y/2,w=-m/2,B=t.label?8:0,L=ft.svg(c),E=dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=k.get("fill");E.stroke=F??C;const X=L.path(He(S,w,y,m,5),E),N=Math.max(y,h.width),z=m+h.height+B,at=L.rectangle(-N/2,-z/2,N,z,{...E,fill:"transparent",stroke:"none"}),j=c.insert(()=>X,":first-child").attr("class","icon-shape2"),A=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=O.node().getBBox(),R=v.width,P=v.height,H=v.x,Z=v.y;O.attr("transform",`translate(${-R/2-H},${d?h.height/2+B/2-P/2-Z:-h.height/2-B/2-P/2-Z})`),O.attr("style",`color: ${k.get("stroke")??x};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-z/2:z/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+B/2:-h.height/2-B/2})`),Ct(t,A),t.intersect=function(O){if(W.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const v=t.x??0,R=t.y??0,P=t.height??0;let H=[];return d?H=[{x:v-h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2+h.height+B},{x:v+y/2,y:R-P/2+h.height+B},{x:v+y/2,y:R+P/2},{x:v-y/2,y:R+P/2},{x:v-y/2,y:R-P/2+h.height+B},{x:v-h.width/2,y:R-P/2+h.height+B}]:H=[{x:v-y/2,y:R-P/2},{x:v+y/2,y:R-P/2},{x:v+y/2,y:R-P/2+m},{x:v+h.width/2,y:R-P/2+m},{x:v+h.width/2/2,y:R+P/2},{x:v-h.width/2,y:R+P/2},{x:v-h.width/2,y:R-P/2+m},{x:v-y/2,y:R-P/2+m}],ht.polygon(t,H,O)},c}f(mf,"iconRounded");async function yf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await St(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=qi(t),S=-y/2,w=-m/2,B=t.label?8:0,L=ft.svg(c),E=dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=k.get("fill");E.stroke=F??C;const X=L.path(He(S,w,y,m,.1),E),N=Math.max(y,h.width),z=m+h.height+B,at=L.rectangle(-N/2,-z/2,N,z,{...E,fill:"transparent",stroke:"none"}),j=c.insert(()=>X,":first-child"),A=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=O.node().getBBox(),R=v.width,P=v.height,H=v.x,Z=v.y;O.attr("transform",`translate(${-R/2-H},${d?h.height/2+B/2-P/2-Z:-h.height/2-B/2-P/2-Z})`),O.attr("style",`color: ${k.get("stroke")??x};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-z/2:z/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+B/2:-h.height/2-B/2})`),Ct(t,A),t.intersect=function(O){if(W.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const v=t.x??0,R=t.y??0,P=t.height??0;let H=[];return d?H=[{x:v-h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2+h.height+B},{x:v+y/2,y:R-P/2+h.height+B},{x:v+y/2,y:R+P/2},{x:v-y/2,y:R+P/2},{x:v-y/2,y:R-P/2+h.height+B},{x:v-h.width/2,y:R-P/2+h.height+B}]:H=[{x:v-y/2,y:R-P/2},{x:v+y/2,y:R-P/2},{x:v+y/2,y:R-P/2+m},{x:v+h.width/2,y:R-P/2+m},{x:v+h.width/2/2,y:R+P/2},{x:v-h.width/2,y:R+P/2},{x:v-h.width/2,y:R-P/2+m},{x:v-y/2,y:R-P/2+m}],ht.polygon(t,H,O)},c}f(yf,"iconSquare");async function Cf(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=xt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:p,label:d}=await St(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,x=-h/2,C=t.label?8:0,k=ft.svg(u),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=k.rectangle(y,x,c,h,S),B=Math.max(c,p.width),L=h+p.height+C,E=k.rectangle(-B/2,-L/2,B,L,{...S,fill:"none",stroke:"none"}),F=u.insert(()=>w,":first-child"),X=u.insert(()=>E);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${m?L/2-h:-L/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-h/2-p.height/2-C/2:h/2-p.height/2+C/2})`),F.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),Ct(t,X),t.intersect=function(N){if(W.info("iconSquare intersect",t,N),!t.label)return ht.rect(t,N);const z=t.x??0,at=t.y??0,j=t.height??0;let A=[];return m?A=[{x:z-p.width/2,y:at-j/2},{x:z+p.width/2,y:at-j/2},{x:z+p.width/2,y:at-j/2+p.height+C},{x:z+c/2,y:at-j/2+p.height+C},{x:z+c/2,y:at+j/2},{x:z-c/2,y:at+j/2},{x:z-c/2,y:at-j/2+p.height+C},{x:z-p.width/2,y:at-j/2+p.height+C}]:A=[{x:z-c/2,y:at-j/2},{x:z+c/2,y:at-j/2},{x:z+c/2,y:at-j/2+h},{x:z+p.width/2,y:at-j/2+h},{x:z+p.width/2/2,y:at+j/2},{x:z-p.width/2,y:at+j/2},{x:z-p.width/2,y:at-j/2+h},{x:z-c/2,y:at-j/2+h}],ht.polygon(t,A,N)},u}f(Cf,"imageSquare");async function xf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+o*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(xf,"inv_trapezoid");async function bf(e,t){const{shapeSvg:r,bbox:i,label:s}=await St(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ct(t,a),t.intersect=function(l){return ht.rect(t,l)},r}f(bf,"labelRect");async function kf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(kf,"lean_left");async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(Tf,"lean_right");function Sf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=ft.svg(s),u=dt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=jt(c),d=h.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),Ct(t,m),t.intersect=function(y){return W.info("lightningBolt intersect",t,y),ht.polygon(t,c,y)},s}f(Sf,"lightningBolt");var Rk=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),qk=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Nk=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Lc=10,Fc=10;async function wf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Fc&&(t.width=Fc);const S=C/2/(2.5+C/50);t.height=(t.height??0)-o-S*3,t.height<Lc&&(t.height=Lc)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,p=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,m=d*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=ft.svg(n),k=qk(0,0,h,d,u,p,m),S=Nk(0,p,h,d,u,p),w=dt(t,{}),B=C.path(k,w),L=C.path(S,w);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=Rk(0,0,h,d,u,p,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-h/2}, ${-(d/2+p)})`),Ct(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const k=ht.rect(t,C),S=k.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-p)){let w=p*p*(1-S*S/(u*u));w>0&&(w=Math.sqrt(w)),w=p-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},n}f(wf,"linedCylinder");async function _f(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:m}=t,y=ft.svg(n),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...Dr(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,p,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],k=y.polygon(C.map(w=>[w.x,w.y]),x),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),Ct(t,S),t.intersect=function(w){return ht.polygon(t,C,w)},n}f(_f,"linedWaveEdgedRect");async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,d=u-2*n,m=p-2*n,y=-d/2,x=-m/2,{cssStyles:C}=t,k=ft.svg(l),S=dt(t,{}),w=[{x:y-n,y:x+n},{x:y-n,y:x+m+n},{x:y+d-n,y:x+m+n},{x:y+d-n,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x+m-n},{x:y+d+n,y:x+m-n},{x:y+d+n,y:x-n},{x:y+n,y:x-n},{x:y+n,y:x},{x:y,y:x},{x:y,y:x+n}],B=[{x:y,y:x+n},{x:y+d-n,y:x+n},{x:y+d-n,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=jt(w);let E=k.path(L,S);const F=jt(B);let X=k.path(F,S);t.look!=="handDrawn"&&(E=Sn(E),X=Sn(X));const N=l.insert("g",":first-child");return N.insert(()=>E),N.insert(()=>X),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),Ct(t,N),t.intersect=function(z){return ht.polygon(t,w,z)},l}f(Bf,"multiRect");async function vf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?p/4:p/8,m=p+(h?d/2:-d/2),y=-u/2,x=-m/2,C=10,{cssStyles:k}=t,S=Dr(y-C,x+m+C,y+u-C,x+m+C,d,.8),w=S==null?void 0:S[S.length-1],B=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...S,{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:w.y-2*C},{x:y+u+C,y:w.y-2*C},{x:y+u+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],L=[{x:y,y:x+C},{x:y+u-C,y:x+C},{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:x},{x:y,y:x}],E=ft.svg(s),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const X=jt(B),N=E.path(X,F),z=jt(L),at=E.path(z,F),j=s.insert(()=>N,":first-child");return j.insert(()=>at),j.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),Ct(t,j),t.intersect=function(A){return ht.polygon(t,B,A)},s}f(vf,"multiWaveEdgedRectangle");async function Lf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i,t.useHtmlLabels||be(te())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,p=-h/2,{cssStyles:d}=t,m=ft.svg(o),y=dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(u,p,c,h,y),C=o.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,C),t.intersect=function(k){return ht.rect(t,k)},o}f(Lf,"note");var zk=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await St(e,t,wt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=ft.svg(s),m=dt(t,{}),y=zk(0,0,l),x=d.path(y,m);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&u.attr("style",p)}else u=hr(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Ct(t,u),t.calcIntersect=function(d,m){const y=d.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=ht.polygon(d,x,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(Ff,"question");async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?o*2:o),t.height??0),p=u/4,m=-Math.max(h,(t.width??0)-p)/2,y=-u/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=ft.svg(n),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=jt(C),L=S.path(B,w),E=n.insert(()=>L,":first-child");return E.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,E),t.intersect=function(F){return ht.polygon(t,C,F)},n}f(Ef,"rect_left_inv_arrow");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Fr(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(be(zt())){const F=h.children[0],X=Pt(h);u=F.getBoundingClientRect(),X.attr("width",u.width),X.attr("height",u.height)}W.info("Text 2",l);const p=l||[],d=h.getBBox(),m=await Fr(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),y=m.children[0],x=Pt(m);u=y.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;Pt(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),Pt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const k=u.width+(t.padding||0),S=u.height+(t.padding||0),w=-u.width/2-C,B=-u.height/2-C;let L,E;if(t.look==="handDrawn"){const F=ft.svg(a),X=dt(t,{}),N=F.path(He(w,B,k,S,t.rx||0),X),z=F.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,X);E=a.insert(()=>(W.debug("Rough node insert CXC",N),z),":first-child"),L=a.insert(()=>(W.debug("Rough node insert CXC",N),N),":first-child")}else L=o.insert("rect",":first-child"),E=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),E.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return Ct(t,L),t.intersect=function(F){return ht.rect(t,F)},a}f(Af,"rectWithTitle");async function Mf(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ni(e,t,s)}f(Mf,"roundedRect");var Rr=8;async function Of(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Rr:Rr*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-Rr,p=h,d=Rr-c/2,m=-h/2,{cssStyles:y}=t,x=ft.svg(o),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-Rr,y:m+p},{x:d-Rr,y:m},{x:d,y:m},{x:d,y:m+p}],S=x.polygon(k.map(B=>[B.x,B.y]),C),w=o.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path").attr("style",oe(y)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${Rr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,w),t.intersect=function(B){return ht.rect(t,B)},o}f(Of,"shadedProcess");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=h,d=u/1.5,m=-p/2,y=-d/2,{cssStyles:x}=t,C=ft.svg(n),k=dt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+d},{x:m+p,y:y+d},{x:m+p,y:y-d/2}],w=jt(S),B=C.path(w,k),L=n.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Ct(t,L),t.intersect=function(E){return ht.polygon(t,S,E)},n}f($f,"slopedRect");async function Df(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Ni(e,t,a)}f(Df,"squareRect");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:p}=t,d=ft.svg(n),m=dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...ir(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...ir(h/2-u,0,u,50,270,450)],x=jt(y),C=d.path(x,m),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ct(t,k),t.intersect=function(S){return ht.polygon(t,y,S)},n}f(Pf,"stadium");async function If(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ni(e,t,r)}f(If,"state");function Rf(e,t,{config:{themeVariables:r}}){var k,S;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=ft.svg(h),p=dt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,x=u.circle(0,0,y,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>d,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((S=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:S.id)??"",B=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${B})`)}return Ct(t,C),t.intersect=function(w){return ht.circle(t,(t.width??0)/2,w)},h}f(Rf,"stateEnd");function qf(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=ft.svg(a).circle(0,0,t.width,z0(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return Ct(t,o),t.intersect=function(c){return ht.circle(t,(t.width??7)/2,c)},a}f(qf,"stateStart");var hi=8;async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.width+2*hi+a,t.width??0),h=Math.max(l.height+o,t.height??0),u=c-2*hi,p=h,d=-c/2,m=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const x=ft.svg(n),C=dt(t,{}),k=x.rectangle(d,m,u+16,p,C),S=x.line(d+hi,m,d+hi,m+p,C),w=x.line(d+hi+u,m,d+hi+u,m+p,C);n.insert(()=>S,":first-child"),n.insert(()=>w,":first-child");const B=n.insert(()=>k,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",oe(L)),Ct(t,B)}else{const x=hr(n,u,p,y);i&&x.attr("style",i),Ct(t,x)}return t.intersect=function(x){return ht.polygon(t,y,x)},n}f(Nf,"subroutine");var _o=.2;async function zf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-_o*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=_o*c,u=_o*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,m=c,y=-d/2,x=-m/2,{cssStyles:C}=t,k=ft.svg(n),S=dt(t,{}),w=[{x:y-h/2,y:x},{x:y+d+h/2,y:x},{x:y+d+h/2,y:x+m},{x:y-h/2,y:x+m}],B=[{x:y+d-h/2,y:x+m},{x:y+d+h/2,y:x+m},{x:y+d+h/2,y:x+m-u}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=jt(w),E=k.path(L,S),F=jt(B),X=k.path(F,{...S,fillStyle:"solid"}),N=n.insert(()=>X,":first-child");return N.insert(()=>E,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),Ct(t,N),t.intersect=function(z){return ht.polygon(t,w,z)},n}f(zf,"taggedRect");async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,p=l+c,{cssStyles:d}=t,m=ft.svg(s),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:p/2},...Dr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,c,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,k=-p/2-u*.4,S=[{x:C+n-h,y:(k+l)*1.3},{x:C+n,y:k+l-u},{x:C+n,y:(k+l)*.9},...Dr(C+n,(k+l)*1.25,C+n-h,(k+l)*1.3,-l*.02,.5)],w=jt(x),B=m.path(w,y),L=jt(S),E=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>E,":first-child");return F.insert(()=>B,":first-child"),F.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,x,X)},s}f(Wf,"taggedWaveEdgedRectangle");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await St(e,t,wt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),Ct(t,h),t.intersect=function(u){return ht.rect(t,u)},s}f(Hf,"text");var Wk=f((e,t,r,i,s,a)=>`M${e},${t}
|
|
232
202
|
a${s},${a} 0,0,1 0,${-i}
|
|
233
203
|
l${r},0
|
|
234
204
|
a${s},${a} 0,0,1 0,${i}
|
|
235
205
|
M${r},${-i}
|
|
236
206
|
a${s},${a} 0,0,0 0,${i}
|
|
237
|
-
l${-r},0`,"createCylinderPathD"),
|
|
238
|
-
M${
|
|
239
|
-
M${u},${y-Ft} L${u},${y+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=m.path(k,C),B=o.insert(()=>S,":first-child");return B.attr("transform",`translate(${Ft/2}, ${Ft/2})`),B.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Ft/2-(n.x-(n.left??0))}, ${-(n.height/2)+Ft/2-(n.y-(n.top??0))})`),J(t,B),t.intersect=function(_){return G.polygon(t,b,_)},o}g(Qp,"windowPane");var hh=new Set(["redux-color","redux-dark-color"]),Nb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function vn(e,t){var vt,Nt,ae,le;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=_t(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:et}=_t(),{background:X}=et,St={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${X}`]};await vn(e,St)}const h=_t();t.useHtmlLabels=h.htmlLabels;let c=((vt=h.er)==null?void 0:vt.diagramPadding)??10,d=((Nt=h.er)==null?void 0:Nt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:u,nodeStyles:y}=Q(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Ne(t.label,h)+et.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const X=await ni(e,t,et);if(i!=null&&hh.has(i)){const St=r.colorIndex??0;X.attr("data-color-id",`color-${St%l.length}`)}if(!We(h.htmlLabels)){const St=X.select("text"),lt=(ae=St.node())==null?void 0:ae.getBBox();St.attr("transform",`translate(${-lt.width/2}, 0)`)}return X}h.htmlLabels||(c*=1.25,d*=1.25);let f=it(t);f||(f="node default");const m=e.insert("g").attr("class",f).attr("id",t.domId||t.id),C=await Or(m,t.label??"",h,0,0,["name"],u);C.height+=d;let b=0;const k=[],S=[];let B=0,_=0,M=0,v=0,z=!0,D=!0;for(const et of r.attributes){const X=await Or(m,et.type,h,0,b,["attribute-type"],u);B=Math.max(B,X.width+c);const St=await Or(m,et.name,h,0,b,["attribute-name"],u);_=Math.max(_,St.width+c);const lt=await Or(m,et.keys.join(),h,0,b,["attribute-keys"],u);M=Math.max(M,lt.width+c);const Te=await Or(m,et.comment,h,0,b,["attribute-comment"],u);v=Math.max(v,Te.width+c);const kt=Math.max(X.height,St.height,lt.height,Te.height)+d;S.push({yOffset:b,rowHeight:kt}),b+=kt}let I=4;M<=c&&(z=!1,M=0,I--),v<=c&&(D=!1,v=0,I--);const Y=m.node().getBBox();if(C.width+c*2-(B+_+M+v)>0){const et=C.width+c*2-(B+_+M+v);B+=et/I,_+=et/I,M>0&&(M+=et/I),v>0&&(v+=et/I)}const H=B+_+M+v,P=Z.svg(m),E=K(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=0;S.length>0&&(L=S.reduce((et,X)=>et+((X==null?void 0:X.rowHeight)??0),0));const $=Math.max(Y.width+c*2,(t==null?void 0:t.width)||0,H),A=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),w=-$/2,N=-A/2;if(m.selectAll("g:not(:first-child)").each((et,X,St)=>{const lt=ht(St[X]),Te=lt.attr("transform");let kt=0,Ye=0;if(Te){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Te);he&&(kt=parseFloat(he[1]),Ye=parseFloat(he[2]),lt.attr("class").includes("attribute-name")?kt+=B:lt.attr("class").includes("attribute-keys")?kt+=B+_:lt.attr("class").includes("attribute-comment")&&(kt+=B+_+M))}lt.attr("transform",`translate(${w+c/2+kt}, ${Ye+N+C.height+d/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(N+d/2)+")"),i!=null&&hh.has(i)){const et=r.colorIndex??0;m.attr("data-color-id",`color-${et%l.length}`)}const V=P.rectangle(w,N,$,A,E),dt=m.insert(()=>V,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[et,X]of S.entries()){const lt=(et+1)%2===0&&X.yOffset!==0,Te=P.rectangle(w,C.height+N+(X==null?void 0:X.yOffset),$,X==null?void 0:X.rowHeight,{...E,fill:lt?a:o,stroke:n});m.insert(()=>Te,"g.label").attr("style",p.join("")).attr("class",`row-rect-${lt?"even":"odd"}`)}const ft=1e-4;let ut=$r(w,C.height+N,$+w,C.height+N,ft),Ct=P.polygon(ut.map(et=>[et.x,et.y]),E);if(m.insert(()=>Ct).attr("class","divider"),ut=$r(B+w,C.height+N,B+w,A+N,ft),Ct=P.polygon(ut.map(et=>[et.x,et.y]),E),m.insert(()=>Ct).attr("class","divider"),z){const et=B+_+w;ut=$r(et,C.height+N,et,A+N,ft),Ct=P.polygon(ut.map(X=>[X.x,X.y]),E),m.insert(()=>Ct).attr("class","divider")}if(D){const et=B+_+M+w;ut=$r(et,C.height+N,et,A+N,ft),Ct=P.polygon(ut.map(X=>[X.x,X.y]),E),m.insert(()=>Ct).attr("class","divider")}for(const et of k){const X=C.height+N+et;ut=$r(w,X,$+w,X,ft),Ct=P.polygon(ut.map(St=>[St.x,St.y]),E),m.insert(()=>Ct).attr("class","divider")}if(J(t,dt),y&&t.look!=="handDrawn")if(i!=null&&Nb.has(i))m.selectAll("path").attr("style",y);else{const et=y.split(";"),X=(le=et==null?void 0:et.filter(St=>St.includes("stroke")))==null?void 0:le.map(St=>`${St}`).join("; ");m.selectAll("path").attr("style",X??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(et){return G.rect(t,et)},m}g(vn,"erBox");async function Or(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==kl(t)&&(t=kl(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await ze(n,t,{width:Ne(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(We(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const d=ht(l);h=c.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}g(Or,"addText");function $r(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g($r,"lineToPolygon");async function Jp(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,d=0,p=0,u=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Bi(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Bi(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();p=y.height,h=o.insert("g").attr("class","members-group text");let f=0;for(const b of t.members){const k=await Bi(h,b,f,[b.parseClassifier()]);f+=k+a}u=h.node().getBBox().height,u<=0&&(u=s/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await Bi(c,b,m,[b.parseClassifier()]);m+=k+a}let C=o.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${d})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${d+p+s*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${d+p+(u?u+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}g(Jp,"textHelper");async function Bi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=_t();let o="useHtmlLabels"in t?t.useHtmlLabels:We(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Oi(n)&&(o=!0);const l=await ze(s,Go(Cr(n)),{width:Ne(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let h,c=1;if(o){const d=l.children[0],p=ht(l);c=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(c+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(f=>new Promise(m=>{function C(){var b;if(f.style.display="flex",f.style.flexDirection="column",y){const k=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,B=parseInt(k,10)*5+"px";f.style.minWidth=B,f.style.maxWidth=B}else f.style.width="100%";m(f)}g(C,"setupImage"),setTimeout(()=>{f.complete&&C()}),f.addEventListener("error",C),f.addEventListener("load",C)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}g(Bi,"addText");async function tg(e,t){var P,E;const r=xt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??We(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await Jp(e,t,r,n,o),{labelStyles:d,nodeStyles:p}=Q(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=((P=l.styles)==null?void 0:P.join(";"))||p||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),f=Z.svg(h),m=K(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=o:l.members.length>0&&l.methods.length===0&&(b+=o*2);const S=-C/2,B=-b/2;let _=y?a*2:l.members.length===0&&l.methods.length===0?-a:0;k&&(_=a*2);const M=f.rectangle(S-a,B-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+_,m),v=h.insert(()=>M,":first-child");v.attr("class","basic label-container outer-path");const z=v.node().getBBox(),D=h.select(".annotation-group").node().getBBox().height-(y?a/2:0)||0,I=h.select(".label-group").node().getBBox().height-(y?a/2:0)||0,Y=h.select(".members-group").node().getBBox().height-(y?a/2:0)||0,H=(D+I+B+a-(B-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((L,$,A)=>{var ut,Ct;const w=ht(A[$]),N=w.attr("transform");let V=0;if(N){const Nt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);Nt&&(V=parseFloat(Nt[2]))}let dt=V+B+a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(w.attr("class").includes("methods-group")){const vt=Math.max(Y,o/2);k?dt=Math.max(H,D+I+vt+B+o*2+a)+o*2:dt=D+I+vt+B+o*4+a}l.members.length===0&&l.methods.length===0&&((ut=r.class)!=null&&ut.hideEmptyMembersBox)&&(l.annotations.length>0?dt=V-o:dt=V),n||(dt-=4);let ft=S;(w.attr("class").includes("label-group")||w.attr("class").includes("annotation-group"))&&(ft=-((Ct=w.node())==null?void 0:Ct.getBBox().width)/2||0,h.selectAll("text").each(function(vt,Nt,ae){window.getComputedStyle(ae[Nt]).textAnchor==="middle"&&(ft=0)})),w.attr("transform",`translate(${ft}, ${dt})`)}),l.members.length>0||l.methods.length>0||y){const L=D+I+B+a,$=f.line(z.x,L,z.x+z.width,L+.001,m);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(y||l.members.length>0||l.methods.length>0){const L=D+I+Y+B+o*2+a,$=f.line(z.x,k?Math.max(H,L):L,z.x+z.width,(k?Math.max(H,L):L)+.001,m);h.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),h.selectAll(".divider").select("path").attr("style",u),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",u),!n){const L=RegExp(/color\s*:\s*([^;]*)/),$=L.exec(u);if($){const A=$[0].replace("color","fill");h.selectAll("tspan").attr("style",A)}else if(d){const A=L.exec(d);if(A){const w=A[0].replace("color","fill");h.selectAll("tspan").attr("style",w)}}}return J(t,v),t.intersect=function(L){return G.rect(t,L)},h}g(tg,"classBox");async function eg(e,t){var z,D;const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,h=it(t),{themeVariables:c}=xt(),{borderColorArray:d,requirementEdgeLabelBackground:p}=c,u=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let y;l?y=await Le(u,`<<${s.type}>>`,0,t.labelStyle):y=await Le(u,"<<Element>>",0,t.labelStyle);let f=y;const m=await Le(u,s.name,f,t.labelStyle+"; font-weight: bold;");if(f+=m+n,l){const I=await Le(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,f,t.labelStyle);f+=I;const Y=await Le(u,`${s.text?`Text: ${s.text}`:""}`,f,t.labelStyle);f+=Y;const H=await Le(u,`${s.risk?`Risk: ${s.risk}`:""}`,f,t.labelStyle);f+=H,await Le(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,f,t.labelStyle)}else{const I=await Le(u,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=I,await Le(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const C=(((z=u.node())==null?void 0:z.getBBox().width)??200)+o,b=(((D=u.node())==null?void 0:D.getBBox().height)??200)+o,k=-C/2,S=-b/2,B=Z.svg(u),_=K(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const M=B.rectangle(k,S,C,b,_),v=u.insert(()=>M,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const I=t.colorIndex??0;u.attr("data-color-id",`color-${I%d.length}`)}if(u.selectAll(".label").each((I,Y,H)=>{const P=ht(H[Y]),E=P.attr("transform");let L=0,$=0;if(E){const V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);V&&(L=parseFloat(V[1]),$=parseFloat(V[2]))}const A=$-b/2;let w=k+o/2;(Y===0||Y===1)&&(w=L),P.attr("transform",`translate(${w}, ${A+o})`)}),f>y+m+n){const I=S+y+m+n;let Y;if(t.look==="neo"){const E=[[k,I],[k+C,I],[k+C,I+.001],[k,I+.001]];Y=B.polygon(E,_)}else Y=B.line(k,I,k+C,I,_);u.insert(()=>Y).attr("class","divider")}return J(t,v),t.intersect=function(I){return G.rect(t,I)},i&&t.look!=="handDrawn"&&(p||d!=null&&d.length)&&u.selectAll("path").attr("style",i),u}g(eg,"requirementBox");async function Le(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=xt(),o=a.htmlLabels??!0,n=await ze(s,Go(Cr(t)),{width:Ne(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let l;if(o){const h=n.children[0],c=ht(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(Le,"addText");var Wb=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function rg(e,t,{config:r}){var Y,H;const{labelStyles:i,nodeStyles:s}=Q(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await st(e,t,it(t)),c=t.padding||10;let d="",p;"ticket"in t&&t.ticket&&((Y=r==null?void 0:r.kanban)!=null&&Y.ticketBaseUrl)&&(d=(H=r==null?void 0:r.kanban)==null?void 0:H.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,f;p?{label:y,bbox:f}=await Wa(p,"ticket"in t&&t.ticket||"",u):{label:y,bbox:f}=await Wa(n,"ticket"in t&&t.ticket||"",u);const{label:m,bbox:C}=await Wa(n,"assigned"in t&&t.assigned||"",u);t.width=o;const b=10,k=(t==null?void 0:t.width)||0,S=Math.max(f.height,C.height)/2,B=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,_=-k/2,M=-B/2;h.attr("transform","translate("+(c-k/2)+", "+(-S-l.height/2)+")"),y.attr("transform","translate("+(c-k/2)+", "+(-S+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*a)+", "+(-S+l.height/2)+")");let v;const{rx:z,ry:D}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const P=Z.svg(n),E=K(t,{}),L=z||D?P.path(sr(_,M,k,B,z||0),E):P.rectangle(_,M,k,B,E);v=n.insert(()=>L,":first-child"),v.attr("class","basic label-container").attr("style",I||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",D??5).attr("x",_).attr("y",M).attr("width",k).attr("height",B);const P="priority"in t&&t.priority;if(P){const E=n.append("line"),L=_+2,$=M+Math.floor((z??0)/2),A=M+B-Math.floor((z??0)/2);E.attr("x1",L).attr("y1",$).attr("x2",L).attr("y2",A).attr("stroke-width","4").attr("stroke",Wb(P))}}return J(t,v),t.height=B,t.intersect=function(P){return G.rect(t,P)},n}g(rg,"kanbanItem");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await st(e,t,it(t)),l=a.width+10*o,h=a.height+8*o,c=.15*l,{cssStyles:d}=t,p=a.width+20,u=a.height+20,y=Math.max(l,p),f=Math.max(h,u);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let m;const C=`M0 0
|
|
240
|
-
a${
|
|
241
|
-
a${
|
|
242
|
-
a${
|
|
243
|
-
a${
|
|
207
|
+
l${-r},0`,"createCylinderPathD"),Hk=f((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),jk=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Ec=5,Ac=10;async function jf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,o=t.height??0;if(t.height&&(t.height=t.height-a,t.height<Ec&&(t.height=Ec)),t.width){const C=o/2/(2.5+o/50);t.width=t.width-a-C*3,t.width<Ac&&(t.width=Ac)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=Math.max(t.height??0,l.height)+a,u=h/2,p=u/(2.5+h/50),d=Math.max(t.width??0,l.width)+p+a,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=ft.svg(n),C=Hk(0,0,d,h,p,u),k=jk(0,0,d,h,p,u),S=x.path(C,dt(t,{})),w=x.path(k,dt(t,{fill:"none"}));y=n.insert(()=>w,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=Wk(0,0,d,h,p,u);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",oe(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",p),y.attr("transform",`translate(${-d/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-p-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,y),t.intersect=function(x){const C=ht.rect(t,x),k=C.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-p)){let S=p*p*(1-k*k/(u*u));S!=0&&(S=Math.sqrt(Math.abs(S))),S=p-S,x.x-(t.x??0)>0&&(S=-S),C.x+=S}return C},n}f(jf,"tiltedCylinder");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(Yf,"trapezoid");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:d}=t,m=ft.svg(c),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],C=jt(x),k=m.path(C,y),S=c.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),Ct(t,S),t.intersect=function(w){return ht.polygon(t,x,w)},c}f(Uf,"trapezoidalPentagon");var Mc=10,Oc=10;async function Gf(e,t){var w;const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Oc&&(t.width=Oc),t.height=(t==null?void 0:t.height)??0,t.height<Mc&&(t.height=Mc));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=lr((w=zt().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:m}=t,y=ft.svg(o),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=jt(d),k=y.path(C,x),S=o.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=u,Ct(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(B){return W.info("Triangle intersect",t,d,B),ht.polygon(t,d,B)},o}f(Gf,"triangle");async function Xf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,d=t.look==="neo"?p/4:p/8,m=p+(n?d:-d),{cssStyles:y}=t,C=14-u,k=C>0?C/2:0,S=ft.svg(l),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=[{x:-u/2-k,y:m/2},...Dr(-u/2-k,m/2,u/2+k,m/2,d,.8),{x:u/2+k,y:-m/2},{x:-u/2-k,y:-m/2}],L=jt(B),E=S.path(L,w),F=l.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-p/2+(t.padding??0)-d-(c.y-(c.top??0))})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,B,X)},l}f(Xf,"waveEdgedRectangle");async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=h/8,p=h+u*2,{cssStyles:d}=t,m=ft.svg(n),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-c/2,y:p/2},...Dr(-c/2,p/2,c/2,p/2,u,1),{x:c/2,y:-p/2},...Dr(c/2,-p/2,-c/2,-p/2,u,-1)],C=jt(x),k=m.path(C,y),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),Ct(t,S),t.intersect=function(w){return ht.polygon(t,x,w)},n}f(Vf,"waveRectangle");var re=10;async function Zf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-re,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-re,10));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+re,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+re,u=c-re,p=h-re,d=-u/2,m=-p/2,{cssStyles:y}=t,x=ft.svg(o),C=dt(t,{}),k=[{x:d-re,y:m-re},{x:d-re,y:m+p},{x:d+u,y:m+p},{x:d+u,y:m-re}],S=`M${d-re},${m-re} L${d+u},${m-re} L${d+u},${m+p} L${d-re},${m+p} L${d-re},${m-re}
|
|
208
|
+
M${d-re},${m} L${d+u},${m}
|
|
209
|
+
M${d},${m-re} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=x.path(S,C),B=o.insert(()=>w,":first-child");return B.attr("transform",`translate(${re/2}, ${re/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+re/2-(n.x-(n.left??0))}, ${-(n.height/2)+re/2-(n.y-(n.top??0))})`),Ct(t,B),t.intersect=function(L){return ht.polygon(t,k,L)},o}f(Zf,"windowPane");var $c=new Set(["redux-color","redux-dark-color"]),Yk=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function kl(e,t){var At,Lt,qt,vt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=te(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:lt}=te(),{background:gt}=lt,Et={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${gt}`]};await kl(e,Et)}const c=te();t.useHtmlLabels=c.htmlLabels;let h=((At=c.er)==null?void 0:At.diagramPadding)??10,u=((Lt=c.er)==null?void 0:Lt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=xt(t);if(r.attributes.length===0&&t.label){const lt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};br(t.label,c)+lt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const gt=await Ni(e,t,lt);if(i!=null&&$c.has(i)){const Et=r.colorIndex??0;gt.attr("data-color-id",`color-${Et%l.length}`)}if(!lr(c.htmlLabels)){const Et=gt.select("text"),Rt=(qt=Et.node())==null?void 0:qt.getBBox();Et.attr("transform",`translate(${-Rt.width/2}, 0)`)}return gt}c.htmlLabels||(h*=1.25,u*=1.25);let y=wt(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await ui(x,t.label??"",c,0,0,["name"],d);C.height+=u;let k=0;const S=[],w=[];let B=0,L=0,E=0,F=0,X=!0,N=!0;for(const lt of r.attributes){const gt=await ui(x,lt.type,c,0,k,["attribute-type"],d);B=Math.max(B,gt.width+h);const Et=await ui(x,lt.name,c,0,k,["attribute-name"],d);L=Math.max(L,Et.width+h);const Rt=await ui(x,lt.keys.join(),c,0,k,["attribute-keys"],d);E=Math.max(E,Rt.width+h);const Ut=await ui(x,lt.comment,c,0,k,["attribute-comment"],d);F=Math.max(F,Ut.width+h);const D=Math.max(gt.height,Et.height,Rt.height,Ut.height)+u;w.push({yOffset:k,rowHeight:D}),k+=D}let z=4;E<=h&&(X=!1,E=0,z--),F<=h&&(N=!1,F=0,z--);const at=x.node().getBBox();if(C.width+h*2-(B+L+E+F)>0){const lt=C.width+h*2-(B+L+E+F);B+=lt/z,L+=lt/z,E>0&&(E+=lt/z),F>0&&(F+=lt/z)}const j=B+L+E+F,A=ft.svg(x),O=dt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let v=0;w.length>0&&(v=w.reduce((lt,gt)=>lt+((gt==null?void 0:gt.rowHeight)??0),0));const R=Math.max(at.width+h*2,(t==null?void 0:t.width)||0,j),P=Math.max((v??0)+C.height,(t==null?void 0:t.height)||0),H=-R/2,Z=-P/2;if(x.selectAll("g:not(:first-child)").each((lt,gt,Et)=>{const Rt=Pt(Et[gt]),Ut=Rt.attr("transform");let D=0,Ft=0;if(Ut){const we=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ut);we&&(D=parseFloat(we[1]),Ft=parseFloat(we[2]),Rt.attr("class").includes("attribute-name")?D+=B:Rt.attr("class").includes("attribute-keys")?D+=B+L:Rt.attr("class").includes("attribute-comment")&&(D+=B+L+E))}Rt.attr("transform",`translate(${H+h/2+D}, ${Ft+Z+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(Z+u/2)+")"),i!=null&&$c.has(i)){const lt=r.colorIndex??0;x.attr("data-color-id",`color-${lt%l.length}`)}const ut=A.rectangle(H,Z,R,P,O),pt=x.insert(()=>ut,":first-child").attr("class","outer-path").attr("style",p.join(""));S.push(0);for(const[lt,gt]of w.entries()){const Rt=(lt+1)%2===0&>.yOffset!==0,Ut=A.rectangle(H,C.height+Z+(gt==null?void 0:gt.yOffset),R,gt==null?void 0:gt.rowHeight,{...O,fill:Rt?a:o,stroke:n});x.insert(()=>Ut,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Rt?"even":"odd"}`)}const bt=1e-4;let Tt=di(H,C.height+Z,R+H,C.height+Z,bt),nt=A.polygon(Tt.map(lt=>[lt.x,lt.y]),O);if(x.insert(()=>nt).attr("class","divider"),Tt=di(B+H,C.height+Z,B+H,P+Z,bt),nt=A.polygon(Tt.map(lt=>[lt.x,lt.y]),O),x.insert(()=>nt).attr("class","divider"),X){const lt=B+L+H;Tt=di(lt,C.height+Z,lt,P+Z,bt),nt=A.polygon(Tt.map(gt=>[gt.x,gt.y]),O),x.insert(()=>nt).attr("class","divider")}if(N){const lt=B+L+E+H;Tt=di(lt,C.height+Z,lt,P+Z,bt),nt=A.polygon(Tt.map(gt=>[gt.x,gt.y]),O),x.insert(()=>nt).attr("class","divider")}for(const lt of S){const gt=C.height+Z+lt;Tt=di(H,gt,R+H,gt,bt),nt=A.polygon(Tt.map(Et=>[Et.x,Et.y]),O),x.insert(()=>nt).attr("class","divider")}if(Ct(t,pt),m&&t.look!=="handDrawn")if(i!=null&&Yk.has(i))x.selectAll("path").attr("style",m);else{const lt=m.split(";"),gt=(vt=lt==null?void 0:lt.filter(Et=>Et.includes("stroke")))==null?void 0:vt.map(Et=>`${Et}`).join("; ");x.selectAll("path").attr("style",gt??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(lt){return ht.rect(t,lt)},x}f(kl,"erBox");async function ui(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Wh(t)&&(t=Wh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Ve(n,t,{width:br(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(lr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=Pt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}f(ui,"addText");function di(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(di,"lineToPolygon");async function Kf(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",wt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,p=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await ns(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ns(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,c=o.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await ns(c,k,y,[k.parseClassifier()]);y+=S+a}d=c.node().getBBox().height,d<=0&&(d=s/2),h=o.insert("g").attr("class","methods-group text");let x=0;for(const k of t.methods){const S=await ns(h,k,x,[k.parseClassifier()]);x+=S+a}let C=o.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+s*2})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}f(Kf,"textHelper");async function ns(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=te();let o="useHtmlLabels"in t?t.useHtmlLabels:lr(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),xs(n)&&(o=!0);const l=await Ve(s,Xn(Or(n)),{width:br(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],p=Pt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await yl(u),c=u.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Pt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(ns,"addText");async function Qf(e,t){var A,O;const r=zt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??lr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Kf(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=xt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((A=l.styles)==null?void 0:A.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((O=r.class)!=null&&O.hideEmptyMembersBox),y=ft.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=o:l.members.length>0&&l.methods.length===0&&(k+=o*2);const w=-C/2,B=-k/2;let L=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;S&&(L=a*2);const E=y.rectangle(w-a,B-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,k+2*a+L,x),F=c.insert(()=>E,":first-child");F.attr("class","basic label-container outer-path");const X=F.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,z=c.select(".label-group").node().getBBox().height-(m?a/2:0)||0,at=c.select(".members-group").node().getBBox().height-(m?a/2:0)||0,j=(N+z+B+a-(B-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((v,R,P)=>{var Tt,nt;const H=Pt(P[R]),Z=H.attr("transform");let ut=0;if(Z){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Z);Lt&&(ut=parseFloat(Lt[2]))}let pt=ut+B+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(H.attr("class").includes("methods-group")){const At=Math.max(at,o/2);S?pt=Math.max(j,N+z+At+B+o*2+a)+o*2:pt=N+z+At+B+o*4+a}l.members.length===0&&l.methods.length===0&&((Tt=r.class)!=null&&Tt.hideEmptyMembersBox)&&(l.annotations.length>0?pt=ut-o:pt=ut),n||(pt-=4);let bt=w;(H.attr("class").includes("label-group")||H.attr("class").includes("annotation-group"))&&(bt=-((nt=H.node())==null?void 0:nt.getBBox().width)/2||0,c.selectAll("text").each(function(At,Lt,qt){window.getComputedStyle(qt[Lt]).textAnchor==="middle"&&(bt=0)})),H.attr("transform",`translate(${bt}, ${pt})`)}),l.members.length>0||l.methods.length>0||m){const v=N+z+B+a,R=y.line(X.x,v,X.x+X.width,v+.001,x);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const v=N+z+at+B+o*2+a,R=y.line(X.x,S?Math.max(j,v):v,X.x+X.width,(S?Math.max(j,v):v)+.001,x);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),F.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const v=RegExp(/color\s*:\s*([^;]*)/),R=v.exec(d);if(R){const P=R[0].replace("color","fill");c.selectAll("tspan").attr("style",P)}else if(u){const P=v.exec(u);if(P){const H=P[0].replace("color","fill");c.selectAll("tspan").attr("style",H)}}}return Ct(t,F),t.intersect=function(v){return ht.rect(t,v)},c}f(Qf,"classBox");async function Jf(e,t){var z,at;const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=wt(t),h=zt(),{themeVariables:u}=h,{borderColorArray:p,requirementEdgeLabelBackground:d}=u,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await tr(y,`<<${s.type}>>`,0,t.labelStyle):x=await tr(y,"<<Element>>",0,t.labelStyle);let C=x;const k=await tr(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+n,l){const j=await tr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=j;const A=await tr(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=A;const O=await tr(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=O,await tr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const j=await tr(y,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,m);C+=j,await tr(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,m)}const S=(((z=y.node())==null?void 0:z.getBBox().width)??200)+o,w=(((at=y.node())==null?void 0:at.getBBox().height)??200)+o,B=-S/2,L=-w/2,E=ft.svg(y),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const X=E.rectangle(B,L,S,w,F),N=y.insert(()=>X,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",i),p!=null&&p.length){const j=t.colorIndex??0;y.attr("data-color-id",`color-${j%p.length}`)}if(y.selectAll(".label").each((j,A,O)=>{const v=Pt(O[A]),R=v.attr("transform");let P=0,H=0;if(R){const bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);bt&&(P=parseFloat(bt[1]),H=parseFloat(bt[2]))}const Z=H-w/2;let ut=B+o/2;(A===0||A===1)&&(ut=P),v.attr("transform",`translate(${ut}, ${Z+o})`)}),C>x+k+n){const j=L+x+k+n;let A;if(t.look==="neo"){const R=[[B,j],[B+S,j],[B+S,j+.001],[B,j+.001]];A=E.polygon(R,F)}else A=E.line(B,j,B+S,j,F);y.insert(()=>A).attr("class","divider")}return Ct(t,N),t.intersect=function(j){return ht.rect(t,j)},i&&t.look!=="handDrawn"&&(d||p!=null&&p.length)&&y.selectAll("path").attr("style",i),y}f(Jf,"requirementBox");async function tr(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=zt(),n=o.htmlLabels??!0,l=await Ve(a,Xn(Or(t)),{width:br(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let c;if(n){const h=l.children[0],u=Pt(l);s==="start"&&Pt(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}f(tr,"addText");var Uk=f(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function tg(e,t,{config:r}){var at,j;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((at=r==null?void 0:r.kanban)!=null&&at.ticketBaseUrl)&&(u=(j=r==null?void 0:r.kanban)==null?void 0:j.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;p?{label:m,bbox:y}=await So(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:y}=await So(n,"ticket"in t&&t.ticket||"",d);const{label:x,bbox:C}=await So(n,"assigned"in t&&t.assigned||"",d);t.width=o;const k=10,S=(t==null?void 0:t.width)||0,w=Math.max(y.height,C.height)/2,B=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+w,L=-S/2,E=-B/2;c.attr("transform","translate("+(h-S/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-w+l.height/2)+")"),x.attr("transform","translate("+(h+S/2-C.width-2*a)+", "+(-w+l.height/2)+")");let F;const{rx:X,ry:N}=t,{cssStyles:z}=t;if(t.look==="handDrawn"){const A=ft.svg(n),O=dt(t,{}),v=X||N?A.path(He(L,E,S,B,X||0),O):A.rectangle(L,E,S,B,O);F=n.insert(()=>v,":first-child"),F.attr("class","basic label-container").attr("style",z||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",X??5).attr("ry",N??5).attr("x",L).attr("y",E).attr("width",S).attr("height",B);const A="priority"in t&&t.priority;if(A){const O=n.append("line"),v=L+2,R=E+Math.floor((X??0)/2),P=E+B-Math.floor((X??0)/2);O.attr("x1",v).attr("y1",R).attr("x2",v).attr("y2",P).attr("stroke-width","4").attr("stroke",Uk(A))}}return Ct(t,F),t.height=B,t.intersect=function(A){return ht.rect(t,A)},n}f(tg,"kanbanItem");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,m=Math.max(l,p),y=Math.max(c,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
|
|
210
|
+
a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
|
|
211
|
+
a${h},${h} 1 0,0 ${m*.25},0
|
|
212
|
+
a${h},${h} 1 0,0 ${m*.25},0
|
|
213
|
+
a${h},${h} 1 0,0 ${m*.25},${y*.1}
|
|
244
214
|
|
|
245
|
-
a${
|
|
246
|
-
a${
|
|
247
|
-
a${
|
|
215
|
+
a${h},${h} 1 0,0 ${m*.15},${y*.33}
|
|
216
|
+
a${h*.8},${h*.8} 1 0,0 0,${y*.34}
|
|
217
|
+
a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
|
|
248
218
|
|
|
249
|
-
a${
|
|
250
|
-
a${
|
|
251
|
-
a${
|
|
252
|
-
a${
|
|
219
|
+
a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
|
|
220
|
+
a${h},${h} 1 0,0 ${-1*m*.25},0
|
|
221
|
+
a${h},${h} 1 0,0 ${-1*m*.25},0
|
|
222
|
+
a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
253
223
|
|
|
254
|
-
a${
|
|
255
|
-
a${
|
|
256
|
-
a${
|
|
257
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const
|
|
258
|
-
a${
|
|
224
|
+
a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
225
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
|
|
226
|
+
a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
|
|
227
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const k=ft.svg(s),S=dt(t,{}),w=k.path(C,S);x=s.insert(()=>w,":first-child"),x.attr("class","basic label-container").attr("style",oe(u))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),Ct(t,x),t.calcIntersect=function(k,S){return ht.rect(k,S)},t.intersect=function(k){return W.info("Bang intersect",t,k),ht.rect(t,k)},s}f(eg,"bang");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:m}=t;let y;const x=`M0 0
|
|
228
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
259
229
|
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
260
|
-
a${
|
|
230
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
261
231
|
|
|
262
|
-
a${
|
|
263
|
-
a${
|
|
232
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
233
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
|
|
264
234
|
|
|
265
|
-
a${
|
|
235
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
266
236
|
a${p},${p} 1 0,1 ${-1*l*.5},0
|
|
267
|
-
a${
|
|
237
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
268
238
|
|
|
269
|
-
a${
|
|
270
|
-
a${
|
|
271
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const C=
|
|
272
|
-
M${-l/2} ${
|
|
273
|
-
v${-
|
|
274
|
-
q0,-${
|
|
275
|
-
h${l-2*
|
|
276
|
-
q${
|
|
277
|
-
v${h
|
|
239
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
240
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
|
|
241
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=ft.svg(s),k=dt(t,{}),S=C.path(x,k);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",oe(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Ct(t,y),t.calcIntersect=function(C,k){return ht.rect(C,k)},t.intersect=function(C){return W.info("Cloud intersect",t,C),ht.rect(t,C)},s}f(rg,"cloud");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=t.look==="neo"?`
|
|
242
|
+
M${-l/2} ${c/2-h}
|
|
243
|
+
v${-c+2*h}
|
|
244
|
+
q0,-${h} ${h},-${h}
|
|
245
|
+
h${l-2*h}
|
|
246
|
+
q${h},0 ${h},${h}
|
|
247
|
+
v${c-h}
|
|
278
248
|
H${-l/2}
|
|
279
249
|
Z
|
|
280
250
|
`:`
|
|
281
|
-
M${-l/2} ${
|
|
282
|
-
v${-
|
|
283
|
-
q0,-${
|
|
284
|
-
h${l-2*
|
|
285
|
-
q${
|
|
286
|
-
v${
|
|
287
|
-
q0,${
|
|
288
|
-
h${-(l-2*
|
|
289
|
-
q${-
|
|
251
|
+
M${-l/2} ${c/2-h}
|
|
252
|
+
v${-c+2*h}
|
|
253
|
+
q0,-${h} ${h},-${h}
|
|
254
|
+
h${l-2*h}
|
|
255
|
+
q${h},0 ${h},${h}
|
|
256
|
+
v${c-2*h}
|
|
257
|
+
q0,${h} ${-h},${h}
|
|
258
|
+
h${-(l-2*h)}
|
|
259
|
+
q${-h},0 ${-h},${-h}
|
|
290
260
|
Z
|
|
291
|
-
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),J(t,p),t.calcIntersect=function(u,y){return G.rect(u,y)},t.intersect=function(u){return G.rect(t,u)},s}g(ag,"defaultMindmapNode");async function og(e,t){const r={padding:t.padding??0};return _n(e,t,r)}g(og,"mindmapCircle");var zb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Pp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:$p},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Rp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:zp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:op},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:np},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:_n},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ig},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:sg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ep},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:gp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:wp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Sp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Gp},{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:kp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:hp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Up},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Qu},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ip},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Wp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Np},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:up},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:fp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:rp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:ip},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:sp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Bp},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Zp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:pp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:_p},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ap},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Vp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Qp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:cp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Xp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:dp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Dp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Fp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Lp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ku},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ep},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Yp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Hp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Kp},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Mp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:vp}],Hb=g(()=>{const t=[...Object.entries({state:qp,choice:Ju,note:Ap,rectWithTitle:Op,labelRect:Tp,iconSquare:xp,iconCircle:yp,icon:mp,iconRounded:Cp,imageSquare:bp,anchor:Vu,kanbanItem:rg,mindmapCircle:og,defaultMindmapNode:ag,classBox:tg,erBox:vn,requirementBox:eg}),...zb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ng=Hb();function Yb(e){return e in ng}g(Yb,"isValidShape");var aa=new Map;async function lg(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?ng[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",qt(t.look)),t.tooltip&&s.attr("title",t.tooltip),aa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(lg,"insertNode");var nS=g((e,t)=>{aa.set(t.id,e)},"setNodeElem"),lS=g(()=>{aa.clear()},"clear"),hS=g(e=>{const t=aa.get(e.id);W.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Ub=g((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&ch(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&ch(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),jb={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Gb=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ch=g((e,t,r,i,s,a,o=!1,n)=>{var y;const l=jb[r],h=l&&Gb.includes(l.type);if(!l){W.warn(`Unknown arrow type: ${r}`);return}const c=l.type,u=`${s}_${a}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const f=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${f}`;if(!document.getElementById(m)){const C=document.getElementById(u);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),Xb=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=xt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Us=new Map,Ht=new Map,cS=g(()=>{Us.clear(),Ht.clear()},"clear"),bi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Vb=g(async(e,t)=>{const r=xt();let i=ee(r);const{labelStyles:s}=Q(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await ze(e,t.label,{style:bi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),W.info("abc82",t,t.labelType);let c=h.getBBox(),d=c;if(i){const u=h.children[0],y=ht(h);c=u.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{const u=ht(h).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}o.attr("transform",fi(d,i)),Us.set(t.id,a),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(y,t.startLabelLeft,bi(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",fi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startLeft=u,_i(p,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(y,t.startLabelRight,bi(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",fi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).startRight=u,_i(p,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(u,t.endLabelLeft,bi(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",fi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endLeft=u,_i(p,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),y=u.insert("g").attr("class","inner"),f=await Ze(u,t.endLabelRight,bi(t.labelStyle)||"",!1,!1);p=f;let m=f.getBBox();if(i){const C=f.children[0],b=ht(f);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",fi(m,i)),Ht.get(t.id)||Ht.set(t.id,{}),Ht.get(t.id).endRight=u,_i(p,t.endLabelRight)}return h},"insertEdgeLabel");function _i(e,t){ee(xt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(_i,"setTerminalWidth");var Zb=g((e,t)=>{W.debug("Moving label abc88 ",e.id,e.label,Us.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:s}=pn(i);if(e.label){const a=Us.get(e.id);let o=e.x,n=e.y;if(r){const l=ye.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ht.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ht.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ht.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ht.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ye.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Kb=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),Qb=g((e,t,r)=>{W.debug(`intersection calc abc89:
|
|
261
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),Ct(t,p),t.calcIntersect=function(d,m){return ht.rect(d,m)},t.intersect=function(d){return ht.rect(t,d)},s}f(ig,"defaultMindmapNode");async function sg(e,t){const r={padding:t.padding??0};return bl(e,t,r)}f(sg,"mindmapCircle");var Gk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Df},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Mf},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Pf},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Nf},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:sf},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:hf},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:zp},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Xp},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:jp},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ef},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:bl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:eg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:rg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ff},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:df},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Tf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:kf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Yf},{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:xf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:of},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Hf},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Yp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Of},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:qf},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Rf},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Kp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Qp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Jp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Sf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Xf},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:uf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jf},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:wf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:af},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Gf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Zf},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:nf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Uf},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$f},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:vf},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Bf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Np},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Zp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Wf},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zf},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Vf},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ef},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:_f}],Xk=f(()=>{const t=[...Object.entries({state:If,choice:Up,note:Lf,composite:Gp,rectWithTitle:Af,labelRect:bf,block_arrow:Hp,collapsedGroup:Wp,iconSquare:yf,iconCircle:gf,icon:ff,iconRounded:mf,imageSquare:Cf,anchor:Rp,kanbanItem:tg,mindmapCircle:sg,defaultMindmapNode:ig,classBox:Qf,erBox:kl,requirementBox:Jf}),...Gk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ag=Xk();function Vk(e){return e in ag}f(Vk,"isValidShape");var qa=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Na=new Map;async function Tl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?ag[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",oe(t.look)),t.tooltip&&s.attr("title",t.tooltip),Na.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Tl,"insertNode");var IL=f((e,t)=>{Na.set(t.id,e)},"setNodeElem"),Zk=f(()=>{Na.clear()},"clear"),Dc=f(e=>{const t=Na.get(e.id);W.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Kk=f(async(e,t)=>{const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=xt(t),p=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=lr(r.flowchart.htmlLabels),m=t.direction==="LR",y=p.insert("g").attr("class","cluster-label swimlane-label"),x=await Ve(y,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=x.getBBox();if(d){const j=x.children[0],A=Pt(x);C=j.getBoundingClientRect(),A.attr("width",C.width),A.attr("height",C.height)}const k=t.padding??0,S=t.width<=C.width+k?C.width+k:t.width;t.width<=C.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const w=t.height,B=t.y-w/2,L=t.y+w/2,E=t.x-S/2,F=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:B+w/3,X=m?4:0,N=C.height+2*X;let z,at;if(m){const j=Math.max(N,C.height+2*X),A=E+j,O=Math.max(0,S-j);if(t.look==="handDrawn"){const P=ft.svg(p),H=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Z=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),ut=P.rectangle(E,B,j,w,H);z=p.insert(()=>ut,":first-child");const pt=P.rectangle(A,B,O,w,Z);at=p.insert(()=>pt,":first-child"),z.select("path:nth-child(2)").attr("style",h.join(";")),z.select("path").attr("style",u.join(";").replace("fill","stroke"))}else z=p.insert("rect",":first-child"),at=p.insert("rect",":first-child"),z.attr("class","swimlane-title").attr("style",c).attr("x",E).attr("y",B).attr("width",j).attr("height",w).attr("fill",a).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",A).attr("y",B).attr("width",O).attr("height",w).attr("fill","none").attr("stroke",n);const v=E+j/2,R=t.y;y.attr("transform",`translate(${v}, ${R}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const j=Math.max(0,F-B),A=Math.min(N,j),O=B+A,v=Math.max(0,L-O),R=t.x-S/2;if(t.look==="handDrawn"){const Z=ft.svg(p),ut=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),pt=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),bt=Z.rectangle(R,B,S,A,ut);z=p.insert(()=>bt,":first-child");const Tt=Z.rectangle(R,O,S,v,pt);at=p.insert(()=>Tt,":first-child"),z.select("path:nth-child(2)").attr("style",h.join(";")),z.select("path").attr("style",u.join(";").replace("fill","stroke"))}else z=p.insert("rect",":first-child"),at=p.insert("rect",":first-child"),z.attr("class","swimlane-title").attr("style",c).attr("x",R).attr("y",B).attr("width",S).attr("height",A).attr("fill",a).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",O).attr("width",S).attr("height",v).attr("fill","none").attr("stroke",n);const P=t.x-C.width/2,H=B+(A-C.height)/2;y.attr("transform",`translate(${P}, ${H})`)}if(W.trace("Swimlane data ",t,JSON.stringify(t)),l){const j=y.select("span");j&&j.attr("style",l)}return t.offsetX=0,t.width=S,t.height=w,t.offsetY=C.height-k/2,t.intersect=function(j){return ti(t,j)},{cluster:p,labelBBox:C}},"swimlane"),og=f(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=xt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=be(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await Fr(d,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(be(r)){const E=m.children[0],F=Pt(m);y=E.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const E=ft.svg(u),F=dt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),X=E.path(He(k,S,x,C,0),F);w=u.insert(()=>(W.debug("Rough node insert CXC",X),X),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:B}=qa(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const E=d.select("span");E&&E.attr("style",n)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(E){return ti(t,E)},{cluster:u,labelBBox:y}},"rect"),Qk=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return ti(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Jk=f(async(e,t)=>{const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let p=c.append("rect");const d=await Fr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(be(r)){const X=d.children[0],N=Pt(d);m=X.getBoundingClientRect(),N.attr("width",m.width),N.attr("height",m.height)}const y=0*t.padding,x=y/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,w=t.x-C/2,B=t.y-k/2;t.width=C;const L=t.y-t.height/2-x+m.height+2;let E;if(t.look==="handDrawn"){const X=t.cssClasses.includes("statediagram-cluster-alt"),N=ft.svg(c),z=t.rx||t.ry?N.path(He(w,B,C,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(w,B,C,k,{seed:s});E=c.insert(()=>z,":first-child");const at=N.rectangle(w,L,C,S,{fill:X?a:o,fillStyle:X?"hachure":"solid",stroke:l,seed:s});E=c.insert(()=>z,":first-child"),p=c.insert(()=>at)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",w).attr("y",B).attr("width",C).attr("height",k).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",L).attr("width",C).attr("height",S);u.attr("transform",`translate(${t.x-m.width/2}, ${B+1-(be(r)?0:3)})`);const F=E.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(X){return ti(t,X)},{cluster:c,labelBBox:m}},"roundedWithTitle"),t1=f(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=xt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=be(r),d=u.insert("g").attr("class","cluster-label "),m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let y=m.getBBox();if(be(r)){const E=m.children[0],F=Pt(m);y=E.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const E=ft.svg(u),F=dt(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),X=E.path(He(k,S,x,C,t.rx),F);w=u.insert(()=>(W.debug("Rough node insert CXC",X),X),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:B}=qa(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const E=d.select("span");E&&E.attr("style",n)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(E){return ti(t,E)},{cluster:u,labelBBox:y}},"kanbanSection"),e1=f((e,t)=>{const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,p=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const x=ft.svg(o).rectangle(u,p,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>x,":first-child")}else{d=n.insert("rect",":first-child");let y="outer";t.look,y="divider",d.attr("class",y).attr("x",u).attr("y",p).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return ti(t,y)},{cluster:o,labelBBox:{}}},"divider"),r1=og,i1={rect:og,squareRect:r1,roundedWithTitle:Jk,noteGroup:Qk,divider:e1,kanbanSection:t1,swimlane:Kk},ng=new Map,lg=f(async(e,t)=>{const r=t.shape||"rect",i=await i1[r](e,t);return ng.set(t.id,i),i},"insertCluster"),s1=f(()=>{ng=new Map},"clear"),es=f((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ce={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Pc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ls(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Jt(e),t=Jt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(ls,"calculateDeltaAndAngle");var Jt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),a1=f(e=>({x:f(function(t,r,i){let s=0;const a=Jt(i[0]).x<Jt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:d,deltaX:m}=ls(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:d,deltaX:m}=ls(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),n=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),l=Math.abs(Jt(t).x-Jt(i[0]).x),c=Math.abs(Jt(t).y-Jt(i[0]).y),h=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="right"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=a==="right"?-1:1,s+=d}return Jt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=Jt(i[0]).y<Jt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:d,deltaY:m}=ls(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:d,deltaY:m}=ls(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),n=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),l=Math.abs(Jt(t).y-Jt(i[0]).y),c=Math.abs(Jt(t).x-Jt(i[0]).x),h=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="up"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=a==="up"?-1:1,s+=d}return Jt(t).y+s},"y")}),"getLineFunctionsWithOffset"),o1=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Ic(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Ic(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),n1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},l1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ic=f((e,t,r,i,s,a,o=!1,n)=>{var m;if(!r||r==="none")return;const l=n1[r],c=l&&l1.includes(l.type);if(!l){W.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),x=`${d}_${y}`;if(!document.getElementById(x)){const C=document.getElementById(d);if(C){const k=C.cloneNode(!0);k.id=x,k.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),h1=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=zt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Pi=new Map,se=new Map,c1=f(()=>{Pi.clear(),se.clear()},"clear"),hg=f(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),rs=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Sl=f(async(e,t)=>{const r=zt();let i=be(r);const{labelStyles:s}=xt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ve(e,t.label,{style:rs(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),W.info("abc82",t,t.labelType);let h,u;if(i){const d=c.children[0],m=Pt(c);h=await Vr.measure(()=>d.getBoundingClientRect()),u=h,m.attr("width",h.width),m.attr("height",h.height)}else{const d=Pt(c).select("text").node();await Vr.measure(()=>{h=c.getBBox(),d&&typeof d.getBBox=="function"?u=d.getBBox():u=h})}o.attr("transform",es(u,i)),Pi.set(t.id,a),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelLeft,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startLeft=d,hs(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelRight,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startRight=d,hs(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(d,t.endLabelLeft,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endLeft=d,hs(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(d,t.endLabelRight,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endRight=d,hs(p,t.endLabelRight)}return c},"insertEdgeLabel");function hs(e,t){be(zt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(hs,"setTerminalWidth");var u1=f((e,t)=>{W.debug("Moving label abc88 ",e.id,e.label,Pi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=zt(),{subGraphTitleTotalMargin:s}=qa(i);if(e.label){const a=Pi.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=se.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=se.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=se.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=se.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),d1=f((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),p1=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),f1=f((e,t,r)=>{W.debug(`intersection calc abc89:
|
|
292
262
|
outsidePoint: ${JSON.stringify(t)}
|
|
293
263
|
insidePoint : ${JSON.stringify(r)}
|
|
294
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=c*d/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-d:r.y-h+d};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),W.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let d=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,u=r.y<t.y?r.y+d:r.y-d;return W.debug(`sides calc abc89, Q ${h}, q ${d}, R ${c}, r ${n}`,{_x:p,_y:u}),n===0&&(p=t.x,u=t.y),c===0&&(p=t.x),h===0&&(u=t.y),{x:p,y:u}}},"intersection"),dh=g((e,t)=>{W.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(W.info("abc88 checking point",a,t),!Kb(t,a)&&!s){const o=Qb(t,i,a);W.debug("abc88 inside",a,i,o),W.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?W.warn("abc88 no intersect",o,r):r.push(o),s=!0}else W.warn("abc88 outside",a,i),i=a,s||r.push(a)}),W.debug("returning points",r),r},"cutPathAtIntersect");function hg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(hg,"extractCornerPoints");var uh=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),Jb=g(function(e){const{cornerPointPositions:t}=hg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=uh(s,o,5),l=uh(a,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){W.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const u=5;o.x===n.x?p={x:h<0?n.x-u+d:n.x+u-d,y:c<0?n.y-d:n.y+d}:p={x:h<0?n.x-d:n.x+d,y:c<0?n.y-u+d:n.y+u-d}}else W.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),tk=g((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Array(n).fill(`${s} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),ek=g(function(e,t,r,i,s,a,o,n=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=xt();let h=t.points,c=!1;const d=s;var p=a;const u=[];for(const A in t.cssCompiledStyles)nu(A)||u.push(t.cssCompiledStyles[A]);W.debug("UIO intersect check",t.points,p.x,d.x),p.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),W.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(W.info("to cluster abc88",r.get(t.toCluster)),h=dh(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(W.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=dh(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=h.filter(A=>!Number.isNaN(A.y));const m=Xb(t.curve);m!=="rounded"&&(f=Jb(f));let C=vi;switch(m){case"linear":C=vi;break;case"basis":C=Ua;break;case"cardinal":C=Bh;break;case"bumpX":C=bh;break;case"bumpY":C=xh;break;case"catmullRom":C=vh;break;case"monotoneX":C=Oh;break;case"monotoneY":C=$h;break;case"natural":C=Dh;break;case"step":C=Ph;break;case"stepAfter":C=qh;break;case"stepBefore":C=Rh;break;case"rounded":C=vi;break;default:C=Ua}const{x:b,y:k}=XC(t),S=If().x(b).y(k).curve(C);let B;switch(t.thickness){case"normal":B="edge-thickness-normal";break;case"thick":B="edge-thickness-thick";break;case"invisible":B="edge-thickness-invisible";break;default:B="edge-thickness-normal"}switch(t.pattern){case"solid":B+=" edge-pattern-solid";break;case"dotted":B+=" edge-pattern-dotted";break;case"dashed":B+=" edge-pattern-dashed";break;default:B+=" edge-pattern-solid"}let _,M=m==="rounded"?cg(dg(f,t),5):S(f);const v=Array.isArray(t.style)?t.style:[t.style];let z=v.find(A=>A==null?void 0:A.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let I=!1;if(t.look==="handDrawn"){const A=Z.svg(e);Object.assign([],f);const w=A.path(M,{roughness:.3,seed:l});B+=" transition",_=ht(w).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",v?v.reduce((V,dt)=>V+";"+dt,""):"");let N=_.attr("d");_.attr("d",N),e.node().appendChild(_.node())}else{const A=u.join(";"),w=v?v.reduce((Ct,vt)=>Ct+vt+";",""):"",N=(A?A+";"+w+";":w)+";"+(v?v.reduce((Ct,vt)=>Ct+";"+vt,""):"");_=e.append("path").attr("d",M).attr("id",`${o}-${t.id}`).attr("class"," "+B+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",N),z=($=N.match(/stroke:([^;]+)/))==null?void 0:$[1],I=t.animate===!0||!!t.animation||A.includes("animation");const V=_.node(),dt=typeof V.getTotalLength=="function"?V.getTotalLength():0,ft=_l[t.arrowTypeStart]||0,ut=_l[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const vt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?tk(dt,ft,ut):`0 ${ft} ${dt-ft-ut} ${ut}`}; stroke-dashoffset: 0;`;_.attr("style",vt+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",y),_.attr("data-look",qt(t.look)),t.showPoints&&f.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let Y="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",t.arrowTypeStart),W.info("arrowTypeEnd",t.arrowTypeEnd);const H=!I&&(t==null?void 0:t.look)==="neo";Ub(_,t,Y,o,i,H,z);const P=Math.floor(h.length/2),E=h[P];ye.isLabelCoordinateInPath(E,_.attr("d"))||(c=!0);let L={};return c&&(L.updatedPath=h),L.originalPath=t.points,L},"insertEdge");function cg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,d=l.x-o.x,p=l.y-o.y,u=Math.hypot(h,c),y=Math.hypot(d,p);if(u<s||y<s){r+=`L${o.x},${o.y}`;continue}const f=h/u,m=c/u,C=d/y,b=p/y,k=f*C+m*b,S=Math.max(-1,Math.min(1,k)),B=Math.acos(S);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${o.x},${o.y}`;continue}const _=Math.min(t/Math.sin(B/2),u/2,y/2),M=o.x-f*_,v=o.y-m*_,z=o.x+C*_,D=o.y+b*_;r+=`L${M},${v}`,r+=`Q${o.x},${o.y} ${z},${D}`}}return r}g(cg,"generateRoundedPath");function Ao(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(Ao,"calculateDeltaAndAngle");function dg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Gt[t.arrowTypeStart]){const s=Gt[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Ao(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const s=Gt[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Ao(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}g(dg,"applyMarkerOffsetsToPoints");var rk=g((e,t,r,i)=>{t.forEach(s=>{Bk[s](e,r,i)})},"insertMarkers"),ik=g((e,t,r)=>{W.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),sk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),ak=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ok=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),nk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),lk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),hk=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),ck=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),dk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),uk=g((e,t,r)=>{const i=_t(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),pk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),gk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),fk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),mk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),yk=g((e,t,r)=>{const i=_t(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Ck=g((e,t,r)=>{const i=_t(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),xk=g((e,t,r)=>{const i=_t(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),bk=g((e,t,r)=>{const i=_t(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),kk=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
264
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),W.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return W.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),h===0&&(p=t.x),c===0&&(d=t.y),{x:p,y:d}}},"intersection"),Rc=f((e,t)=>{W.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(W.info("abc88 checking point",a,t),!p1(t,a)&&!s){const o=f1(t,i,a);W.debug("abc88 inside",a,i,o),W.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?W.warn("abc88 no intersect",o,r):r.push(o),s=!0}else W.warn("abc88 outside",a,i),i=a,s||r.push(a)}),W.debug("returning points",r),r},"cutPathAtIntersect");function cg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(cg,"extractCornerPoints");var qc=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),g1=f(function(e){const{cornerPointPositions:t}=cg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=qc(s,o,5),l=qc(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){W.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:p={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else W.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),m1=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),ug=f(function(e,t,r,i,s,a,o,n=!1){var P;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=zt();let h=t.points,u=!1;const p=s;var d=a;const m=[];for(const H in t.cssCompiledStyles)Id(H)||m.push(t.cssCompiledStyles[H]);if(c==="swimlane"){if(d.intersect&&p.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[p.intersect(h[0]),d.intersect(h[1])];else{const H=h.slice(1,-1),Z=H[0],ut=H[H.length-1],pt=.5,bt=Math.abs(h[h.length-1].x-ut.x)<pt&&Math.abs(h[h.length-1].y-ut.y)<pt,Tt=p.intersect(Z),nt=bt?ut:d.intersect(ut),At=Math.abs(nt.x-ut.x)<pt&&Math.abs(nt.y-ut.y)<pt,qt=Math.abs(Tt.x-Z.x)<pt&&Math.abs(Tt.y-Z.y)<pt?[]:[Tt],vt=At?[]:[nt];h=[...qt,...H,...vt]}h=d1(t,h)}else d.intersect&&p.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(p.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(W.info("to cluster abc88",r.get(t.toCluster)),h=Rc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(W.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Rc(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let x=h.filter(H=>!Number.isNaN(H.y));const C=h1(t.curve);C!=="rounded"&&(x=g1(x));let k=ds;switch(C){case"linear":k=ds;break;case"basis":k=en;break;case"cardinal":k=Qu;break;case"bumpX":k=Gu;break;case"bumpY":k=Uu;break;case"catmullRom":k=td;break;case"monotoneX":k=od;break;case"monotoneY":k=nd;break;case"natural":k=hd;break;case"step":k=cd;break;case"stepAfter":k=dd;break;case"stepBefore":k=ud;break;case"rounded":k=ds;break;default:k=en}const{x:S,y:w}=a1(t),B=Ay().x(S).y(w).curve(k);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let E,F=C==="rounded"?dg(pg(x,t),5):B(x);const X=Array.isArray(t.style)?t.style:[t.style];let N=X.find(H=>H==null?void 0:H.startsWith("stroke:")),z="";t.animate&&(z="edge-animation-fast"),t.animation&&(z="edge-animation-"+t.animation);let at=!1;if(t.look==="handDrawn"){const H=ft.svg(e);Object.assign([],x);const Z=H.path(F,{roughness:.3,seed:l});L+=" transition",E=Pt(Z).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(z?" "+z:"")).attr("style",X?X.reduce((pt,bt)=>pt+";"+bt,""):"");let ut=E.attr("d");E.attr("d",ut),e.node().appendChild(E.node())}else{const H=m.join(";"),Z=X?X.reduce((At,Lt)=>At+Lt+";",""):"",ut=(H?H+";"+Z+";":Z)+";"+(X?X.reduce((At,Lt)=>At+";"+Lt,""):"");E=e.append("path").attr("d",F).attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(z?" "+z:"")).attr("style",ut),N=(P=ut.match(/stroke:([^;]+)/))==null?void 0:P[1],at=t.animate===!0||!!t.animation||H.includes("animation");const pt=E.node(),bt=typeof pt.getTotalLength=="function"?pt.getTotalLength():0,Tt=Pc[t.arrowTypeStart]||0,nt=Pc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!at){const Lt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?m1(bt,Tt,nt):`0 ${Tt} ${bt-Tt-nt} ${nt}`}; stroke-dashoffset: 0;`;E.attr("style",Lt+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",t.id),E.attr("data-points",y),E.attr("data-look",oe(t.look)),t.showPoints&&x.forEach(H=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let j="";(zt().flowchart.arrowMarkerAbsolute||zt().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",t.arrowTypeStart),W.info("arrowTypeEnd",t.arrowTypeEnd);const A=!at&&(t==null?void 0:t.look)==="neo";o1(E,t,j,o,i,A,N);const O=Math.floor(h.length/2),v=h[O];xe.isLabelCoordinateInPath(v,E.attr("d"))||(u=!0);let R={};return u&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function dg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(c,h),m=Math.hypot(u,p);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const y=c/d,x=h/d,C=u/m,k=p/m,S=y*C+x*k,w=Math.max(-1,Math.min(1,S)),B=Math.acos(w);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${o.x},${o.y}`;continue}const L=Math.min(t/Math.sin(B/2),d/2,m/2),E=o.x-y*L,F=o.y-x*L,X=o.x+C*L,N=o.y+k*L;r+=`L${E},${F}`,r+=`Q${o.x},${o.y} ${X},${N}`}}return r}f(dg,"generateRoundedPath");function Bn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(Bn,"calculateDeltaAndAngle");function pg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ce[t.arrowTypeStart]){const s=Ce[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Bn(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Ce[t.arrowTypeEnd]){const s=Ce[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Bn(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}f(pg,"applyMarkerOffsetsToPoints");var y1=f((e,t,r,i)=>{t.forEach(s=>{N1[s](e,r,i)})},"insertMarkers"),C1=f((e,t,r)=>{W.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),x1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),b1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),k1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),T1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),S1=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),w1=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),_1=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),B1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),v1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),L1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),F1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),E1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),A1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),M1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),O1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),$1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),D1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),P1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
295
265
|
L20,10
|
|
296
266
|
M20,10
|
|
297
|
-
L0,20`)},"requirement_arrow"),
|
|
267
|
+
L0,20`)},"requirement_arrow"),I1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
298
268
|
L20,10
|
|
299
269
|
M20,10
|
|
300
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Sk=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),wk=g((e,t,r)=>{const i=_t(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Bk={extension:ik,composition:sk,aggregation:ak,dependency:ok,lollipop:nk,point:lk,circle:hk,cross:ck,barb:dk,barbNeo:uk,only_one:pk,zero_or_one:gk,one_or_more:fk,zero_or_more:mk,only_one_neo:yk,zero_or_one_neo:Ck,one_or_more_neo:xk,zero_or_more_neo:bk,requirement_arrow:kk,requirement_contains:Sk,requirement_arrow_neo:Tk,requirement_contains_neo:wk},_k=rk,vk={common:zi,getConfig:_t,insertCluster:wb,insertEdge:ek,insertEdgeLabel:Vb,insertMarkers:_k,insertNode:lg,interpolateToCurve:nn,labelHelper:st,log:W,positionEdgeLabel:Zb},qi={},ug=g(e=>{for(const t of e)qi[t.name]=t},"registerLayoutLoaders"),Lk=g(()=>{ug([{name:"dagre",loader:g(async()=>await gt(()=>import("./explorer-dagre-BM42HDAG.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader")},{name:"cose-bilkent",loader:g(async()=>await gt(()=>import("./explorer-cose-bilkent-S5V4N54A.js"),__vite__mapDeps([5,6,3,4]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Lk();var dS=g(async(e,t)=>{if(!(e.layoutAlgorithm in qi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const d=c.domId||c.id;c.domId=`${e.diagramId}-${d}`}const r=qi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,vk,{algorithm:r.algorithm})},"render"),uS=g((e="",{fallback:t="dagre"}={})=>{if(e in qi)return e;if(t in qi)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ln="comm",pg="rule",gg="decl",Fk="@media",Ak="@import",Ek="@supports",Mk="@namespace",Eo="@keyframes",fg="@layer",Ok="@scope",$k=Math.abs,Mi=String.fromCharCode;function mg(e){return e.trim()}function Mo(e,t,r){return e.replace(t,r)}function Rr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function yg(e){return e.length}function hs(e,t){return t.push(e),e}var oa=1,si=1,Cg=0,ue=0,Mt=0,li="";function Fn(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:oa,column:si,length:o,return:"",siblings:n}}function Ik(){return Mt}function Dk(){return Mt=ue>0?Rr(li,--ue):0,si--,Mt===10&&(si=1,oa--),Mt}function xe(){return Mt=ue<Cg?Rr(li,ue++):0,si++,Mt===10&&(si=1,oa++),Mt}function Ke(){return Rr(li,ue)}function bs(){return ue}function na(e,t){return ii(li,e,t)}function Ni(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Pk(e){return oa=si=1,Cg=Fe(li=e),ue=0,[]}function Rk(e){return li="",e}function Ha(e){return mg(na(ue-1,Oo(e===91?e+2:e===40?e+1:e)))}function qk(e){for(;(Mt=Ke())&&Mt<33;)xe();return Ni(e)>2||Ni(Mt)>3?"":" "}function Nk(e,t){for(;--t&&xe()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return na(e,bs()+(t<6&&Ke()==32&&xe()==32))}function Oo(e){for(;xe();)switch(Mt){case e:return ue;case 34:case 39:e!==34&&e!==39&&Oo(Mt);break;case 40:e===41&&Oo(e);break;case 92:xe();break}return ue}function Wk(e,t){for(;xe()&&e+Mt!==57;)if(e+Mt===84&&Ke()===47)break;return"/*"+na(t,ue-1)+"*"+Mi(e===47?e:xe())}function zk(e){for(;!Ni(Ke());)xe();return na(e,ue)}function Hk(e){return Rk(ks("",null,null,null,[""],e=Pk(e),0,[0],e))}function ks(e,t,r,i,s,a,o,n,l){for(var h=0,c=0,d=o,p=0,u=0,y=0,f=1,m=1,C=1,b=0,k=0,S="",B=s,_=a,M=i,v=S;m;)switch(y=k,k=xe()){case 40:y!=108&&Rr(v,d-1)==58?(b++,v+="("):v+=Ha(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=Ha(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Mi(k);break}v+=qk(y);break;case 92:v+=Nk(bs()-1,7);continue;case 47:switch(Ke()){case 42:case 47:hs(Yk(Wk(xe(),bs()),t,r,l),l),(Ni(y||1)==5||Ni(Ke()||1)==5)&&Fe(v)&&ii(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*f:n[h++]=Fe(v)*C;case 125*f:case 59:case 0:if(b>0&&k){v+=Mi(k);break}switch(k){case 0:case 125:m=0;case 59+c:C==-1&&(v=Mo(v,/\f/g,"")),u>0&&(Fe(v)-d||f===0)&&hs(u>32?gh(v+";",i,r,d-1,l):gh(Mo(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(hs(M=ph(v,t,r,h,c,s,n,S,B=[],_=[],d,a),a),k===123)if(c===0)ks(v,t,M,M,B,a,d,n,_);else{switch(p){case 99:if(Rr(v,3)===110)break;case 108:if(Rr(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?ks(e,M,M,i&&hs(ph(e,M,M,0,0,s,n,S,s,B=[],d,_),_),s,_,d,n,i?B:_):ks(v,M,M,M,[""],_,0,n,_)}}h=c=u=0,f=C=1,S=v="",d=o;break;case 58:d=1+Fe(v),u=y;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&Dk()==125)continue}switch(v+=Mi(k),k*f){case 38:C=c>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[h++]=(Fe(v)-1)*C,C=1;break;case 64:Ke()===45&&(v+=Ha(xe())),p=Ke(),c=d=Fe(S=v+=zk(bs())),k++;break;case 45:y===45&&Fe(v)==2&&(f=0)}}return a}function ph(e,t,r,i,s,a,o,n,l,h,c,d){for(var p=s-1,u=s===0?a:[""],y=yg(u),f=0,m=0,C=0;f<i;++f)for(var b=0,k=ii(e,p+1,p=$k(m=o[f])),S=e;b<y;++b)(S=mg(m>0?u[b]+" "+k:Mo(k,/&\f/g,u[b])))&&(l[C++]=S);return Fn(e,t,r,s===0?pg:n,l,h,c,d)}function Yk(e,t,r,i){return Fn(e,t,r,Ln,Mi(Ik()),ii(e,2,-2),0,i)}function gh(e,t,r,i,s){return Fn(e,t,r,gg,ii(e,0,i),ii(e,i+1,-1),i,s)}function $o(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Uk(e,t,r,i){switch(e.type){case fg:if(e.children.length)break;case Ak:case Mk:case gg:return e.return=e.return||e.value;case Ln:return"";case Eo:return e.return=e.value+"{"+$o(e.children,i)+"}";case pg:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=$o(e.children,i))?e.return=e.value+"{"+r+"}":""}function jk(e){var t=yg(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var xg="c4",Gk=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Xk=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-c4Diagram-AAUBKEIU.js");return{diagram:t}},__vite__mapDeps([7,8,3,4]),import.meta.url);return{id:xg,diagram:e}},"loader"),Vk={id:xg,detector:Gk,loader:Xk},Zk=Vk,bg="flowchart",Kk=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),Qk=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-I6XJVG4X.js");return{diagram:t}},__vite__mapDeps([9,10,8,3,4,11,12,13]),import.meta.url);return{id:bg,diagram:e}},"loader"),Jk={id:bg,detector:Kk,loader:Qk},t1=Jk,kg="flowchart-v2",e1=g((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),r1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-I6XJVG4X.js");return{diagram:t}},__vite__mapDeps([9,10,8,3,4,11,12,13]),import.meta.url);return{id:kg,diagram:e}},"loader"),i1={id:kg,detector:e1,loader:r1},s1=i1,Tg="er",a1=g(e=>/^\s*erDiagram/.test(e),"detector"),o1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-erDiagram-TEJ5UH35.js");return{diagram:t}},__vite__mapDeps([14,11,3,4,12,13]),import.meta.url);return{id:Tg,diagram:e}},"loader"),n1={id:Tg,detector:a1,loader:o1},l1=n1,Sg="gitGraph",h1=g(e=>/^\s*gitGraph/.test(e),"detector"),c1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-gitGraphDiagram-PVQCEYII.js");return{diagram:t}},__vite__mapDeps([15,16,17,18,3,4]),import.meta.url);return{id:Sg,diagram:e}},"loader"),d1={id:Sg,detector:h1,loader:c1},u1=d1,wg="gantt",p1=g(e=>/^\s*gantt/.test(e),"detector"),g1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-ganttDiagram-6RSMTGT7.js");return{diagram:t}},__vite__mapDeps([19,3,4,20,21]),import.meta.url);return{id:wg,diagram:e}},"loader"),f1={id:wg,detector:p1,loader:g1},m1=f1,Bg="info",y1=g(e=>/^\s*info/.test(e),"detector"),C1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-infoDiagram-5YYISTIA.js");return{diagram:t}},__vite__mapDeps([22,18,3,4]),import.meta.url);return{id:Bg,diagram:e}},"loader"),x1={id:Bg,detector:y1,loader:C1},_g="pie",b1=g(e=>/^\s*pie/.test(e),"detector"),k1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-pieDiagram-4H26LBE5.js");return{diagram:t}},__vite__mapDeps([23,16,18,3,4]),import.meta.url);return{id:_g,diagram:e}},"loader"),T1={id:_g,detector:b1,loader:k1},vg="quadrantChart",S1=g(e=>/^\s*quadrantChart/.test(e),"detector"),w1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-quadrantDiagram-W4KKPZXB.js");return{diagram:t}},__vite__mapDeps([24,3,4,20,21]),import.meta.url);return{id:vg,diagram:e}},"loader"),B1={id:vg,detector:S1,loader:w1},_1=B1,Lg="xychart",v1=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),L1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-xychartDiagram-2RQKCTM6.js");return{diagram:t}},__vite__mapDeps([25,3,4,20,21]),import.meta.url);return{id:Lg,diagram:e}},"loader"),F1={id:Lg,detector:v1,loader:L1},A1=F1,Fg="requirement",E1=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),M1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-requirementDiagram-4Y6WPE33.js");return{diagram:t}},__vite__mapDeps([26,11,3,4,12]),import.meta.url);return{id:Fg,diagram:e}},"loader"),O1={id:Fg,detector:E1,loader:M1},$1=O1,Ag="sequence",I1=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),D1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-sequenceDiagram-3UESZ5HK.js");return{diagram:t}},__vite__mapDeps([27,8,3,4,17]),import.meta.url);return{id:Ag,diagram:e}},"loader"),P1={id:Ag,detector:I1,loader:D1},R1=P1,Eg="class",q1=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),N1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-classDiagram-4FO5ZUOK.js");return{diagram:t}},__vite__mapDeps([28,29,10,8,3,4,11,12]),import.meta.url);return{id:Eg,diagram:e}},"loader"),W1={id:Eg,detector:q1,loader:N1},z1=W1,Mg="classDiagram",H1=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),Y1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-classDiagram-v2-Q7XG4LA2.js");return{diagram:t}},__vite__mapDeps([30,29,10,8,3,4,11,12]),import.meta.url);return{id:Mg,diagram:e}},"loader"),U1={id:Mg,detector:H1,loader:Y1},j1=U1,Og="state",G1=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),X1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-AJRCARHV.js");return{diagram:t}},__vite__mapDeps([31,32,11,3,4,12,1,2]),import.meta.url);return{id:Og,diagram:e}},"loader"),V1={id:Og,detector:G1,loader:X1},Z1=V1,$g="stateDiagram",K1=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Q1=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-v2-BHNVJYJU.js");return{diagram:t}},__vite__mapDeps([33,32,11,3,4,12]),import.meta.url);return{id:$g,diagram:e}},"loader"),J1={id:$g,detector:K1,loader:Q1},t2=J1,Ig="journey",e2=g(e=>/^\s*journey/.test(e),"detector"),r2=g(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./explorer-journeyDiagram-JHISSGLW.js");return{diagram:t}},__vite__mapDeps([34,10,8,3,4]),import.meta.url);return{id:Ig,diagram:e}},"loader"),i2={id:Ig,detector:e2,loader:r2},s2=i2,a2=g((e,t,r)=>{W.debug(`rendering svg for syntax error
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
270
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),R1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),q1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),N1={extension:C1,composition:x1,aggregation:b1,dependency:k1,lollipop:T1,point:S1,circle:w1,cross:_1,barb:B1,barbNeo:v1,only_one:L1,zero_or_one:F1,one_or_more:E1,zero_or_more:A1,only_one_neo:M1,zero_or_one_neo:O1,one_or_more_neo:$1,zero_or_more_neo:D1,requirement_arrow:P1,requirement_contains:R1,requirement_arrow_neo:I1,requirement_contains_neo:q1},fg=y1,gg=typeof global=="object"&&global&&global.Object===Object&&global,z1=typeof self=="object"&&self&&self.Object===Object&&self,kr=gg||z1||Function("return this")(),ar=kr.Symbol,mg=Object.prototype,W1=mg.hasOwnProperty,H1=mg.toString,is=ar?ar.toStringTag:void 0;function j1(e){var t=W1.call(e,is),r=e[is];try{e[is]=void 0;var i=!0}catch{}var s=H1.call(e);return i&&(t?e[is]=r:delete e[is]),s}var Y1=Object.prototype,U1=Y1.toString;function G1(e){return U1.call(e)}var X1="[object Null]",V1="[object Undefined]",Nc=ar?ar.toStringTag:void 0;function zi(e){return e==null?e===void 0?V1:X1:Nc&&Nc in Object(e)?j1(e):G1(e)}function Zr(e){return e!=null&&typeof e=="object"}var Z1="[object Symbol]";function wl(e){return typeof e=="symbol"||Zr(e)&&zi(e)==Z1}function yg(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var Oe=Array.isArray,zc=ar?ar.prototype:void 0,Wc=zc?zc.toString:void 0;function Cg(e){if(typeof e=="string")return e;if(Oe(e))return yg(e,Cg)+"";if(wl(e))return Wc?Wc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _l(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function za(e){return e}var K1="[object AsyncFunction]",Q1="[object Function]",J1="[object GeneratorFunction]",t2="[object Proxy]";function Ba(e){if(!_l(e))return!1;var t=zi(e);return t==Q1||t==J1||t==K1||t==t2}var Bo=kr["__core-js_shared__"],Hc=(function(){var e=/[^.]+$/.exec(Bo&&Bo.keys&&Bo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function e2(e){return!!Hc&&Hc in e}var r2=Function.prototype,i2=r2.toString;function ei(e){if(e!=null){try{return i2.call(e)}catch{}try{return e+""}catch{}}return""}var s2=/[\\^$.*+?()[\]{}|]/g,a2=/^\[object .+?Constructor\]$/,o2=Function.prototype,n2=Object.prototype,l2=o2.toString,h2=n2.hasOwnProperty,c2=RegExp("^"+l2.call(h2).replace(s2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u2(e){if(!_l(e)||e2(e))return!1;var t=Ba(e)?c2:a2;return t.test(ei(e))}function d2(e,t){return e==null?void 0:e[t]}function ri(e,t){var r=d2(e,t);return u2(r)?r:void 0}var vn=ri(kr,"WeakMap");function p2(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function f2(){}var g2=800,m2=16,y2=Date.now;function C2(e){var t=0,r=0;return function(){var i=y2(),s=m2-(i-r);if(r=i,s>0){if(++t>=g2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function cs(e){return function(){return e}}var jc=(function(){try{var e=ri(Object,"defineProperty");return e({},"",{}),e}catch{}})(),x2=jc?function(e,t){return jc(e,"toString",{configurable:!0,enumerable:!1,value:cs(t),writable:!0})}:za,b2=C2(x2);function k2(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function T2(e,t,r,i){for(var s=e.length,a=r+-1;++a<s;)if(t(e[a],a,e))return a;return-1}function S2(e){return e!==e}function w2(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function _2(e,t,r){return t===t?w2(e,t,r):T2(e,S2,r)}function B2(e,t){var r=e==null?0:e.length;return!!r&&_2(e,t,0)>-1}var v2=9007199254740991,L2=/^(?:0|[1-9]\d*)$/;function xg(e,t){var r=typeof e;return t=t??v2,!!t&&(r=="number"||r!="symbol"&&L2.test(e))&&e>-1&&e%1==0&&e<t}function bg(e,t){return e===t||e!==e&&t!==t}var Yc=Math.max;function F2(e,t,r){return t=Yc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=Yc(i.length-t,0),o=Array(a);++s<a;)o[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(o),p2(e,this,n)}}function E2(e,t){return b2(F2(e,t,za),e+"")}var A2=9007199254740991;function Bl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=A2}function Wa(e){return e!=null&&Bl(e.length)&&!Ba(e)}var M2=Object.prototype;function kg(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||M2;return e===r}function O2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var $2="[object Arguments]";function Uc(e){return Zr(e)&&zi(e)==$2}var Tg=Object.prototype,D2=Tg.hasOwnProperty,P2=Tg.propertyIsEnumerable,Ha=Uc((function(){return arguments})())?Uc:function(e){return Zr(e)&&D2.call(e,"callee")&&!P2.call(e,"callee")};function I2(){return!1}var Sg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gc=Sg&&typeof module=="object"&&module&&!module.nodeType&&module,R2=Gc&&Gc.exports===Sg,Xc=R2?kr.Buffer:void 0,q2=Xc?Xc.isBuffer:void 0,va=q2||I2,N2="[object Arguments]",z2="[object Array]",W2="[object Boolean]",H2="[object Date]",j2="[object Error]",Y2="[object Function]",U2="[object Map]",G2="[object Number]",X2="[object Object]",V2="[object RegExp]",Z2="[object Set]",K2="[object String]",Q2="[object WeakMap]",J2="[object ArrayBuffer]",tT="[object DataView]",eT="[object Float32Array]",rT="[object Float64Array]",iT="[object Int8Array]",sT="[object Int16Array]",aT="[object Int32Array]",oT="[object Uint8Array]",nT="[object Uint8ClampedArray]",lT="[object Uint16Array]",hT="[object Uint32Array]",Qt={};Qt[eT]=Qt[rT]=Qt[iT]=Qt[sT]=Qt[aT]=Qt[oT]=Qt[nT]=Qt[lT]=Qt[hT]=!0;Qt[N2]=Qt[z2]=Qt[J2]=Qt[W2]=Qt[tT]=Qt[H2]=Qt[j2]=Qt[Y2]=Qt[U2]=Qt[G2]=Qt[X2]=Qt[V2]=Qt[Z2]=Qt[K2]=Qt[Q2]=!1;function cT(e){return Zr(e)&&Bl(e.length)&&!!Qt[zi(e)]}function uT(e){return function(t){return e(t)}}var wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ys=wg&&typeof module=="object"&&module&&!module.nodeType&&module,dT=ys&&ys.exports===wg,vo=dT&&gg.process,Vc=(function(){try{var e=ys&&ys.require&&ys.require("util").types;return e||vo&&vo.binding&&vo.binding("util")}catch{}})(),Zc=Vc&&Vc.isTypedArray,vl=Zc?uT(Zc):cT,pT=Object.prototype,fT=pT.hasOwnProperty;function gT(e,t){var r=Oe(e),i=!r&&Ha(e),s=!r&&!i&&va(e),a=!r&&!i&&!s&&vl(e),o=r||i||s||a,n=o?O2(e.length,String):[],l=n.length;for(var c in e)(t||fT.call(e,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xg(c,l)))&&n.push(c);return n}function mT(e,t){return function(r){return e(t(r))}}var yT=mT(Object.keys,Object),CT=Object.prototype,xT=CT.hasOwnProperty;function _g(e){if(!kg(e))return yT(e);var t=[];for(var r in Object(e))xT.call(e,r)&&r!="constructor"&&t.push(r);return t}function rr(e){return Wa(e)?gT(e):_g(e)}var bT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kT=/^\w*$/;function Ll(e,t){if(Oe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||wl(e)?!0:kT.test(e)||!bT.test(e)||t!=null&&e in Object(t)}var bs=ri(Object,"create");function TT(){this.__data__=bs?bs(null):{},this.size=0}function ST(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wT="__lodash_hash_undefined__",_T=Object.prototype,BT=_T.hasOwnProperty;function vT(e){var t=this.__data__;if(bs){var r=t[e];return r===wT?void 0:r}return BT.call(t,e)?t[e]:void 0}var LT=Object.prototype,FT=LT.hasOwnProperty;function ET(e){var t=this.__data__;return bs?t[e]!==void 0:FT.call(t,e)}var AT="__lodash_hash_undefined__";function MT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bs&&t===void 0?AT:t,this}function Kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Kr.prototype.clear=TT;Kr.prototype.delete=ST;Kr.prototype.get=vT;Kr.prototype.has=ET;Kr.prototype.set=MT;function OT(){this.__data__=[],this.size=0}function ja(e,t){for(var r=e.length;r--;)if(bg(e[r][0],t))return r;return-1}var $T=Array.prototype,DT=$T.splice;function PT(e){var t=this.__data__,r=ja(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():DT.call(t,r,1),--this.size,!0}function IT(e){var t=this.__data__,r=ja(t,e);return r<0?void 0:t[r][1]}function RT(e){return ja(this.__data__,e)>-1}function qT(e,t){var r=this.__data__,i=ja(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Tr.prototype.clear=OT;Tr.prototype.delete=PT;Tr.prototype.get=IT;Tr.prototype.has=RT;Tr.prototype.set=qT;var ks=ri(kr,"Map");function NT(){this.size=0,this.__data__={hash:new Kr,map:new(ks||Tr),string:new Kr}}function zT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ya(e,t){var r=e.__data__;return zT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function WT(e){var t=Ya(this,e).delete(e);return this.size-=t?1:0,t}function HT(e){return Ya(this,e).get(e)}function jT(e){return Ya(this,e).has(e)}function YT(e,t){var r=Ya(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Sr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Sr.prototype.clear=NT;Sr.prototype.delete=WT;Sr.prototype.get=HT;Sr.prototype.has=jT;Sr.prototype.set=YT;var UT="Expected a function";function Fl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(UT);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Fl.Cache||Sr),r}Fl.Cache=Sr;var GT=500;function XT(e){var t=Fl(e,function(i){return r.size===GT&&r.clear(),i}),r=t.cache;return t}var VT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZT=/\\(\\)?/g,KT=XT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(VT,function(r,i,s,a){t.push(s?a.replace(ZT,"$1"):i||r)}),t});function QT(e){return e==null?"":Cg(e)}function Bg(e,t){return Oe(e)?e:Ll(e,t)?[e]:KT(QT(e))}function Ua(e){if(typeof e=="string"||wl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function vg(e,t){t=Bg(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ua(t[r++])];return r&&r==i?e:void 0}function JT(e,t,r){var i=e==null?void 0:vg(e,t);return i===void 0?r:i}function Lg(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var Kc=ar?ar.isConcatSpreadable:void 0;function tS(e){return Oe(e)||Ha(e)||!!(Kc&&e&&e[Kc])}function eS(e,t,r,i,s){var a=-1,o=e.length;for(r||(r=tS),s||(s=[]);++a<o;){var n=e[a];r(n)?Lg(s,n):i||(s[s.length]=n)}return s}function rS(e,t,r,i){var s=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++s]);++s<a;)r=t(r,e[s],s,e);return r}function iS(){this.__data__=new Tr,this.size=0}function sS(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function aS(e){return this.__data__.get(e)}function oS(e){return this.__data__.has(e)}var nS=200;function lS(e,t){var r=this.__data__;if(r instanceof Tr){var i=r.__data__;if(!ks||i.length<nS-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Sr(i)}return r.set(e,t),this.size=r.size,this}function xr(e){var t=this.__data__=new Tr(e);this.size=t.size}xr.prototype.clear=iS;xr.prototype.delete=sS;xr.prototype.get=aS;xr.prototype.has=oS;xr.prototype.set=lS;function Fg(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var o=e[r];t(o,r,e)&&(a[s++]=o)}return a}function hS(){return[]}var cS=Object.prototype,uS=cS.propertyIsEnumerable,Qc=Object.getOwnPropertySymbols,dS=Qc?function(e){return e==null?[]:(e=Object(e),Fg(Qc(e),function(t){return uS.call(e,t)}))}:hS;function pS(e,t,r){var i=t(e);return Oe(e)?i:Lg(i,r(e))}function Jc(e){return pS(e,rr,dS)}var Ln=ri(kr,"DataView"),Fn=ri(kr,"Promise"),yi=ri(kr,"Set"),tu="[object Map]",fS="[object Object]",eu="[object Promise]",ru="[object Set]",iu="[object WeakMap]",su="[object DataView]",gS=ei(Ln),mS=ei(ks),yS=ei(Fn),CS=ei(yi),xS=ei(vn),yr=zi;(Ln&&yr(new Ln(new ArrayBuffer(1)))!=su||ks&&yr(new ks)!=tu||Fn&&yr(Fn.resolve())!=eu||yi&&yr(new yi)!=ru||vn&&yr(new vn)!=iu)&&(yr=function(e){var t=zi(e),r=t==fS?e.constructor:void 0,i=r?ei(r):"";if(i)switch(i){case gS:return su;case mS:return tu;case yS:return eu;case CS:return ru;case xS:return iu}return t});var au=kr.Uint8Array,bS="__lodash_hash_undefined__";function kS(e){return this.__data__.set(e,bS),this}function TS(e){return this.__data__.has(e)}function Ts(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Sr;++t<r;)this.add(e[t])}Ts.prototype.add=Ts.prototype.push=kS;Ts.prototype.has=TS;function SS(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function Eg(e,t){return e.has(t)}var wS=1,_S=2;function Ag(e,t,r,i,s,a){var o=r&wS,n=e.length,l=t.length;if(n!=l&&!(o&&l>n))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var u=-1,p=!0,d=r&_S?new Ts:void 0;for(a.set(e,t),a.set(t,e);++u<n;){var m=e[u],y=t[u];if(i)var x=o?i(y,m,u,t,e,a):i(m,y,u,e,t,a);if(x!==void 0){if(x)continue;p=!1;break}if(d){if(!SS(t,function(C,k){if(!Eg(d,k)&&(m===C||s(m,C,r,i,a)))return d.push(k)})){p=!1;break}}else if(!(m===y||s(m,y,r,i,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function BS(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function El(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var vS=1,LS=2,FS="[object Boolean]",ES="[object Date]",AS="[object Error]",MS="[object Map]",OS="[object Number]",$S="[object RegExp]",DS="[object Set]",PS="[object String]",IS="[object Symbol]",RS="[object ArrayBuffer]",qS="[object DataView]",ou=ar?ar.prototype:void 0,Lo=ou?ou.valueOf:void 0;function NS(e,t,r,i,s,a,o){switch(r){case qS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case RS:return!(e.byteLength!=t.byteLength||!a(new au(e),new au(t)));case FS:case ES:case OS:return bg(+e,+t);case AS:return e.name==t.name&&e.message==t.message;case $S:case PS:return e==t+"";case MS:var n=BS;case DS:var l=i&vS;if(n||(n=El),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;i|=LS,o.set(e,t);var h=Ag(n(e),n(t),i,s,a,o);return o.delete(e),h;case IS:if(Lo)return Lo.call(e)==Lo.call(t)}return!1}var zS=1,WS=Object.prototype,HS=WS.hasOwnProperty;function jS(e,t,r,i,s,a){var o=r&zS,n=Jc(e),l=n.length,c=Jc(t),h=c.length;if(l!=h&&!o)return!1;for(var u=l;u--;){var p=n[u];if(!(o?p in t:HS.call(t,p)))return!1}var d=a.get(e),m=a.get(t);if(d&&m)return d==t&&m==e;var y=!0;a.set(e,t),a.set(t,e);for(var x=o;++u<l;){p=n[u];var C=e[p],k=t[p];if(i)var S=o?i(k,C,p,t,e,a):i(C,k,p,e,t,a);if(!(S===void 0?C===k||s(C,k,r,i,a):S)){y=!1;break}x||(x=p=="constructor")}if(y&&!x){var w=e.constructor,B=t.constructor;w!=B&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof B=="function"&&B instanceof B)&&(y=!1)}return a.delete(e),a.delete(t),y}var YS=1,nu="[object Arguments]",lu="[object Array]",Xs="[object Object]",US=Object.prototype,hu=US.hasOwnProperty;function GS(e,t,r,i,s,a){var o=Oe(e),n=Oe(t),l=o?lu:yr(e),c=n?lu:yr(t);l=l==nu?Xs:l,c=c==nu?Xs:c;var h=l==Xs,u=c==Xs,p=l==c;if(p&&va(e)){if(!va(t))return!1;o=!0,h=!1}if(p&&!h)return a||(a=new xr),o||vl(e)?Ag(e,t,r,i,s,a):NS(e,t,l,r,i,s,a);if(!(r&YS)){var d=h&&hu.call(e,"__wrapped__"),m=u&&hu.call(t,"__wrapped__");if(d||m){var y=d?e.value():e,x=m?t.value():t;return a||(a=new xr),s(y,x,r,i,a)}}return p?(a||(a=new xr),jS(e,t,r,i,s,a)):!1}function Al(e,t,r,i,s){return e===t?!0:e==null||t==null||!Zr(e)&&!Zr(t)?e!==e&&t!==t:GS(e,t,r,i,Al,s)}var XS=1,VS=2;function ZS(e,t,r,i){var s=r.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var o=r[s];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++s<a;){o=r[s];var n=o[0],l=e[n],c=o[1];if(o[2]){if(l===void 0&&!(n in e))return!1}else{var h=new xr,u;if(!(u===void 0?Al(c,l,XS|VS,i,h):u))return!1}}return!0}function Mg(e){return e===e&&!_l(e)}function KS(e){for(var t=rr(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Mg(s)]}return t}function Og(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function QS(e){var t=KS(e);return t.length==1&&t[0][2]?Og(t[0][0],t[0][1]):function(r){return r===e||ZS(r,e,t)}}function JS(e,t){return e!=null&&t in Object(e)}function tw(e,t,r){t=Bg(t,e);for(var i=-1,s=t.length,a=!1;++i<s;){var o=Ua(t[i]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++i!=s?a:(s=e==null?0:e.length,!!s&&Bl(s)&&xg(o,s)&&(Oe(e)||Ha(e)))}function ew(e,t){return e!=null&&tw(e,t,JS)}var rw=1,iw=2;function sw(e,t){return Ll(e)&&Mg(t)?Og(Ua(e),t):function(r){var i=JT(r,e);return i===void 0&&i===t?ew(r,e):Al(t,i,rw|iw)}}function aw(e){return function(t){return t==null?void 0:t[e]}}function ow(e){return function(t){return vg(t,e)}}function nw(e){return Ll(e)?aw(Ua(e)):ow(e)}function $g(e){return typeof e=="function"?e:e==null?za:typeof e=="object"?Oe(e)?sw(e[0],e[1]):QS(e):nw(e)}function lw(e){return function(t,r,i){for(var s=-1,a=Object(t),o=i(t),n=o.length;n--;){var l=o[++s];if(r(a[l],l,a)===!1)break}return t}}var hw=lw();function cw(e,t){return e&&hw(e,t,rr)}function uw(e,t){return function(r,i){if(r==null)return r;if(!Wa(r))return e(r,i);for(var s=r.length,a=-1,o=Object(r);++a<s&&i(o[a],a,o)!==!1;);return r}}var Ml=uw(cw);function dw(e){return Zr(e)&&Wa(e)}function pw(e){return typeof e=="function"?e:za}function qr(e,t){var r=Oe(e)?k2:Ml;return r(e,pw(t))}function fw(e,t){var r=[];return Ml(e,function(i,s,a){t(i,s,a)&&r.push(i)}),r}function Vs(e,t){var r=Oe(e)?Fg:fw;return r(e,$g(t))}function gw(e,t){return yg(t,function(r){return e[r]})}function Fo(e){return e==null?[]:gw(e,rr(e))}var mw="[object Map]",yw="[object Set]",Cw=Object.prototype,xw=Cw.hasOwnProperty;function cu(e){if(e==null)return!0;if(Wa(e)&&(Oe(e)||typeof e=="string"||typeof e.splice=="function"||va(e)||vl(e)||Ha(e)))return!e.length;var t=yr(e);if(t==mw||t==yw)return!e.size;if(kg(e))return!_g(e).length;for(var r in e)if(xw.call(e,r))return!1;return!0}function pi(e){return e===void 0}function bw(e,t,r,i,s){return s(e,function(a,o,n){r=i?(i=!1,a):t(r,a,o,n)}),r}function kw(e,t,r){var i=Oe(e)?rS:bw,s=arguments.length<3;return i(e,$g(t),r,s,Ml)}var Tw=1/0,Sw=yi&&1/El(new yi([,-0]))[1]==Tw?function(e){return new yi(e)}:f2,ww=200;function _w(e,t,r){var i=-1,s=B2,a=e.length,o=!0,n=[],l=n;if(a>=ww){var c=Sw(e);if(c)return El(c);o=!1,s=Eg,l=new Ts}else l=n;t:for(;++i<a;){var h=e[i],u=h;if(h=h!==0?h:0,o&&u===u){for(var p=l.length;p--;)if(l[p]===u)continue t;n.push(h)}else s(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var Bw=E2(function(e){return _w(eS(e,1,dw,!0))}),vw="\0",Nr="\0",uu="";class Ga{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=cs(void 0),this._defaultEdgeLabelFn=cs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Nr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Ba(t)||(t=cs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return rr(this._nodes)}sources(){var t=this;return Vs(this.nodes(),function(r){return cu(t._in[r])})}sinks(){var t=this;return Vs(this.nodes(),function(r){return cu(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return qr(t,function(a){i.length>1?s.setNode(a,r):s.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Nr,this._children[t]={},this._children[Nr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],qr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),qr(rr(this._in[t]),r),delete this._in[t],delete this._preds[t],qr(rr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(pi(r))r=Nr;else{r+="";for(var i=r;!pi(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Nr)return r}}children(t){if(pi(t)&&(t=Nr),this._isCompound){var r=this._children[t];if(r)return rr(r)}else{if(t===Nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return rr(r)}successors(t){var r=this._sucs[t];if(r)return rr(r)}neighbors(t){var r=this.predecessors(t);if(r)return Bw(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;qr(this._nodes,function(o,n){t(n)&&r.setNode(n,o)}),qr(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var s={};function a(o){var n=i.parent(o);return n===void 0||r.hasNode(n)?(s[o]=n,n):n in s?s[n]:a(n)}return this._isCompound&&qr(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return Ba(t)||(t=cs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Fo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return kw(t,function(a,o){return s.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,s,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(s=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,r=""+r,pi(i)||(i=""+i);var n=us(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),this;if(!pi(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=a?s:this._defaultEdgeLabelFn(t,r,i);var l=Lw(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,du(this._preds[r],t),du(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):us(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):us(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):us(this._isDirected,t,r,i),a=this._edgeObjs[s];return a&&(t=a.v,r=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],pu(this._preds[r],t),pu(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=Fo(i);return r?Vs(s,function(a){return a.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=Fo(i);return r?Vs(s,function(a){return a.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Ga.prototype._nodeCount=0;Ga.prototype._edgeCount=0;function du(e,t){e[t]?e[t]++:e[t]=1}function pu(e,t){--e[t]||delete e[t]}function us(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}return s+uu+a+uu+(pi(i)?vw:i)}function Lw(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}var n={v:s,w:a};return i&&(n.name=i),n}function Eo(e,t){return us(e,t.v,t.w,t.name)}function Dg(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:a,nodes:o,rootGroups:r}}f(Dg,"createLayoutElementGroups");async function Pg(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await St(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}f(Pg,"measureGroupLabel");async function Ig(e,t,r){var a;const i=await Tl(e,t,r),s=((a=i.node())==null?void 0:a.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}f(Ig,"insertMeasuredNode");async function Rg(e,t){const r=new Ga({multigraph:!0,compound:!0}),i=[...t.edges],s=zt(),a=Dg(e),{edgeLabels:o,nodes:n}=a,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Pg(n,h),r.setNode(h.id,{...h});else{if(c){const u=await Ig(n,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&hg(h)&&await Sl(o,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(p=>p.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await It(async()=>{const{captureNodeSizes:u}=await import("./explorer-sizeCapture-INFHLROL.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2]),import.meta.url);h(e,t)}return{graph:r,groups:a,nodeElements:l}}f(Rg,"createGraphWithElements");var Ht=new Map,jr=new Map,qg=new Map,Fw=f(()=>{jr.clear(),qg.clear(),Ht.clear()},"clear"),Ss=f((e,t)=>{const r=jr.get(t)||[];return W.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Ew=f((e,t)=>{const r=jr.get(t)||[];return W.info("Descendants of ",t," is ",r),W.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Ss(e.v,t)||Ss(e.w,t)||r.includes(e.w):(W.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Ng=f((e,t,r,i)=>{W.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),W.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)Ng(a,t,r,i);else{const o=t.node(a);W.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(W.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(W.debug("Setting parent",a,e),r.setParent(a,e)):(W.info("In copy ",e,"root",i,"data",t.node(e),i),W.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));const n=t.edges(a);W.debug("Copying Edges",n),n.forEach(l=>{W.info("Edge",l);const c=t.edge(l.v,l.w,l.name);W.info("Edge data",c,i);try{Ew(l,i)?(W.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),W.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):W.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){W.error(h)}})}W.debug("Removing node",a),t.removeNode(a)})},"copy"),zg=f((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)qg.set(s,e),i=[...i,...zg(s,t)];return i},"extractDescendants"),Aw=f((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),o=s.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),La=f((e,t,r)=>{const i=t.children(e);if(W.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const a of i){const o=La(a,t,r),n=Aw(t,r,o);if(o)if(n.length>0)s=o;else return o}return s},"findNonClusterChild"),fu=f(e=>!Ht.has(e)||!Ht.get(e).externalConnections?e:Ht.has(e)?Ht.get(e).id:e,"getAnchorId"),RL=f((e,t)=>{var r;if(!e||t>10){W.debug("Opting out, no graph ");return}else W.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(W.debug("Cluster identified",i," Replacement id in edges: ",La(i,e,i)),jr.set(i,zg(i,e)),Ht.set(i,{id:La(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),a=e.edges();s.length>0?(W.debug("Cluster identified",i,jr),a.forEach(o=>{const n=Ss(o.v,i),l=Ss(o.w,i);n^l&&(W.debug("Edge: ",o," leaves cluster ",i),W.debug("Descendants of XXX ",i,": ",jr.get(i)),Ht.get(i).externalConnections=!0)})):W.debug("Not a cluster ",i,jr)});for(let i of Ht.keys()){const s=Ht.get(i).id,a=e.parent(s);a!==i&&Ht.has(a)&&!Ht.get(a).externalConnections&&(Ht.get(i).id=a);const o=e.edges().some(n=>n.v===i);if(s&&((r=Ht.get(i))!=null&&r.externalConnections)&&o&&jg(e,s,i)){const n=Mw(e,i,e.parent(s));n&&(Ht.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);W.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),W.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let a=i.v,o=i.w;if(W.debug("Fix XXX",Ht,"ids:",i.v,i.w,"Translating: ",Ht.get(i.v)," --- ",Ht.get(i.w)),Ht.get(i.v)||Ht.get(i.w)){if(W.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),a=fu(i.v),o=fu(i.w),e.removeEdge(i.v,i.w,i.name),a!==i.v){const n=e.parent(a);Ht.get(n).externalConnections=!0,s.fromCluster=i.v}if(o!==i.w){const n=e.parent(o);Ht.get(n).externalConnections=!0,s.toCluster=i.w}W.debug("Fix Replacing with XXX",a,o,i.name),e.setEdge(a,o,s,i.name)}}),Wg(e,0),W.trace(Ht)},"adjustClustersAndEdges"),Wg=f((e,t)=>{var s,a;if(t>10){W.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const n=e.children(o);i=i||n.length>0}if(!i){W.debug("Done, no node has children",e.nodes());return}W.debug("Nodes = ",r,t);for(const o of r)if(W.debug("Extracting node",o,Ht,Ht.has(o)&&!Ht.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Ht.has(o))W.debug("Not a cluster",o,t);else if(!Ht.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){W.debug("Cluster without external connections, without a parent and with children",o,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(s=Ht.get(o))==null?void 0:s.clusterData)!=null&&a.dir&&(l=Ht.get(o).clusterData.dir,W.debug("Fixing dir",Ht.get(o).clusterData.dir,l));const c=new Ga({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Ng(o,e,c,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Ht.get(o).clusterData,label:Ht.get(o).label,graph:c})}else W.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Ht.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),W.debug(Ht);r=e.nodes(),W.debug("New list of nodes",r);for(const o of r){const n=e.node(o);W.debug(" Now next level",o,n),n!=null&&n.clusterNode&&Wg(n.graph,t+1)}},"extractor"),Hg=f((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),a=Hg(e,s);r=[...r,...a]}),r},"sorter"),qL=f(e=>Hg(e,e.children()),"sortNodesByHierarchy"),jg=f((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ht.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Mw=f((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Ss(s,r))continue;const a=La(s,e,t);if(a&&!jg(e,a,t))return a}return null},"findSafeAnchorNode");function Yg({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:a}){const o=t??$l;return f(async function(l,c,h,u){const p=c.select("g");((h==null?void 0:h.insertMarkers)??fg)(p,l.markers,l.type,l.diagramId),Ol();const d={element:p,helpers:h,options:u};d.preparedLayout=await(e==null?void 0:e(l,d));const m=await o(l,d),y=await r(l,d),x={...d,measure:m};i?await i(l,x,y):await Dl(l,x,a),await(s==null?void 0:s(l,x,y))},"render")}f(Yg,"createCommonLayoutRenderer");function Ol(){Zk(),c1(),s1(),Fw()}f(Ol,"clearLayoutRenderState");async function $l(e,{element:t}){return await Rg(t,e)}f($l,"defaultMeasureLayout");async function Dl(e,t,r={}){var o,n;const{measure:i}=t,{groups:s}=i;for(const l of((o=r.getNodes)==null?void 0:o.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await Ug(s,l,t,r);const a=Xg(e.nodes);for(const l of e.edges)Vg(l,r)||await Zg(s,l,a,e,r,t)}f(Dl,"paintLayoutData");async function Ug(e,t,r,i){t.clusterNode?Dc(t):Gg(t,r,i)?await lg(e.clusters,t):Dc(t)}f(Ug,"paintLayoutNode");function Gg(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}f(Gg,"shouldPaintAsCluster");function Xg(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}f(Xg,"buildNodeLookup");function Vg(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}f(Vg,"shouldSkipPaintEdge");async function Zg(e,t,r,i,s,a){const o=ug(e.edgePaths,{...t},s.clusterDb??new Map,i.type,En(t.start,t,r,a,s),En(t.end,t,r,a,s),i.diagramId,Kg(t,s));hg(t)&&(Pi.has(t.id)||await Sl(e.edgeLabels,t),Qg(t,o))}f(Zg,"paintLayoutEdge");function En(e,t,r,i,s){var a;return((a=s.getEdgeNode)==null?void 0:a.call(s,e,t,i))??(e?r.get(e)??{}:{})}f(En,"getRenderedNode");function Kg(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}f(Kg,"shouldSkipIntersect");function Qg(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=te(),{subGraphTitleTotalMargin:s}=qa({flowchart:i.flowchart??{}});if(e.label){const a=Pi.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const a=se.get(e.id).startLeft;let o=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=se.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=se.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=se.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}}f(Qg,"positionRenderedEdgeLabel");function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}f(Jg,"getDefaultExportFromCjs");var ge={},Zs={},vr={},gu;function Wi(){if(gu)return vr;gu=1;function e(o){return typeof o>"u"||o===null}f(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}f(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}f(r,"toArray");function i(o,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];o[u]=n[u]}}return o}f(i,"extend");function s(o,n){let l="";for(let c=0;c<n;c+=1)l+=o;return l}f(s,"repeat");function a(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return f(a,"isNegativeZero"),vr.isNothing=e,vr.isObject=t,vr.toArray=r,vr.repeat=s,vr.isNegativeZero=a,vr.extend=i,vr}f(Wi,"requireCommon");var Ao,mu;function Hi(){if(mu)return Ao;mu=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
271
|
+
|
|
272
|
+
`+r.mark.snippet),a+" "+s):a}f(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return f(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=f(function(i){return this.name+": "+e(this,i)},"toString"),Ao=t,Ao}f(Hi,"requireException");var Mo,yu;function tm(){if(yu)return Mo;yu=1;const e=Wi();function t(s,a,o,n,l){let c="",h="";const u=Math.floor(l/2)-1;return n-a>u&&(c=" ... ",a=n-u+c.length),o-n>u&&(h=" ...",o=n+u-h.length),{str:c+s.slice(a,o).replace(/\t/g,"→")+h,pos:n-a+c.length}}f(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}f(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const o=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=o.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let u="";const p=Math.min(s.line+a.linesAfter,l.length).toString().length,d=a.maxLength-(a.indent+p+3);for(let y=1;y<=a.linesBefore&&!(h-y<0);y++){const x=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),d);u=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),p)+" | "+x.str+`
|
|
273
|
+
`+u}const m=t(s.buffer,n[h],l[h],s.position,d);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),p)+" | "+m.str+`
|
|
274
|
+
`,u+=e.repeat("-",a.indent+p+3+m.pos)+`^
|
|
275
|
+
`;for(let y=1;y<=a.linesAfter&&!(h+y>=l.length);y++){const x=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),d);u+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),p)+" | "+x.str+`
|
|
276
|
+
`}return u.replace(/\n$/,"")}return f(i,"makeSnippet"),Mo=i,Mo}f(tm,"requireSnippet");var Oo,Cu;function ke(){if(Cu)return Oo;Cu=1;const e=Hi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const o={};return a!==null&&Object.keys(a).forEach(function(n){a[n].forEach(function(l){o[String(l)]=n})}),o}f(i,"compileStyleAliases");function s(a,o){if(o=o||{},Object.keys(o).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=o,this.tag=a,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=i(o.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return f(s,"Type2"),Oo=s,Oo}f(ke,"requireType");var $o,xu;function Pl(){if(xu)return $o;xu=1;const e=Hi(),t=ke();function r(a,o){const n=[];return a[o].forEach(function(l){let c=n.length;n.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),n[c]=l}),n}f(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(n){n.multi?(a.multi[n.kind].push(n),a.multi.fallback.push(n)):a[n.kind][n.tag]=a.fallback[n.tag]=n}f(o,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(o);return a}f(i,"compileMap");function s(a){return this.extend(a)}return f(s,"Schema2"),s.prototype.extend=f(function(o){let n=[],l=[];if(o instanceof t)l.push(o);else if(Array.isArray(o))l=l.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(n=n.concat(o.implicit)),o.explicit&&(l=l.concat(o.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),$o=s,$o}f(Pl,"requireSchema");var Do,bu;function Il(){if(bu)return Do;bu=1;const e=ke();return Do=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(t){return t!==null?t:""},"construct")}),Do}f(Il,"requireStr");var Po,ku;function Rl(){if(ku)return Po;ku=1;const e=ke();return Po=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(t){return t!==null?t:[]},"construct")}),Po}f(Rl,"requireSeq");var Io,Tu;function ql(){if(Tu)return Io;Tu=1;const e=ke();return Io=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(t){return t!==null?t:{}},"construct")}),Io}f(ql,"requireMap");var Ro,Su;function Nl(){if(Su)return Ro;Su=1;const e=Pl();return Ro=new e({explicit:[Il(),Rl(),ql()]}),Ro}f(Nl,"requireFailsafe");var qo,wu;function zl(){if(wu)return qo;wu=1;const e=ke();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}f(t,"resolveYamlNull");function r(){return null}f(r,"constructYamlNull");function i(s){return s===null}return f(i,"isNull"),qo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"}),qo}f(zl,"require_null");var No,_u;function Wl(){if(_u)return No;_u=1;const e=ke();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}f(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}f(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return f(i,"isBoolean"),No=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:f(function(s){return s?"true":"false"},"lowercase"),uppercase:f(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),No}f(Wl,"requireBool");var zo,Bu;function Hl(){if(Bu)return zo;Bu=1;const e=Wi(),t=ke();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}f(r,"isHexCode");function i(c){return c>=48&&c<=55}f(i,"isOctCode");function s(c){return c>=48&&c<=57}f(s,"isDecCode");function a(c){if(c===null)return!1;const h=c.length;let u=0,p=!1;if(!h)return!1;let d=c[u];if((d==="-"||d==="+")&&(d=c[++u]),d==="0"){if(u+1===h)return!0;if(d=c[++u],d==="b"){for(u++;u<h;u++){if(d=c[u],d!=="0"&&d!=="1")return!1;p=!0}return p&&isFinite(o(c))}if(d==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;p=!0}return p&&isFinite(o(c))}if(d==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;p=!0}return p&&isFinite(o(c))}}for(;u<h;u++){if(!s(c.charCodeAt(u)))return!1;p=!0}return p?isFinite(o(c)):!1}f(a,"resolveYamlInteger");function o(c){let h=c,u=1,p=h[0];if((p==="-"||p==="+")&&(p==="-"&&(u=-1),h=h.slice(1),p=h[0]),h==="0")return 0;if(p==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}f(o,"parseYamlInteger");function n(c){return o(c)}f(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return f(l,"isInteger"),zo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:l,represent:{binary:f(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:f(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:f(function(c){return c.toString(10)},"decimal"),hexadecimal:f(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),zo}f(Hl,"requireInt");var Wo,vu;function jl(){if(vu)return Wo;vu=1;const e=Wi(),t=ke(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}f(s,"resolveYamlFloat");function a(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}f(a,"constructYamlFloat");const o=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return o.test(u)?u.replace("e",".e"):u}f(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return f(l,"isFloat"),Wo=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:n,defaultStyle:"lowercase"}),Wo}f(jl,"requireFloat");var Ho,Lu;function Yl(){return Lu||(Lu=1,Ho=Nl().extend({implicit:[zl(),Wl(),Hl(),jl()]})),Ho}f(Yl,"requireJson");var jo,Fu;function Ul(){return Fu||(Fu=1,jo=Yl()),jo}f(Ul,"requireCore");var Yo,Eu;function Gl(){if(Eu)return Yo;Eu=1;const e=ke(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(o){return o===null?!1:t.exec(o)!==null||r.exec(o)!==null}f(i,"resolveYamlTimestamp");function s(o){let n=0,l=null,c=t.exec(o);if(c===null&&(c=r.exec(o)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,p=+c[3];if(!c[4])return new Date(Date.UTC(h,u,p));const d=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const C=+c[10],k=+(c[11]||0);l=(C*60+k)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,u,p,d,m,y,n));return l&&x.setTime(x.getTime()-l),x}f(s,"constructYamlTimestamp");function a(o){return o.toISOString()}return f(a,"representYamlTimestamp"),Yo=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),Yo}f(Gl,"requireTimestamp");var Uo,Au;function Xl(){if(Au)return Uo;Au=1;const e=ke();function t(r){return r==="<<"||r===null}return f(t,"resolveYamlMerge"),Uo=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Uo}f(Xl,"requireMerge");var Go,Mu;function Vl(){if(Mu)return Go;Mu=1;const e=ke(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
277
|
+
\r`;function r(o){if(o===null)return!1;let n=0;const l=o.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(o.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}f(r,"resolveYamlBinary");function i(o){const n=o.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let d=0;d<l;d++)d%4===0&&d&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(d));const p=l%4*6;return p===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):p===18?(u.push(h>>10&255),u.push(h>>2&255)):p===12&&u.push(h>>4&255),new Uint8Array(u)}f(i,"constructYamlBinary");function s(o){let n="",l=0;const c=o.length,h=t;for(let p=0;p<c;p++)p%3===0&&p&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+o[p];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}f(s,"representYamlBinary");function a(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return f(a,"isBinary"),Go=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),Go}f(Vl,"requireBinary");var Xo,Ou;function Zl(){if(Ou)return Xo;Ou=1;const e=ke(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const o=[],n=a;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let p;for(p in h)if(t.call(h,p))if(!u)u=!0;else return!1;if(!u)return!1;if(o.indexOf(p)===-1)o.push(p);else return!1}return!0}f(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return f(s,"constructYamlOmap"),Xo=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Xo}f(Zl,"requireOmap");var Vo,$u;function Kl(){if($u)return Vo;$u=1;const e=ke(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;o[n]=[h[0],c[h[0]]]}return!0}f(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n],h=Object.keys(c);o[n]=[h[0],c[h[0]]]}return o}return f(i,"constructYamlPairs"),Vo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Vo}f(Kl,"requirePairs");var Zo,Du;function Ql(){if(Du)return Zo;Du=1;const e=ke(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const o in a)if(t.call(a,o)&&a[o]!==null)return!1;return!0}f(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return f(i,"constructYamlSet"),Zo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Zo}f(Ql,"requireSet");var Ko,Pu;function Xa(){return Pu||(Pu=1,Ko=Ul().extend({implicit:[Gl(),Xl()],explicit:[Vl(),Zl(),Kl(),Ql()]})),Ko}f(Xa,"require_default");var Iu;function em(){if(Iu)return Zs;Iu=1;const e=Wi(),t=Hi(),r=tm(),i=Xa(),s=Object.prototype.hasOwnProperty,a=1,o=2,n=3,l=4,c=1,h=2,u=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(g){return Object.prototype.toString.call(g)}f(C,"_class");function k(g){return g===10||g===13}f(k,"isEol");function S(g){return g===9||g===32}f(S,"isWhiteSpace");function w(g){return g===9||g===32||g===10||g===13}f(w,"isWsOrEol");function B(g){return g===44||g===91||g===93||g===123||g===125}f(B,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const $=g|32;return $>=97&&$<=102?$-97+10:-1}f(L,"fromHexCode");function E(g){return g===120?2:g===117?4:g===85?8:0}f(E,"escapedHexLen");function F(g){return g>=48&&g<=57?g-48:-1}f(F,"fromDecimalCode");function X(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
278
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}f(X,"simpleEscapeSequence");function N(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}f(N,"charFromCodepoint");function z(g,$,V){$==="__proto__"?Object.defineProperty(g,$,{configurable:!0,enumerable:!0,writable:!0,value:V}):g[$]=V}f(z,"setProperty");const at=new Array(256),j=new Array(256);for(let g=0;g<256;g++)at[g]=X(g)?1:0,j[g]=X(g);function A(g,$){this.input=g,this.filename=$.filename||null,this.schema=$.schema||i,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth=="number"?$.maxDepth:100,this.maxTotalMergeKeys=typeof $.maxTotalMergeKeys=="number"?$.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}f(A,"State");function O(g,$){const V={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return V.snippet=r(V),new t($,V)}f(O,"generateError");function v(g,$){throw O(g,$)}f(v,"throwError");function R(g,$){g.onWarning&&g.onWarning.call(null,O(g,$))}f(R,"throwWarning");function P(g,$,V){const Q=g.anchorMapTransactions;if(Q.length!==0){const G=Q[Q.length-1];s.call(G,$)||(G[$]={existed:s.call(g.anchorMap,$),value:g.anchorMap[$]})}g.anchorMap[$]=V}f(P,"storeAnchor");function H(g){g.anchorMapTransactions.push(Object.create(null))}f(H,"beginAnchorTransaction");function Z(g){const $=g.anchorMapTransactions.pop(),V=g.anchorMapTransactions;if(V.length===0)return;const Q=V[V.length-1],G=Object.keys($);for(let st=0,T=G.length;st<T;st+=1){const q=G[st];s.call(Q,q)||(Q[q]=$[q])}}f(Z,"commitAnchorTransaction");function ut(g){const $=g.anchorMapTransactions.pop(),V=Object.keys($);for(let Q=V.length-1;Q>=0;Q-=1){const G=$[V[Q]];G.existed?g.anchorMap[V[Q]]=G.value:delete g.anchorMap[V[Q]]}}f(ut,"rollbackAnchorTransaction");function pt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}f(pt,"snapshotState");function bt(g,$){g.position=$.position,g.line=$.line,g.lineStart=$.lineStart,g.lineIndent=$.lineIndent,g.firstTabInLine=$.firstTabInLine,g.tag=$.tag,g.anchor=$.anchor,g.kind=$.kind,g.result=$.result}f(bt,"restoreState");const Tt={YAML:f(function($,V,Q){$.version!==null&&v($,"duplication of %YAML directive"),Q.length!==1&&v($,"YAML directive accepts exactly one argument");const G=/^([0-9]+)\.([0-9]+)$/.exec(Q[0]);G===null&&v($,"ill-formed argument of the YAML directive");const st=parseInt(G[1],10),T=parseInt(G[2],10);st!==1&&v($,"unacceptable YAML version of the document"),$.version=Q[0],$.checkLineBreaks=T<2,T!==1&&T!==2&&R($,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function($,V,Q){let G;Q.length!==2&&v($,"TAG directive accepts exactly two arguments");const st=Q[0];G=Q[1],y.test(st)||v($,"ill-formed tag handle (first argument) of the TAG directive"),s.call($.tagMap,st)&&v($,'there is a previously declared suffix for "'+st+'" tag handle'),x.test(G)||v($,"ill-formed tag prefix (second argument) of the TAG directive");try{G=decodeURIComponent(G)}catch{v($,"tag prefix is malformed: "+G)}$.tagMap[st]=G},"handleTagDirective")};function nt(g,$,V,Q){if($<V){const G=g.input.slice($,V);if(Q)for(let st=0,T=G.length;st<T;st+=1){const q=G.charCodeAt(st);q===9||q>=32&&q<=1114111||v(g,"expected valid JSON character")}else p.test(G)&&v(g,"the stream contains non-printable characters");g.result+=G}}f(nt,"captureSegment");function At(g,$,V,Q){e.isObject(V)||v(g,"cannot merge mappings; the provided source object is unacceptable");const G=Object.keys(V);for(let st=0,T=G.length;st<T;st+=1){const q=G[st];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&v(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call($,q)||(z($,q,V[q]),Q[q]=!0)}}f(At,"mergeMappings");function Lt(g,$,V,Q,G,st,T,q,et){if(Array.isArray(G)){G=Array.prototype.slice.call(G);for(let K=0,J=G.length;K<J;K+=1)Array.isArray(G[K])&&v(g,"nested arrays are not supported inside keys"),typeof G=="object"&&C(G[K])==="[object Object]"&&(G[K]="[object Object]")}if(typeof G=="object"&&C(G)==="[object Object]"&&(G="[object Object]"),G=String(G),$===null&&($={}),Q==="tag:yaml.org,2002:merge")if(Array.isArray(st))for(let K=0,J=st.length;K<J;K+=1)At(g,$,st[K],V);else At(g,$,st,V);else!g.json&&!s.call(V,G)&&s.call($,G)&&(g.line=T||g.line,g.lineStart=q||g.lineStart,g.position=et||g.position,v(g,"duplicated mapping key")),z($,G,st),delete V[G];return $}f(Lt,"storeMappingPair");function qt(g){const $=g.input.charCodeAt(g.position);$===10?g.position++:$===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):v(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}f(qt,"readLineBreak");function vt(g,$,V){let Q=0,G=g.input.charCodeAt(g.position);for(;G!==0;){for(;S(G);)G===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),G=g.input.charCodeAt(++g.position);if($&&G===35)do G=g.input.charCodeAt(++g.position);while(G!==10&&G!==13&&G!==0);if(k(G))for(qt(g),G=g.input.charCodeAt(g.position),Q++,g.lineIndent=0;G===32;)g.lineIndent++,G=g.input.charCodeAt(++g.position);else break}return V!==-1&&Q!==0&&g.lineIndent<V&&R(g,"deficient indentation"),Q}f(vt,"skipSeparationSpace");function lt(g){let $=g.position,V=g.input.charCodeAt($);return!!((V===45||V===46)&&V===g.input.charCodeAt($+1)&&V===g.input.charCodeAt($+2)&&($+=3,V=g.input.charCodeAt($),V===0||w(V)))}f(lt,"testDocumentSeparator");function gt(g,$){$===1?g.result+=" ":$>1&&(g.result+=e.repeat(`
|
|
279
|
+
`,$-1))}f(gt,"writeFoldedLines");function Et(g,$,V){let Q,G,st,T,q,et;const K=g.kind,J=g.result;let it=g.input.charCodeAt(g.position);if(w(it)||B(it)||it===35||it===38||it===42||it===33||it===124||it===62||it===39||it===34||it===37||it===64||it===96)return!1;if(it===63||it===45){const tt=g.input.charCodeAt(g.position+1);if(w(tt)||V&&B(tt))return!1}for(g.kind="scalar",g.result="",Q=G=g.position,st=!1;it!==0;){if(it===58){const tt=g.input.charCodeAt(g.position+1);if(w(tt)||V&&B(tt))break}else if(it===35){const tt=g.input.charCodeAt(g.position-1);if(w(tt))break}else{if(g.position===g.lineStart&<(g)||V&&B(it))break;if(k(it))if(T=g.line,q=g.lineStart,et=g.lineIndent,vt(g,!1,-1),g.lineIndent>=$){st=!0,it=g.input.charCodeAt(g.position);continue}else{g.position=G,g.line=T,g.lineStart=q,g.lineIndent=et;break}}st&&(nt(g,Q,G,!1),gt(g,g.line-T),Q=G=g.position,st=!1),S(it)||(G=g.position+1),it=g.input.charCodeAt(++g.position)}return nt(g,Q,G,!1),g.result?!0:(g.kind=K,g.result=J,!1)}f(Et,"readPlainScalar");function Rt(g,$){let V,Q,G=g.input.charCodeAt(g.position);if(G!==39)return!1;for(g.kind="scalar",g.result="",g.position++,V=Q=g.position;(G=g.input.charCodeAt(g.position))!==0;)if(G===39)if(nt(g,V,g.position,!0),G=g.input.charCodeAt(++g.position),G===39)V=g.position,g.position++,Q=g.position;else return!0;else k(G)?(nt(g,V,Q,!0),gt(g,vt(g,!1,$)),V=Q=g.position):g.position===g.lineStart&<(g)?v(g,"unexpected end of the document within a single quoted scalar"):(g.position++,S(G)||(Q=g.position));v(g,"unexpected end of the stream within a single quoted scalar")}f(Rt,"readSingleQuotedScalar");function Ut(g,$){let V,Q,G,st=g.input.charCodeAt(g.position);if(st!==34)return!1;for(g.kind="scalar",g.result="",g.position++,V=Q=g.position;(st=g.input.charCodeAt(g.position))!==0;){if(st===34)return nt(g,V,g.position,!0),g.position++,!0;if(st===92){if(nt(g,V,g.position,!0),st=g.input.charCodeAt(++g.position),k(st))vt(g,!1,$);else if(st<256&&at[st])g.result+=j[st],g.position++;else if((G=E(st))>0){let T=G,q=0;for(;T>0;T--)st=g.input.charCodeAt(++g.position),(G=L(st))>=0?q=(q<<4)+G:v(g,"expected hexadecimal character");g.result+=N(q),g.position++}else v(g,"unknown escape sequence");V=Q=g.position}else k(st)?(nt(g,V,Q,!0),gt(g,vt(g,!1,$)),V=Q=g.position):g.position===g.lineStart&<(g)?v(g,"unexpected end of the document within a double quoted scalar"):(g.position++,S(st)||(Q=g.position))}v(g,"unexpected end of the stream within a double quoted scalar")}f(Ut,"readDoubleQuotedScalar");function D(g,$){let V=!0,Q,G,st;const T=g.tag;let q;const et=g.anchor;let K,J,it,tt;const mt=Object.create(null);let ct,kt,Bt,Nt=g.input.charCodeAt(g.position);if(Nt===91)K=93,tt=!1,q=[];else if(Nt===123)K=125,tt=!0,q={};else return!1;for(g.anchor!==null&&P(g,g.anchor,q),Nt=g.input.charCodeAt(++g.position);Nt!==0;){if(vt(g,!0,$),Nt=g.input.charCodeAt(g.position),Nt===K)return g.position++,g.tag=T,g.anchor=et,g.kind=tt?"mapping":"sequence",g.result=q,!0;if(V?Nt===44&&v(g,"expected the node content, but found ','"):v(g,"missed comma between flow collection entries"),kt=ct=Bt=null,J=it=!1,Nt===63){const Vt=g.input.charCodeAt(g.position+1);w(Vt)&&(J=it=!0,g.position++,vt(g,!0,$))}Q=g.line,G=g.lineStart,st=g.position,Be(g,$,a,!1,!0),kt=g.tag,ct=g.result,vt(g,!0,$),Nt=g.input.charCodeAt(g.position),(it||g.line===Q)&&Nt===58&&(J=!0,Nt=g.input.charCodeAt(++g.position),vt(g,!0,$),Be(g,$,a,!1,!0),Bt=g.result),tt?Lt(g,q,mt,kt,ct,Bt,Q,G,st):J?q.push(Lt(g,null,mt,kt,ct,Bt,Q,G,st)):q.push(ct),vt(g,!0,$),Nt=g.input.charCodeAt(g.position),Nt===44?(V=!0,Nt=g.input.charCodeAt(++g.position)):V=!1}v(g,"unexpected end of the stream within a flow collection")}f(D,"readFlowCollection");function Ft(g,$){let V,Q=c,G=!1,st=!1,T=$,q=0,et=!1,K,J=g.input.charCodeAt(g.position);if(J===124)V=!1;else if(J===62)V=!0;else return!1;for(g.kind="scalar",g.result="";J!==0;)if(J=g.input.charCodeAt(++g.position),J===43||J===45)c===Q?Q=J===43?u:h:v(g,"repeat of a chomping mode identifier");else if((K=F(J))>=0)K===0?v(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):st?v(g,"repeat of an indentation width identifier"):(T=$+K-1,st=!0);else break;if(S(J)){do J=g.input.charCodeAt(++g.position);while(S(J));if(J===35)do J=g.input.charCodeAt(++g.position);while(!k(J)&&J!==0)}for(;J!==0;){for(qt(g),g.lineIndent=0,J=g.input.charCodeAt(g.position);(!st||g.lineIndent<T)&&J===32;)g.lineIndent++,J=g.input.charCodeAt(++g.position);if(!st&&g.lineIndent>T&&(T=g.lineIndent),k(J)){q++;continue}if(!st&&T===0&&v(g,"missing indentation for block scalar"),g.lineIndent<T){Q===u?g.result+=e.repeat(`
|
|
280
|
+
`,G?1+q:q):Q===c&&G&&(g.result+=`
|
|
281
|
+
`);break}V?S(J)?(et=!0,g.result+=e.repeat(`
|
|
282
|
+
`,G?1+q:q)):et?(et=!1,g.result+=e.repeat(`
|
|
283
|
+
`,q+1)):q===0?G&&(g.result+=" "):g.result+=e.repeat(`
|
|
284
|
+
`,q):g.result+=e.repeat(`
|
|
285
|
+
`,G?1+q:q),G=!0,st=!0,q=0;const it=g.position;for(;!k(J)&&J!==0;)J=g.input.charCodeAt(++g.position);nt(g,it,g.position,!1)}return!0}f(Ft,"readBlockScalar");function Wt(g,$){const V=g.tag,Q=g.anchor,G=[];let st=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&P(g,g.anchor,G);let T=g.input.charCodeAt(g.position);for(;T!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation")),T===45);){const q=g.input.charCodeAt(g.position+1);if(!w(q))break;if(st=!0,g.position++,vt(g,!0,-1)&&g.lineIndent<=$){G.push(null),T=g.input.charCodeAt(g.position);continue}const et=g.line;if(Be(g,$,n,!1,!0),G.push(g.result),vt(g,!0,-1),T=g.input.charCodeAt(g.position),(g.line===et||g.lineIndent>$)&&T!==0)v(g,"bad indentation of a sequence entry");else if(g.lineIndent<$)break}return st?(g.tag=V,g.anchor=Q,g.kind="sequence",g.result=G,!0):!1}f(Wt,"readBlockSequence");function we(g,$,V){let Q,G,st,T;const q=g.tag,et=g.anchor,K={},J=Object.create(null);let it=null,tt=null,mt=null,ct=!1,kt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&P(g,g.anchor,K);let Bt=g.input.charCodeAt(g.position);for(;Bt!==0;){!ct&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation"));const Nt=g.input.charCodeAt(g.position+1),Vt=g.line;if((Bt===63||Bt===58)&&w(Nt))Bt===63?(ct&&(Lt(g,K,J,it,tt,null,G,st,T),it=tt=mt=null),kt=!0,ct=!0,Q=!0):ct?(ct=!1,Q=!0):v(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,Bt=Nt;else{if(G=g.line,st=g.lineStart,T=g.position,!Be(g,V,o,!1,!0))break;if(g.line===Vt){for(Bt=g.input.charCodeAt(g.position);S(Bt);)Bt=g.input.charCodeAt(++g.position);if(Bt===58)Bt=g.input.charCodeAt(++g.position),w(Bt)||v(g,"a whitespace character is expected after the key-value separator within a block mapping"),ct&&(Lt(g,K,J,it,tt,null,G,st,T),it=tt=mt=null),kt=!0,ct=!1,Q=!1,it=g.tag,tt=g.result;else if(kt)v(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=q,g.anchor=et,!0}else if(kt)v(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=q,g.anchor=et,!0}if((g.line===Vt||g.lineIndent>$)&&(ct&&(G=g.line,st=g.lineStart,T=g.position),Be(g,$,l,!0,Q)&&(ct?tt=g.result:mt=g.result),ct||(Lt(g,K,J,it,tt,mt,G,st,T),it=tt=mt=null),vt(g,!0,-1),Bt=g.input.charCodeAt(g.position)),(g.line===Vt||g.lineIndent>$)&&Bt!==0)v(g,"bad indentation of a mapping entry");else if(g.lineIndent<$)break}return ct&&Lt(g,K,J,it,tt,null,G,st,T),kt&&(g.tag=q,g.anchor=et,g.kind="mapping",g.result=K),kt}f(we,"readBlockMapping");function fe(g){let $=!1,V=!1,Q,G,st=g.input.charCodeAt(g.position);if(st!==33)return!1;g.tag!==null&&v(g,"duplication of a tag property"),st=g.input.charCodeAt(++g.position),st===60?($=!0,st=g.input.charCodeAt(++g.position)):st===33?(V=!0,Q="!!",st=g.input.charCodeAt(++g.position)):Q="!";let T=g.position;if($){do st=g.input.charCodeAt(++g.position);while(st!==0&&st!==62);g.position<g.length?(G=g.input.slice(T,g.position),st=g.input.charCodeAt(++g.position)):v(g,"unexpected end of the stream within a verbatim tag")}else{for(;st!==0&&!w(st);)st===33&&(V?v(g,"tag suffix cannot contain exclamation marks"):(Q=g.input.slice(T-1,g.position+1),y.test(Q)||v(g,"named tag handle cannot contain such characters"),V=!0,T=g.position+1)),st=g.input.charCodeAt(++g.position);G=g.input.slice(T,g.position),m.test(G)&&v(g,"tag suffix cannot contain flow indicator characters")}G&&!x.test(G)&&v(g,"tag name cannot contain such characters: "+G);try{G=decodeURIComponent(G)}catch{v(g,"tag name is malformed: "+G)}return $?g.tag=G:s.call(g.tagMap,Q)?g.tag=g.tagMap[Q]+G:Q==="!"?g.tag="!"+G:Q==="!!"?g.tag="tag:yaml.org,2002:"+G:v(g,'undeclared tag handle "'+Q+'"'),!0}f(fe,"readTagProperty");function Re(g){let $=g.input.charCodeAt(g.position);if($!==38)return!1;g.anchor!==null&&v(g,"duplication of an anchor property"),$=g.input.charCodeAt(++g.position);const V=g.position;for(;$!==0&&!w($)&&!B($);)$=g.input.charCodeAt(++g.position);return g.position===V&&v(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(V,g.position),!0}f(Re,"readAnchorProperty");function cr(g){let $=g.input.charCodeAt(g.position);if($!==42)return!1;$=g.input.charCodeAt(++g.position);const V=g.position;for(;$!==0&&!w($)&&!B($);)$=g.input.charCodeAt(++g.position);g.position===V&&v(g,"name of an alias node must contain at least one character");const Q=g.input.slice(V,g.position);return s.call(g.anchorMap,Q)||v(g,'unidentified alias "'+Q+'"'),g.result=g.anchorMap[Q],vt(g,!0,-1),!0}f(cr,"readAlias");function _e(g,$,V,Q){const G=pt(g);return H(g),bt(g,$),g.tag=null,g.anchor=null,g.kind=null,g.result=null,we(g,V,Q)&&g.kind==="mapping"?(Z(g),!0):(ut(g),bt(g,G),!1)}f(_e,"tryReadBlockMappingFromProperty");function Be(g,$,V,Q,G){let st,T,q=1,et=!1,K=!1,J=null,it,tt,mt;g.depth>=g.maxDepth&&v(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const ct=st=T=l===V||n===V;if(Q&&vt(g,!0,-1)&&(et=!0,g.lineIndent>$?q=1:g.lineIndent===$?q=0:g.lineIndent<$&&(q=-1)),q===1)for(;;){const kt=g.input.charCodeAt(g.position),Bt=pt(g);if(et&&(kt===33&&g.tag!==null||kt===38&&g.anchor!==null)||!fe(g)&&!Re(g))break;J===null&&(J=Bt),vt(g,!0,-1)?(et=!0,T=ct,g.lineIndent>$?q=1:g.lineIndent===$?q=0:g.lineIndent<$&&(q=-1)):T=!1}if(T&&(T=et||G),q===1||l===V)if(a===V||o===V?tt=$:tt=$+1,mt=g.position-g.lineStart,q===1)if(T&&(Wt(g,mt)||we(g,mt,tt))||D(g,tt))K=!0;else{const kt=g.input.charCodeAt(g.position);J!==null&&ct&&!T&&kt!==124&&kt!==62&&_e(g,J,J.position-J.lineStart,tt)||st&&Ft(g,tt)||Rt(g,tt)||Ut(g,tt)?K=!0:cr(g)?(K=!0,(g.tag!==null||g.anchor!==null)&&v(g,"alias node should not have any properties")):Et(g,tt,a===V)&&(K=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&P(g,g.anchor,g.result)}else q===0&&(K=T&&Wt(g,mt));if(g.tag===null)g.anchor!==null&&P(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&v(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let kt=0,Bt=g.implicitTypes.length;kt<Bt;kt+=1)if(it=g.implicitTypes[kt],it.resolve(g.result)){g.result=it.construct(g.result),g.tag=it.tag,g.anchor!==null&&P(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))it=g.typeMap[g.kind||"fallback"][g.tag];else{it=null;const kt=g.typeMap.multi[g.kind||"fallback"];for(let Bt=0,Nt=kt.length;Bt<Nt;Bt+=1)if(g.tag.slice(0,kt[Bt].tag.length)===kt[Bt].tag){it=kt[Bt];break}}it||v(g,"unknown tag !<"+g.tag+">"),g.result!==null&&it.kind!==g.kind&&v(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+it.kind+'", not "'+g.kind+'"'),it.resolve(g.result,g.tag)?(g.result=it.construct(g.result,g.tag),g.anchor!==null&&P(g,g.anchor,g.result)):v(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||K}f(Be,"composeNode");function ur(g){const $=g.position;let V=!1,Q;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(Q=g.input.charCodeAt(g.position))!==0&&(vt(g,!0,-1),Q=g.input.charCodeAt(g.position),!(g.lineIndent>0||Q!==37));){V=!0,Q=g.input.charCodeAt(++g.position);let G=g.position;for(;Q!==0&&!w(Q);)Q=g.input.charCodeAt(++g.position);const st=g.input.slice(G,g.position),T=[];for(st.length<1&&v(g,"directive name must not be less than one character in length");Q!==0;){for(;S(Q);)Q=g.input.charCodeAt(++g.position);if(Q===35){do Q=g.input.charCodeAt(++g.position);while(Q!==0&&!k(Q));break}if(k(Q))break;for(G=g.position;Q!==0&&!w(Q);)Q=g.input.charCodeAt(++g.position);T.push(g.input.slice(G,g.position))}Q!==0&&qt(g),s.call(Tt,st)?Tt[st](g,st,T):R(g,'unknown document directive "'+st+'"')}if(vt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,vt(g,!0,-1)):V&&v(g,"directives end mark is expected"),Be(g,g.lineIndent-1,l,!1,!0),vt(g,!0,-1),g.checkLineBreaks&&d.test(g.input.slice($,g.position))&&R(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&<(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,vt(g,!0,-1));return}g.position<g.length-1&&v(g,"end of the stream or a document separator is expected")}f(ur,"readDocument");function dr(g,$){g=String(g),$=$||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
|
|
286
|
+
`),g.charCodeAt(0)===65279&&(g=g.slice(1)));const V=new A(g,$),Q=g.indexOf("\0");for(Q!==-1&&(V.position=Q,v(V,"null byte is not allowed in input")),V.input+="\0";V.input.charCodeAt(V.position)===32;)V.lineIndent+=1,V.position+=1;for(;V.position<V.length-1;)ur(V);return V.documents}f(dr,"loadDocuments");function pr(g,$,V){$!==null&&typeof $=="object"&&typeof V>"u"&&(V=$,$=null);const Q=dr(g,V);if(typeof $!="function")return Q;for(let G=0,st=Q.length;G<st;G+=1)$(Q[G])}f(pr,"loadAll2");function ve(g,$){const V=dr(g,$);if(V.length!==0){if(V.length===1)return V[0];throw new t("expected a single document in the stream, but found more")}}return f(ve,"load2"),Zs.loadAll=pr,Zs.load=ve,Zs}f(em,"requireLoader");var Qo={},Ru;function rm(){if(Ru)return Qo;Ru=1;const e=Wi(),t=Hi(),r=Xa(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,o=9,n=10,l=13,c=32,h=33,u=34,p=35,d=37,m=38,y=39,x=42,C=44,k=45,S=58,w=61,B=62,L=63,E=64,F=91,X=93,N=96,z=123,at=124,j=125,A={};A[0]="\\0",A[7]="\\a",A[8]="\\b",A[9]="\\t",A[10]="\\n",A[11]="\\v",A[12]="\\f",A[13]="\\r",A[27]="\\e",A[34]='\\"',A[92]="\\\\",A[133]="\\N",A[160]="\\_",A[8232]="\\L",A[8233]="\\P";const O=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(T,q){if(q===null)return{};const et={},K=Object.keys(q);for(let J=0,it=K.length;J<it;J+=1){let tt=K[J],mt=String(q[tt]);tt.slice(0,2)==="!!"&&(tt="tag:yaml.org,2002:"+tt.slice(2));const ct=T.compiledTypeMap.fallback[tt];ct&&s.call(ct.styleAliases,mt)&&(mt=ct.styleAliases[mt]),et[tt]=mt}return et}f(R,"compileStyleMap");function P(T){let q,et;const K=T.toString(16).toUpperCase();if(T<=255)q="x",et=2;else if(T<=65535)q="u",et=4;else if(T<=4294967295)q="U",et=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+q+e.repeat("0",et-K.length)+K}f(P,"encodeHex");const H=1,Z=2;function ut(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=R(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==='"'?Z:H,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(ut,"State");function pt(T,q){const et=e.repeat(" ",q);let K=0,J="";const it=T.length;for(;K<it;){let tt;const mt=T.indexOf(`
|
|
287
|
+
`,K);mt===-1?(tt=T.slice(K),K=it):(tt=T.slice(K,mt+1),K=mt+1),tt.length&&tt!==`
|
|
288
|
+
`&&(J+=et),J+=tt}return J}f(pt,"indentString");function bt(T,q){return`
|
|
289
|
+
`+e.repeat(" ",T.indent*q)}f(bt,"generateNextLine");function Tt(T,q){for(let et=0,K=T.implicitTypes.length;et<K;et+=1)if(T.implicitTypes[et].resolve(q))return!0;return!1}f(Tt,"testImplicitResolving");function nt(T){return T===c||T===o}f(nt,"isWhitespace");function At(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==a||T>=65536&&T<=1114111}f(At,"isPrintable");function Lt(T){return At(T)&&T!==a&&T!==l&&T!==n}f(Lt,"isNsCharOrWhitespace");function qt(T,q,et){const K=Lt(T),J=K&&!nt(T);return(et?K:K&&T!==C&&T!==F&&T!==X&&T!==z&&T!==j)&&T!==p&&!(q===S&&!J)||Lt(q)&&!nt(q)&&T===p||q===S&&J}f(qt,"isPlainSafe");function vt(T){return At(T)&&T!==a&&!nt(T)&&T!==k&&T!==L&&T!==S&&T!==C&&T!==F&&T!==X&&T!==z&&T!==j&&T!==p&&T!==m&&T!==x&&T!==h&&T!==at&&T!==w&&T!==B&&T!==y&&T!==u&&T!==d&&T!==E&&T!==N}f(vt,"isPlainSafeFirst");function lt(T){return!nt(T)&&T!==S}f(lt,"isPlainSafeLast");function gt(T,q){const et=T.charCodeAt(q);let K;return et>=55296&&et<=56319&&q+1<T.length&&(K=T.charCodeAt(q+1),K>=56320&&K<=57343)?(et-55296)*1024+K-56320+65536:et}f(gt,"codePointAt");function Et(T){return/^\n* /.test(T)}f(Et,"needIndentIndicator");const Rt=1,Ut=2,D=3,Ft=4,Wt=5;function we(T,q,et,K,J,it,tt,mt){let ct,kt=0,Bt=null,Nt=!1,Vt=!1;const Yi=K!==-1;let wr=-1,Ze=vt(gt(T,0))&<(gt(T,T.length-1));if(q||tt)for(ct=0;ct<T.length;kt>=65536?ct+=2:ct++){if(kt=gt(T,ct),!At(kt))return Wt;Ze=Ze&&qt(kt,Bt,mt),Bt=kt}else{for(ct=0;ct<T.length;kt>=65536?ct+=2:ct++){if(kt=gt(T,ct),kt===n)Nt=!0,Yi&&(Vt=Vt||ct-wr-1>K&&T[wr+1]!==" ",wr=ct);else if(!At(kt))return Wt;Ze=Ze&&qt(kt,Bt,mt),Bt=kt}Vt=Vt||Yi&&ct-wr-1>K&&T[wr+1]!==" "}return!Nt&&!Vt?Ze&&!tt&&!J(T)?Rt:it===Z?Wt:Ut:et>9&&Et(T)?Wt:tt?it===Z?Wt:Ut:Vt?Ft:D}f(we,"chooseScalarStyle");function fe(T,q,et,K,J){T.dump=(function(){if(q.length===0)return T.quotingType===Z?'""':"''";if(!T.noCompatMode&&(O.indexOf(q)!==-1||v.test(q)))return T.quotingType===Z?'"'+q+'"':"'"+q+"'";const it=T.indent*Math.max(1,et),tt=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-it),mt=K||T.flowLevel>-1&&et>=T.flowLevel;function ct(kt){return Tt(T,kt)}switch(f(ct,"testAmbiguity"),we(q,mt,T.indent,tt,ct,T.quotingType,T.forceQuotes&&!K,J)){case Rt:return q;case Ut:return"'"+q.replace(/'/g,"''")+"'";case D:return"|"+Re(q,T.indent)+cr(pt(q,it));case Ft:return">"+Re(q,T.indent)+cr(pt(_e(q,tt),it));case Wt:return'"'+ur(q)+'"';default:throw new t("impossible error: invalid scalar style")}})()}f(fe,"writeScalar");function Re(T,q){const et=Et(T)?String(q):"",K=T[T.length-1]===`
|
|
290
|
+
`,it=K&&(T[T.length-2]===`
|
|
291
|
+
`||T===`
|
|
292
|
+
`)?"+":K?"":"-";return et+it+`
|
|
293
|
+
`}f(Re,"blockHeader");function cr(T){return T[T.length-1]===`
|
|
294
|
+
`?T.slice(0,-1):T}f(cr,"dropEndingNewline");function _e(T,q){const et=/(\n+)([^\n]*)/g;let K=(function(){let mt=T.indexOf(`
|
|
295
|
+
`);return mt=mt!==-1?mt:T.length,et.lastIndex=mt,Be(T.slice(0,mt),q)})(),J=T[0]===`
|
|
296
|
+
`||T[0]===" ",it,tt;for(;tt=et.exec(T);){const mt=tt[1],ct=tt[2];it=ct[0]===" ",K+=mt+(!J&&!it&&ct!==""?`
|
|
297
|
+
`:"")+Be(ct,q),J=it}return K}f(_e,"foldString");function Be(T,q){if(T===""||T[0]===" ")return T;const et=/ [^ ]/g;let K,J=0,it,tt=0,mt=0,ct="";for(;K=et.exec(T);)mt=K.index,mt-J>q&&(it=tt>J?tt:mt,ct+=`
|
|
298
|
+
`+T.slice(J,it),J=it+1),tt=mt;return ct+=`
|
|
299
|
+
`,T.length-J>q&&tt>J?ct+=T.slice(J,tt)+`
|
|
300
|
+
`+T.slice(tt+1):ct+=T.slice(J),ct.slice(1)}f(Be,"foldLine");function ur(T){let q="",et=0;for(let K=0;K<T.length;et>=65536?K+=2:K++){et=gt(T,K);const J=A[et];!J&&At(et)?(q+=T[K],et>=65536&&(q+=T[K+1])):q+=J||P(et)}return q}f(ur,"escapeString");function dr(T,q,et){let K="";const J=T.tag;for(let it=0,tt=et.length;it<tt;it+=1){let mt=et[it];T.replacer&&(mt=T.replacer.call(et,String(it),mt)),(V(T,q,mt,!1,!1)||typeof mt>"u"&&V(T,q,null,!1,!1))&&(K!==""&&(K+=","+(T.condenseFlow?"":" ")),K+=T.dump)}T.tag=J,T.dump="["+K+"]"}f(dr,"writeFlowSequence");function pr(T,q,et,K){let J="";const it=T.tag;for(let tt=0,mt=et.length;tt<mt;tt+=1){let ct=et[tt];T.replacer&&(ct=T.replacer.call(et,String(tt),ct)),(V(T,q+1,ct,!0,!0,!1,!0)||typeof ct>"u"&&V(T,q+1,null,!0,!0,!1,!0))&&((!K||J!=="")&&(J+=bt(T,q)),T.dump&&n===T.dump.charCodeAt(0)?J+="-":J+="- ",J+=T.dump)}T.tag=it,T.dump=J||"[]"}f(pr,"writeBlockSequence");function ve(T,q,et){let K="";const J=T.tag,it=Object.keys(et);for(let tt=0,mt=it.length;tt<mt;tt+=1){let ct="";K!==""&&(ct+=", "),T.condenseFlow&&(ct+='"');const kt=it[tt];let Bt=et[kt];T.replacer&&(Bt=T.replacer.call(et,kt,Bt)),V(T,q,kt,!1,!1)&&(T.dump.length>1024&&(ct+="? "),ct+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),V(T,q,Bt,!1,!1)&&(ct+=T.dump,K+=ct))}T.tag=J,T.dump="{"+K+"}"}f(ve,"writeFlowMapping");function g(T,q,et,K){let J="";const it=T.tag,tt=Object.keys(et);if(T.sortKeys===!0)tt.sort();else if(typeof T.sortKeys=="function")tt.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let mt=0,ct=tt.length;mt<ct;mt+=1){let kt="";(!K||J!=="")&&(kt+=bt(T,q));const Bt=tt[mt];let Nt=et[Bt];if(T.replacer&&(Nt=T.replacer.call(et,Bt,Nt)),!V(T,q+1,Bt,!0,!0,!0))continue;const Vt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Vt&&(T.dump&&n===T.dump.charCodeAt(0)?kt+="?":kt+="? "),kt+=T.dump,Vt&&(kt+=bt(T,q)),V(T,q+1,Nt,!0,Vt)&&(T.dump&&n===T.dump.charCodeAt(0)?kt+=":":kt+=": ",kt+=T.dump,J+=kt)}T.tag=it,T.dump=J||"{}"}f(g,"writeBlockMapping");function $(T,q,et){const K=et?T.explicitTypes:T.implicitTypes;for(let J=0,it=K.length;J<it;J+=1){const tt=K[J];if((tt.instanceOf||tt.predicate)&&(!tt.instanceOf||typeof q=="object"&&q instanceof tt.instanceOf)&&(!tt.predicate||tt.predicate(q))){if(et?tt.multi&&tt.representName?T.tag=tt.representName(q):T.tag=tt.tag:T.tag="?",tt.represent){const mt=T.styleMap[tt.tag]||tt.defaultStyle;let ct;if(i.call(tt.represent)==="[object Function]")ct=tt.represent(q,mt);else if(s.call(tt.represent,mt))ct=tt.represent[mt](q,mt);else throw new t("!<"+tt.tag+'> tag resolver accepts not "'+mt+'" style');T.dump=ct}return!0}}return!1}f($,"detectType");function V(T,q,et,K,J,it,tt){T.tag=null,T.dump=et,$(T,et,!1)||$(T,et,!0);const mt=i.call(T.dump),ct=K;K&&(K=T.flowLevel<0||T.flowLevel>q);const kt=mt==="[object Object]"||mt==="[object Array]";let Bt,Nt;if(kt&&(Bt=T.duplicates.indexOf(et),Nt=Bt!==-1),(T.tag!==null&&T.tag!=="?"||Nt||T.indent!==2&&q>0)&&(J=!1),Nt&&T.usedDuplicates[Bt])T.dump="*ref_"+Bt;else{if(kt&&Nt&&!T.usedDuplicates[Bt]&&(T.usedDuplicates[Bt]=!0),mt==="[object Object]")K&&Object.keys(T.dump).length!==0?(g(T,q,T.dump,J),Nt&&(T.dump="&ref_"+Bt+T.dump)):(ve(T,q,T.dump),Nt&&(T.dump="&ref_"+Bt+" "+T.dump));else if(mt==="[object Array]")K&&T.dump.length!==0?(T.noArrayIndent&&!tt&&q>0?pr(T,q-1,T.dump,J):pr(T,q,T.dump,J),Nt&&(T.dump="&ref_"+Bt+T.dump)):(dr(T,q,T.dump),Nt&&(T.dump="&ref_"+Bt+" "+T.dump));else if(mt==="[object String]")T.tag!=="?"&&fe(T,T.dump,q,it,ct);else{if(mt==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+mt)}if(T.tag!==null&&T.tag!=="?"){let Vt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Vt="!"+Vt:Vt.slice(0,18)==="tag:yaml.org,2002:"?Vt="!!"+Vt.slice(18):Vt="!<"+Vt+">",T.dump=Vt+" "+T.dump}}return!0}f(V,"writeNode");function Q(T,q){const et=[],K=[];G(T,et,K);const J=K.length;for(let it=0;it<J;it+=1)q.duplicates.push(et[K[it]]);q.usedDuplicates=new Array(J)}f(Q,"getDuplicateReferences");function G(T,q,et){if(T!==null&&typeof T=="object"){const K=q.indexOf(T);if(K!==-1)et.indexOf(K)===-1&&et.push(K);else if(q.push(T),Array.isArray(T))for(let J=0,it=T.length;J<it;J+=1)G(T[J],q,et);else{const J=Object.keys(T);for(let it=0,tt=J.length;it<tt;it+=1)G(T[J[it]],q,et)}}}f(G,"inspectNode");function st(T,q){q=q||{};const et=new ut(q);et.noRefs||Q(T,et);let K=T;return et.replacer&&(K=et.replacer.call({"":K},"",K)),V(et,0,K,!0,!0)?et.dump+`
|
|
301
|
+
`:""}return f(st,"dump2"),Qo.dump=st,Qo}f(rm,"requireDumper");var qu;function im(){if(qu)return ge;qu=1;const e=em(),t=rm();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return f(r,"renamed"),ge.Type=ke(),ge.Schema=Pl(),ge.FAILSAFE_SCHEMA=Nl(),ge.JSON_SCHEMA=Yl(),ge.CORE_SCHEMA=Ul(),ge.DEFAULT_SCHEMA=Xa(),ge.load=e.load,ge.loadAll=e.loadAll,ge.dump=t.dump,ge.YAMLException=Hi(),ge.types={binary:Vl(),float:jl(),map:ql(),null:zl(),pairs:Kl(),set:Ql(),timestamp:Gl(),bool:Wl(),int:Hl(),merge:Xl(),omap:Zl(),seq:Rl(),str:Il()},ge.safeLoad=r("safeLoad","load"),ge.safeLoadAll=r("safeLoadAll","loadAll"),ge.safeDump=r("safeDump","dump"),ge}f(im,"requireJsYaml");var Ow=im(),$w=Jg(Ow),{Type:NL,Schema:zL,FAILSAFE_SCHEMA:WL,JSON_SCHEMA:Dw,CORE_SCHEMA:HL,DEFAULT_SCHEMA:jL,load:Pw,loadAll:YL,dump:UL,YAMLException:GL,types:XL,safeLoad:VL,safeLoadAll:ZL,safeDump:KL}=$w,Iw={common:Ls,getConfig:te,insertCluster:lg,insertEdge:ug,insertEdgeLabel:Sl,insertMarkers:fg,insertNode:Tl,interpolateToCurve:Jn,labelHelper:St,log:W,positionEdgeLabel:u1},ws={},sm=f(e=>{for(const t of e)ws[t.name]=t},"registerLayoutLoaders"),Rw=f(()=>{sm([{name:"dagre",loader:f(async()=>await It(()=>import("./explorer-dagre-GXQ25YYZ.js"),__vite__mapDeps([3,4,1,2]),import.meta.url),"loader")},{name:"swimlane",loader:f(async()=>await It(()=>import("./explorer-swimlanes-42K2YHIH.js"),__vite__mapDeps([5,1,2]),import.meta.url),"loader")},{name:"cose-bilkent",loader:f(async()=>await It(()=>import("./explorer-cose-bilkent-JH36ORCC.js"),__vite__mapDeps([6,7,1,2]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Rw();var QL=f(async(e,t)=>{if(!(e.layoutAlgorithm in ws))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=ws[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Iw,{algorithm:r.algorithm})},"render"),JL=f((e="",{fallback:t="dagre"}={})=>{if(e in ws)return e;if(t in ws)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Jl="comm",am="rule",om="decl",qw="@media",Nw="@import",zw="@supports",Ww="@namespace",An="@keyframes",nm="@layer",Hw="@scope",jw=Math.abs,Cs=String.fromCharCode;function lm(e){return e.trim()}function Mn(e,t,r){return e.replace(t,r)}function Ci(e,t){return e.charCodeAt(t)|0}function Ii(e,t,r){return e.slice(t,r)}function er(e){return e.length}function hm(e){return e.length}function Ks(e,t){return t.push(e),e}var Va=1,Ri=1,cm=0,We=0,ae=0,ji="";function th(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Va,column:Ri,length:o,return:"",siblings:n}}function Yw(){return ae}function Uw(){return ae=We>0?Ci(ji,--We):0,Ri--,ae===10&&(Ri=1,Va--),ae}function Ge(){return ae=We<cm?Ci(ji,We++):0,Ri++,ae===10&&(Ri=1,Va++),ae}function Er(){return Ci(ji,We)}function na(){return We}function Za(e,t){return Ii(ji,e,t)}function _s(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Gw(e){return Va=Ri=1,cm=er(ji=e),We=0,[]}function Xw(e){return ji="",e}function Jo(e){return lm(Za(We-1,On(e===91?e+2:e===40?e+1:e)))}function Vw(e){for(;(ae=Er())&&ae<33;)Ge();return _s(e)>2||_s(ae)>3?"":" "}function Zw(e,t){for(;--t&&Ge()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return Za(e,na()+(t<6&&Er()==32&&Ge()==32))}function On(e){for(;Ge();)switch(ae){case e:return We;case 34:case 39:e!==34&&e!==39&&On(ae);break;case 40:e===41&&On(e);break;case 92:Ge();break}return We}function Kw(e,t){for(;Ge()&&e+ae!==57;)if(e+ae===84&&Er()===47)break;return"/*"+Za(t,We-1)+"*"+Cs(e===47?e:Ge())}function Qw(e){for(;!_s(Er());)Ge();return Za(e,We)}function Jw(e){return Xw(la("",null,null,null,[""],e=Gw(e),0,[0],e))}function la(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,p=0,d=0,m=0,y=1,x=1,C=1,k=0,S=0,w="",B=s,L=a,E=i,F=w;x;)switch(m=S,S=Ge()){case 40:m!=108&&Ci(F,u-1)==58?(k++,F+="("):F+=Jo(S);break;case 41:k--,F+=")";break;case 34:case 39:case 91:F+=Jo(S);break;case 9:case 10:case 13:case 32:if(k>0){F+=Cs(S);break}F+=Vw(m);break;case 92:F+=Zw(na()-1,7);continue;case 47:switch(Er()){case 42:case 47:Ks(t_(Kw(Ge(),na()),t,r,l),l),(_s(m||1)==5||_s(Er()||1)==5)&&er(F)&&Ii(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:n[c++]=er(F)*C;case 125*y:case 59:case 0:if(k>0&&S){F+=Cs(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(F=Mn(F,/\f/g,"")),d>0&&(er(F)-u||y===0)&&Ks(d>32?zu(F+";",i,r,u-1,l):zu(Mn(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(Ks(E=Nu(F,t,r,c,h,s,n,w,B=[],L=[],u,a),a),S===123)if(h===0)la(F,t,E,E,B,a,u,n,L);else{switch(p){case 99:if(Ci(F,3)===110)break;case 108:if(Ci(F,2)===97)break;default:h=0;case 100:case 109:case 115:}h?la(e,E,E,i&&Ks(Nu(e,E,E,0,0,s,n,w,s,B=[],u,L),L),s,L,u,n,i?B:L):la(F,E,E,E,[""],L,0,n,L)}}c=h=d=0,y=C=1,w=F="",u=o;break;case 58:u=1+er(F),d=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&Uw()==125)continue}switch(F+=Cs(S),S*y){case 38:C=h>0?1:(F+="\f",-1);break;case 44:if(k>0)break;n[c++]=(er(F)-1)*C,C=1;break;case 64:Er()===45&&(F+=Jo(Ge())),p=Er(),h=u=er(w=F+=Qw(na())),S++;break;case 45:m===45&&er(F)==2&&(y=0)}}return a}function Nu(e,t,r,i,s,a,o,n,l,c,h,u){for(var p=s-1,d=s===0?a:[""],m=hm(d),y=0,x=0,C=0;y<i;++y)for(var k=0,S=Ii(e,p+1,p=jw(x=o[y])),w=e;k<m;++k)(w=lm(x>0?d[k]+" "+S:Mn(S,/&\f/g,d[k])))&&(l[C++]=w);return th(e,t,r,s===0?am:n,l,c,h,u)}function t_(e,t,r,i){return th(e,t,r,Jl,Cs(Yw()),Ii(e,2,-2),0,i)}function zu(e,t,r,i,s){return th(e,t,r,om,Ii(e,0,i),Ii(e,i+1,-1),i,s)}function $n(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function e_(e,t,r,i){switch(e.type){case nm:if(e.children.length)break;case Nw:case Ww:case om:return e.return=e.return||e.value;case Jl:return"";case An:return e.return=e.value+"{"+$n(e.children,i)+"}";case am:if(!er(e.value=e.props.join(",")))return""}return er(r=$n(e.children,i))?e.return=e.value+"{"+r+"}":""}function r_(e){var t=hm(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var um="c4",i_=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),s_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-c4Diagram-7LVT6UL2.js");return{diagram:t}},__vite__mapDeps([8,9,1,2]),import.meta.url);return{id:um,diagram:e}},"loader"),a_={id:um,detector:i_,loader:s_},o_=a_,dm="flowchart",n_=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),l_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-HODETNUW.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,1,2,13,9,14]),import.meta.url);return{id:dm,diagram:e}},"loader"),h_={id:dm,detector:n_,loader:l_},c_=h_,pm="flowchart-v2",u_=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),d_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-HODETNUW.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,1,2,13,9,14]),import.meta.url);return{id:pm,diagram:e}},"loader"),p_={id:pm,detector:u_,loader:d_},f_=p_,fm="swimlane",g_=f(e=>/^\s*swimlane-beta\b/.test(e),"detector"),m_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-swimlanesDiagram-VR7AAH4N.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,1,2,13,9,14]),import.meta.url);return{id:fm,diagram:e}},"loader"),y_={id:fm,detector:g_,loader:m_},C_=y_,gm="er",x_=f(e=>/^\s*erDiagram/.test(e),"detector"),b_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-erDiagram-RLTQ6QDP.js");return{diagram:t}},__vite__mapDeps([16,12,1,2,13,14]),import.meta.url);return{id:gm,diagram:e}},"loader"),k_={id:gm,detector:x_,loader:b_},T_=k_,mm="gitGraph",S_=f(e=>/^\s*gitGraph/.test(e),"detector"),w_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-gitGraphDiagram-WWUBYQGX.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,1,2]),import.meta.url);return{id:mm,diagram:e}},"loader"),__={id:mm,detector:S_,loader:w_},B_=__,ym="gantt",v_=f(e=>/^\s*gantt/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-ganttDiagram-EL5Y4UJY.js");return{diagram:t}},__vite__mapDeps([21,1,2,22,23]),import.meta.url);return{id:ym,diagram:e}},"loader"),F_={id:ym,detector:v_,loader:L_},E_=F_,Cm="info",A_=f(e=>/^\s*info/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-infoDiagram-27XIBGKW.js");return{diagram:t}},__vite__mapDeps([24,20,1,2]),import.meta.url);return{id:Cm,diagram:e}},"loader"),O_={id:Cm,detector:A_,loader:M_},xm="pie",$_=f(e=>/^\s*pie/.test(e),"detector"),D_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-pieDiagram-E7YTZNPT.js");return{diagram:t}},__vite__mapDeps([25,19,20,1,2]),import.meta.url);return{id:xm,diagram:e}},"loader"),P_={id:xm,detector:$_,loader:D_},bm="quadrantChart",I_=f(e=>/^\s*quadrantChart/.test(e),"detector"),R_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-quadrantDiagram-AXDQQJYC.js");return{diagram:t}},__vite__mapDeps([26,1,2,22,23]),import.meta.url);return{id:bm,diagram:e}},"loader"),q_={id:bm,detector:I_,loader:R_},N_=q_,km="xychart",z_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),W_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-xychartDiagram-S5SC5T6Z.js");return{diagram:t}},__vite__mapDeps([27,1,2,22,23]),import.meta.url);return{id:km,diagram:e}},"loader"),H_={id:km,detector:z_,loader:W_},j_=H_,Tm="requirement",Y_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),U_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-requirementDiagram-BXWQKSXE.js");return{diagram:t}},__vite__mapDeps([28,12,1,2,13]),import.meta.url);return{id:Tm,diagram:e}},"loader"),G_={id:Tm,detector:Y_,loader:U_},X_=G_,Sm="sequence",V_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-sequenceDiagram-WJ2MYXX4.js");return{diagram:t}},__vite__mapDeps([29,18,9,1,2]),import.meta.url);return{id:Sm,diagram:e}},"loader"),K_={id:Sm,detector:V_,loader:Z_},Q_=K_,wm="class",J_=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),tB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-classDiagram-ZZMXUADV.js");return{diagram:t}},__vite__mapDeps([30,31,11,12,1,2,13,9]),import.meta.url);return{id:wm,diagram:e}},"loader"),eB={id:wm,detector:J_,loader:tB},rB=eB,_m="classDiagram",iB=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),sB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-classDiagram-v2-VYDZK3BY.js");return{diagram:t}},__vite__mapDeps([32,31,11,12,1,2,13,9]),import.meta.url);return{id:_m,diagram:e}},"loader"),aB={id:_m,detector:iB,loader:sB},oB=aB,Bm="state",nB=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),lB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-D77RDMKH.js");return{diagram:t}},__vite__mapDeps([33,34,12,1,2,13,9,4]),import.meta.url);return{id:Bm,diagram:e}},"loader"),hB={id:Bm,detector:nB,loader:lB},cB=hB,vm="stateDiagram",uB=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),dB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-v2-MP3YSRHH.js");return{diagram:t}},__vite__mapDeps([35,34,12,1,2,13,9]),import.meta.url);return{id:vm,diagram:e}},"loader"),pB={id:vm,detector:uB,loader:dB},fB=pB,Lm="journey",gB=f(e=>/^\s*journey/.test(e),"detector"),mB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-journeyDiagram-3NMN7TZE.js");return{diagram:t}},__vite__mapDeps([36,11,9,1,2]),import.meta.url);return{id:Lm,diagram:e}},"loader"),yB={id:Lm,detector:gB,loader:mB},CB=yB,xB=f((e,t,r)=>{W.debug(`rendering svg for syntax error
|
|
302
|
+
`);const i=N0(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Dd(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),Fm={draw:xB},bB=Fm,kB={db:{},renderer:Fm,parser:{parse:f(()=>{},"parse")}},TB=kB,Em="flowchart-elk",SB=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),wB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-HODETNUW.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,1,2,13,9,14]),import.meta.url);return{id:Em,diagram:e}},"loader"),_B={id:Em,detector:SB,loader:wB},BB=_B,Am="timeline",vB=f(e=>/^\s*timeline/.test(e),"detector"),LB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-timeline-definition-24CTP7MA.js");return{diagram:t}},__vite__mapDeps([37,1,2]),import.meta.url);return{id:Am,diagram:e}},"loader"),FB={id:Am,detector:vB,loader:LB},EB=FB,Mm="mindmap",AB=f(e=>/^\s*mindmap/.test(e),"detector"),MB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-mindmap-definition-YA3MSWOX.js");return{diagram:t}},__vite__mapDeps([38,12,1,2,13]),import.meta.url);return{id:Mm,diagram:e}},"loader"),OB={id:Mm,detector:AB,loader:MB},$B=OB,Om="kanban",DB=f(e=>/^\s*kanban/.test(e),"detector"),PB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-kanban-definition-UXKFOSKX.js");return{diagram:t}},__vite__mapDeps([39,11,1,2]),import.meta.url);return{id:Om,diagram:e}},"loader"),IB={id:Om,detector:DB,loader:PB},RB=IB,$m="sankey",qB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),NB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-sankeyDiagram-P5KCCOFB.js");return{diagram:t}},__vite__mapDeps([40,1,2]),import.meta.url);return{id:$m,diagram:e}},"loader"),zB={id:$m,detector:qB,loader:NB},WB=zB,Dm="packet",HB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),jB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-Z3DM3KII.js");return{diagram:t}},__vite__mapDeps([41,19,20,1,2]),import.meta.url);return{id:Dm,diagram:e}},"loader"),YB={id:Dm,detector:HB,loader:jB},Pm="radar",UB=f(e=>/^\s*radar-beta/.test(e),"detector"),GB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-UQ7AKVKN.js");return{diagram:t}},__vite__mapDeps([42,19,20,1,2]),import.meta.url);return{id:Pm,diagram:e}},"loader"),XB={id:Pm,detector:UB,loader:GB},Im="block",VB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),ZB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-blockDiagram-I7D4REHJ.js");return{diagram:t}},__vite__mapDeps([43,11,1,2,14]),import.meta.url);return{id:Im,diagram:e}},"loader"),KB={id:Im,detector:VB,loader:ZB},QB=KB,Rm="treeView",JB=f(e=>/^\s*treeView-beta/.test(e),"detector"),tv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-S7CK7UJ4.js");return{diagram:t}},__vite__mapDeps([44,18,19,20,1,2]),import.meta.url);return{id:Rm,diagram:e}},"loader"),ev={id:Rm,detector:JB,loader:tv},rv=ev,qm="architecture",iv=f(e=>/^\s*architecture/.test(e),"detector"),sv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-architectureDiagram-5GKGNRK7.js");return{diagram:t}},__vite__mapDeps([45,19,20,1,2,7]),import.meta.url);return{id:qm,diagram:e}},"loader"),av={id:qm,detector:iv,loader:sv},ov=av,Nm="eventmodeling",nv=f(e=>/^\s*eventmodeling/.test(e),"detector"),lv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-VSXAHHWV.js");return{diagram:t}},__vite__mapDeps([46,19,20,1,2]),import.meta.url);return{id:Nm,diagram:e}},"loader"),hv={id:Nm,detector:nv,loader:lv},cv=hv,zm="ishikawa",uv=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-ishikawaDiagram-5VMMS53U.js");return{diagram:t}},__vite__mapDeps([47,1,2]),import.meta.url);return{id:zm,diagram:e}},"loader"),pv={id:zm,detector:uv,loader:dv},Wm="venn",fv=f(e=>/^\s*venn-beta/.test(e),"detector"),gv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-vennDiagram-4TSXK5OY.js");return{diagram:t}},__vite__mapDeps([48,1,2]),import.meta.url);return{id:Wm,diagram:e}},"loader"),mv={id:Wm,detector:fv,loader:gv},yv=mv,Hm="treemap",Cv=f(e=>/^\s*treemap/.test(e),"detector"),xv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-VX7I27RA.js");return{diagram:t}},__vite__mapDeps([49,19,13,20,1,2,23]),import.meta.url);return{id:Hm,diagram:e}},"loader"),bv={id:Hm,detector:Cv,loader:xv},jm="wardley",kv=f(e=>/^\s*wardley-beta/i.test(e),"detector"),Tv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-wardleyDiagram-VM6X3IG4.js");return{diagram:t}},__vite__mapDeps([50,19,20,1,2]),import.meta.url);return{id:jm,diagram:e}},"loader"),Sv={id:jm,detector:kv,loader:Tv},wv=Sv,Ym="cynefin",_v=f(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Bv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-cynefinDiagram-5FMLGOSQ.js");return{diagram:t}},__vite__mapDeps([51,19,20,1,2]),import.meta.url);return{id:Ym,diagram:e}},"loader"),vv={id:Ym,detector:_v,loader:Bv},Um="railroad",Lv=f(e=>/^\s*railroad-beta/i.test(e),"detector"),Fv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-railroadDiagram-O6MQD6OU.js");return{diagram:t}},__vite__mapDeps([52,53,19,1,2,20]),import.meta.url);return{id:Um,diagram:e}},"loader"),Ev={id:Um,detector:Lv,loader:Fv},Gm="railroadEbnf",Av=f(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Mv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-ebnfDiagram-PWID7BFC.js");return{diagram:t}},__vite__mapDeps([54,53,19,1,2,20]),import.meta.url);return{id:Gm,diagram:e}},"loader"),Ov={id:Gm,detector:Av,loader:Mv},Xm="railroadAbnf",$v=f(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Dv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-abnfDiagram-VCTEODGH.js");return{diagram:t}},__vite__mapDeps([55,53,19,1,2,20]),import.meta.url);return{id:Xm,diagram:e}},"loader"),Pv={id:Xm,detector:$v,loader:Dv},Vm="railroadPeg",Iv=f(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Rv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-pegDiagram-XKGWAZYB.js");return{diagram:t}},__vite__mapDeps([56,53,19,1,2,20]),import.meta.url);return{id:Vm,diagram:e}},"loader"),qv={id:Vm,detector:Iv,loader:Rv},Wu=!1,Ka=f(()=>{Wu||(Wu=!0,ma("error",TB,e=>e.toLowerCase().trim()==="error"),ma("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),on(BB,$B,ov),on(o_,RB,oB,rB,T_,E_,O_,P_,X_,Q_,C_,f_,c_,EB,B_,fB,cB,CB,N_,WB,YB,j_,QB,cv,rv,XB,pv,bv,Ev,Ov,Pv,qv,yv,wv,vv))},"addDiagrams"),Nv=f(async()=>{W.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Gr).map(async([r,{detector:i,loader:s}])=>{if(s)try{cn(r)}catch{try{const{diagram:a,id:o}=await s();ma(o,a,i)}catch(a){throw W.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Gr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){W.error(`Failed to load ${t.length} external diagrams`);for(const r of t)W.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),zv="graphics-document document";function Zm(e,t){e.attr("role",zv),t!==""&&e.attr("aria-roledescription",t)}f(Zm,"setA11yDiagramInfo");function Km(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(Km,"addSVGa11yTitleDescription");var Yr,Dn=(Yr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=te(),s=Hn(t,i);t=lb(t)+`
|
|
303
|
+
`;try{cn(s)}catch{const u=c0(s);if(!u)throw new Fd(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();ma(p,d)}const{db:a,parser:o,renderer:n,init:l}=cn(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new Yr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(Yr,"Diagram"),Yr),Hu=[],Wv=f(()=>{Hu.forEach(e=>{e()}),Hu=[]},"attachFunctions"),Hv=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Qm(e){const t=e.match(Ld);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
304
|
+
`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
|
|
305
|
+
`):t[2];let s=Pw(i,{schema:Dw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}f(Qm,"extractFrontMatter");var jv=f(e=>e.replace(/\r\n?/g,`
|
|
306
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Yv=f(e=>{const{text:t,metadata:r}=Qm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),Uv=f(e=>{const t=xe.detectInit(e)??{},r=xe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Vx(e),directive:t}},"processDirectives");function eh(e){const t=jv(e),r=Yv(t),i=Uv(r.text),s=sl(r.config,i.directive);return e=Hv(i.text),{code:e,title:r.title,config:s}}f(eh,"preprocessDiagram");function Jm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Jm,"toBase64");var Gv=5e4,Xv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Vv="sandbox",Zv="loose",Kv="http://www.w3.org/2000/svg",Qv="http://www.w3.org/1999/xlink",Jv="http://www.w3.org/1999/xhtml",tL="100%",eL="100%",rL="border:0;margin:0;",iL="margin:0",sL="allow-top-navigation-by-user-activation allow-popups",aL='The "iframe" tag is not supported by your browser.',oL=["foreignobject"],nL=["dominant-baseline"];function rh(e){const t=eh(e);return fa(),o0(t.config??{}),t}f(rh,"processAndSetConfigs");async function ty(e,t){Ka();try{const{code:r,config:i}=rh(e);return{diagramType:(await ry(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(ty,"parse");var ju=f((e,t,r=[])=>{const i=Sd(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),lL=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=be(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Jh(l.styles)||n.forEach(c=>{r.insertRule(ju(l.id,c,l.styles),r.cssRules.length)}),Jh(l.textStyles)||r.insertRule(ju(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=hn(s)+`
|
|
304
307
|
`}else i+=`${e.themeCSS}
|
|
305
|
-
`;return i+
|
|
306
|
-
${
|
|
307
|
-
</iframe>`},"putIntoIFrame"),
|
|
308
|
+
`;return i+hn(r)},"createCssStyles"),hL=f((e,t)=>$n(Jw(`${e}{${t}}`),r_([f(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===An)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[qw,zw,nm,Hw,"@container","@starting-style"],An].includes(i.type)||(W.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Jl))},"addNamespace"),e_])),"compileCSS"),cL=f((e,t,r,i)=>{const s=lL(e,r),a=L0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return hL(i,a)},"createUserStyles"),uL=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Or(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),dL=f((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":eL,i=Jm(`<body style="${iL}">${e}</body>`);return`<iframe style="width:${tL};height:${r};${rL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${sL}">
|
|
309
|
+
${aL}
|
|
310
|
+
</iframe>`},"putIntoIFrame"),Yu=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Kv);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function Pn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(Pn,"sandboxedIframe");var pL=f((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),fL=f(async function(e,t,r){var j,A,O,v,R,P;Ka();const i=rh(t);t=i.code;const s=te();W.debug(s),t.length>((s==null?void 0:s.maxTextSize)??Gv)&&(t=Xv);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=f(()=>{const Z=Pt(p?n:c).node();Z&&"remove"in Z&&Z.remove()},"removeTempElements");let u=Pt(document.body);const p=s.securityLevel===Vv,d=s.securityLevel===Zv,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const H=Pn(Pt(r),o);u=Pt(H.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Pt(r);Yu(u,e,l,`font-family: ${m}`,Qv)}else{if(pL(document,e,l,o),p){const H=Pn(Pt(document.body),o);u=Pt(H.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Pt("body");Yu(u,e,l)}let y,x;try{y=await Dn.fromText(t,{title:i.title})}catch(H){if(s.suppressErrorRendering)throw h(),H;y=await Dn.fromText("error"),x=H}const C=u.select(c).node(),k=y.type,S=C.firstChild,w=S.firstChild,B=(A=(j=y.renderer).getClasses)==null?void 0:A.call(j,t,y),L=cL(s,k,B,a),E=document.createElement("style");E.innerHTML=L,S.insertBefore(E,w);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(H){throw s.suppressErrorRendering?h():bB.draw(t,e,"11.17.2"),H}const F=u.select(`${c} svg`),X=(v=(O=y.db).getAccTitle)==null?void 0:v.call(O),N=(P=(R=y.db).getAccDescription)==null?void 0:P.call(R);iy(k,F,X,N);const at=f(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Jv);let H=u.select(c).node().innerHTML;if(W.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),H=uL(H,p,lr(s.arrowMarkerAbsolute)),p){const Z=u.select(c+" svg").node();H=dL(H,Z)}else d||(H=$i.sanitize(H,{ADD_TAGS:oL,ADD_ATTR:nL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Wv(),H},"serializeSvg")();if(x)throw x;return h(),{diagramType:k,svg:at,bindFunctions:y.db.bindFunctions}},"render");function ey(e={}){var i;const t=ce({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),s0(t),t!=null&&t.theme&&t.theme in Cr?t.themeVariables=Cr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Cr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?i0(t):wd();Wn(r.logLevel),Ka()}f(ey,"initialize");var ry=f((e,t={})=>{const{code:r}=eh(e);return Dn.fromText(r,t)},"getDiagramFromText");function iy(e,t,r,i){Zm(t,e),Km(t,r,i,t.attr("id"))}f(iy,"addA11yInfo");var Qr=Object.freeze({render:fL,parse:ty,getDiagramFromText:ry,initialize:ey,getConfig:te,setConfig:_d,getSiteConfig:wd,updateSiteConfig:a0,reset:f(()=>{fa()},"reset"),globalReset:f(()=>{fa(Di)},"globalReset"),defaultConfig:Di});Wn(te().logLevel);fa(te());var gL=f((e,t,r)=>{W.warn(e),il(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),sy=f(async function(e={querySelector:".mermaid"}){try{await mL(e)}catch(t){if(il(t)&&W.error(t.str),Ie.parseError&&Ie.parseError(t),!e.suppressErrors)throw W.error("Use the suppressErrors option to suppress these errors"),t}},"run"),mL=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Qr.getConfig();W.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");W.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(W.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Qr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new xe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(W.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=pp(xe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=xe.detectInit(o);h&&W.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:p}=await ly(c,o,l);l.innerHTML=u,e&&await e(c),p&&p(l)}catch(u){gL(u,n,Ie.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),ay=f(function(e){Qr.initialize(e)},"initialize"),yL=f(async function(e,t,r){W.warn("mermaid.init is deprecated. Please use run instead."),e&&ay(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await sy(i)},"init"),CL=f(async(e,{lazyLoad:t=!0}={})=>{Ka(),on(...e),t===!1&&await Nv()},"registerExternalDiagrams"),oy=f(function(){if(Ie.startOnLoad){const{startOnLoad:e}=Qr.getConfig();e&&Ie.run().catch(t=>W.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",oy,!1);var xL=f(function(e){Ie.parseError=e},"setParseErrorHandler"),Fa=[],tn=!1,ny=f(async()=>{if(!tn){for(tn=!0;Fa.length>0;){const e=Fa.shift();if(e)try{await e()}catch(t){W.error("Error executing queue",t)}}tn=!1}},"executeQueue"),bL=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,o)=>{Qr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;W.error("Error parsing",n),(l=Ie.parseError)==null||l.call(Ie,n),o(n),i(n)})}),"performCall");Fa.push(s),ny().catch(i)}),"parse"),ly=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((o,n)=>{Qr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;W.error("Error parsing",l),(c=Ie.parseError)==null||c.call(Ie,l),n(l),s(l)})}),"performCall");Fa.push(a),ny().catch(s)}),"render"),kL=f(()=>Object.keys(Gr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ie={startOnLoad:!0,mermaidAPI:Qr,parse:bL,render:ly,init:yL,run:sy,registerExternalDiagrams:CL,registerLayoutLoaders:sm,initialize:ay,parseError:void 0,contentLoaded:oy,setParseErrorHandler:xL,detectType:Hn,registerIconPacks:ux,getRegisteredDiagramsMetadata:kL},TL=Ie;/*! Check if previously processed *//*!
|
|
308
311
|
* Wait for document loaded before starting the execution
|
|
309
|
-
*/const
|
|
312
|
+
*/const tF=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:Ol,createCommonLayoutRenderer:Yg,default:TL,defaultMeasureLayout:$l,paintLayoutData:Dl},Symbol.toStringTag,{value:"Module"}));export{_0 as $,I0 as A,sl as B,sr as C,Td as D,tb as E,N0 as F,IC as G,FL as H,Pw as I,Dw as J,xs as K,LL as L,Oa as M,y0 as N,$d as O,$i as P,Wh as Q,Ga as R,Ay as S,en as T,Dt as U,Jx as V,Xe as W,Y as X,U as Y,Yx as Z,f as _,A0 as a,xg as a$,Pd as a0,lg as a1,Tl as a2,Dc as a3,Fs as a4,ux as a5,rl as a6,ft as a7,qL as a8,RL as a9,bx as aA,Mx as aB,Ax as aC,Ex as aD,$x as aE,Ox as aF,xx as aG,jd as aH,_x as aI,Sx as aJ,Tx as aK,Yd as aL,fg as aM,Qd as aN,gd as aO,vL as aP,xt as aQ,Id as aR,Ve as aS,cx as aT,EL as aU,jy as aV,wl as aW,_l as aX,jc as aY,bg as aZ,Wa as a_,Yg as aa,Ht as ab,Dg as ac,Ct as ad,IL as ae,La as af,Ig as ag,qa as ah,Sl as ai,ug as aj,u1 as ak,Ce as al,rk as am,Kn as an,Vn as ao,ra as ap,Fx as aq,Lx as ar,vx as as,Bx as at,Cx as au,Wd as av,kx as aw,yx as ax,wx as ay,Hd as az,E0 as b,E2 as b0,kg as b1,gT as b2,eS as b3,b2 as b4,F2 as b5,mT as b6,Zr as b7,zi as b8,kr as b9,vg as bA,ew as bB,QT as bC,qr as bD,cs as bE,pi as bF,Vs as bG,Fo as bH,kw as bI,Vk as bJ,tF as bK,au as ba,ar as bb,yr as bc,uT as bd,Vc as be,va as bf,xr as bg,k2 as bh,Oe as bi,Jc as bj,vl as bk,dw as bl,Ha as bm,Ba as bn,hw as bo,$g as bp,rr as bq,T2 as br,Ml as bs,yg as bt,pw as bu,cw as bv,tw as bw,za as bx,Bg as by,Ua as bz,zt as c,Dd as d,ce as e,br as f,O0 as g,ag as h,ze as i,Ls as j,tp as k,W as l,vs as m,gx as n,$0 as o,D0 as p,F0 as q,AL as r,M0 as s,Ar as t,Ny as u,JL as v,ib as w,QL as x,xe as y,te as z};
|