const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-GD7MH7QM-DGjPZnL0.js","assets/app-t8Vldhgr.js","assets/dagre-GNUAUHNH-DXQ162y-.js","assets/chunk-3YCYZ6SJ-ByBZ6Mce.js","assets/chunk-HN6EAY2L-CnY8HTH7.js","assets/chunk-H3VCZNTA-CxC2d02b.js","assets/cose-bilkent-PNC4W37J-DyN6PpA4.js","assets/chunk-7RZVMHOQ-CtEdmHqa.js","assets/c4Diagram-BBK6TRR6-FZk4-nd8.js","assets/chunk-W2A4CRWB-CEpUqVuh.js","assets/flowDiagram-IIOBCMXN-CYRKx13h.js","assets/chunk-KSICW3F5-Cj3UG-uo.js","assets/chunk-TBF5ZNIQ-Dqy_PWBE.js","assets/chunk-T4EQAHMB-BSu_zLEL.js","assets/erDiagram-L2NYR2MQ--3oSmcc2.js","assets/gitGraphDiagram-FCDOK2W6-DtwLq5NW.js","assets/chunk-AEOMTBSW-DS2XDHi2.js","assets/treemap-KZPCXAKY-RU5UWGQG-Bieyf2w6.js","assets/chunk-TU3PZOEN-CJBJzapT.js","assets/ganttDiagram-CBGYKTO2-V9ASDzMX.js","assets/infoDiagram-JC2SMEGH-olRUjSou.js","assets/pieDiagram-O4VNXU6G-DrxXmGzS.js","assets/quadrantDiagram-DYU4IJOS-Bg6H8a2k.js","assets/xychartDiagram-TMDUDL2A-CsQ9VQk_.js","assets/requirementDiagram-N2XL27SN-D0ML_frX.js","assets/sequenceDiagram-PYXOKC54-CiRRnoB5.js","assets/classDiagram-JG6F6YBT-B47N4DC6.js","assets/chunk-TFLKLN34-BRUeNpWv.js","assets/classDiagram-v2-CFK7UN3Z-B47N4DC6.js","assets/stateDiagram-UFOXNHOX-DF6iuymG.js","assets/chunk-33NP3AWU-fW7s6hbK.js","assets/stateDiagram-v2-C774GKM7-NXQNeIBp.js","assets/journeyDiagram-FZRSWBTQ-DuIFoGQv.js","assets/timeline-definition-GC5UGDFR-BsXHSaaA.js","assets/mindmap-definition-QTQOGDLH-GhXRjx3h.js","assets/kanban-definition-ETIEC4YN-Bx3CknX6.js","assets/sankeyDiagram-HWP7ZNIN-BUY3YMp8.js","assets/diagram-SUXTHJMA-h0U9qop-.js","assets/diagram-G7E7SVAT-Cb6uMcqw.js","assets/blockDiagram-HG7WUIX4-pYMouvi2.js","assets/architectureDiagram-EJXTDGMB-BixUofLv.js","assets/ishikawaDiagram-LCPTV24A-dqzGV9xc.js","assets/vennDiagram-R4MEU4WM-Dvbyfwqt.js","assets/diagram-HOHITQNR-RHmJhdrA.js"])))=>i.map(i=>d[i]); var gv=Object.defineProperty;var yv=(t,e,r)=>e in t?gv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var sl=(t,e,r)=>yv(t,typeof e!="symbol"?e+"":e,r);import{a9 as gt}from"./app-t8Vldhgr.js";var mv=Object.create,xn=Object.defineProperty,xv=Object.getOwnPropertyDescriptor,bv=Object.getOwnPropertyNames,kv=Object.getPrototypeOf,Cv=Object.prototype.hasOwnProperty,l=(t,e)=>xn(t,"name",{value:e,configurable:!0}),yE=(t,e)=>()=>(t&&(e=t(t=0)),e),oc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$v=(t,e)=>{for(var r in e)xn(t,r,{get:e[r],enumerable:!0})},sc=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of bv(e))!Cv.call(t,a)&&a!==r&&xn(t,a,{get:()=>e[a],enumerable:!(i=xv(e,a))||i.enumerable});return t},mE=(t,e,r)=>(sc(t,e,"default"),r),Yp=(t,e,r)=>(r=t!=null?mv(kv(t)):{},sc(xn(r,"default",{value:t,enumerable:!0}),t)),xE=t=>sc(xn({},"__esModule",{value:!0}),t),wv=oc((t,e)=>{(function(r,i){typeof t=="object"&&typeof e<"u"?e.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=i()})(t,(function(){var r=1e3,i=6e4,a=36e5,n="millisecond",s="second",o="minute",c="hour",h="day",u="week",d="month",p="quarter",f="year",g="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:l(function(B){var L=["th","st","nd","rd"],M=B%100;return"["+B+(L[(M-20)%10]||L[M]||L[0])+"]"},"ordinal")},k=l(function(B,L,M){var E=String(B);return!E||E.length>=L?B:""+Array(L+1-E.length).join(M)+B},"m"),_={s:k,z:l(function(B){var L=-B.utcOffset(),M=Math.abs(L),E=Math.floor(M/60),F=M%60;return(L<=0?"+":"-")+k(E,2,"0")+":"+k(F,2,"0")},"z"),m:l(function B(L,M){if(L.date()1)return B(V[0])}else{var G=L.name;$[G]=L,F=G}return!E&&F&&(w=F),F||!E&&w},"t"),I=l(function(B,L){if(O(B))return B.clone();var M=typeof L=="object"?L:{};return M.date=B,M.args=arguments,new D(M)},"O"),S=_;S.l=R,S.i=O,S.w=function(B,L){return I(B,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var D=(function(){function B(M){this.$L=R(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[T]=!0}l(B,"M");var L=B.prototype;return L.parse=function(M){this.$d=(function(E){var F=E.date,z=E.utc;if(F===null)return new Date(NaN);if(S.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var V=F.match(m);if(V){var G=V[2]-1||0,Z=(V[7]||"0").substring(0,3);return z?new Date(Date.UTC(V[1],G,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Z)):new Date(V[1],G,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Z)}}return new Date(F)})(M),this.init()},L.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},L.$utils=function(){return S},L.isValid=function(){return this.$d.toString()!==y},L.isSame=function(M,E){var F=I(M);return this.startOf(E)<=F&&F<=this.endOf(E)},L.isAfter=function(M,E){return I(M){},"trace"),debug:l((...t)=>{},"debug"),info:l((...t)=>{},"info"),warn:l((...t)=>{},"warn"),error:l((...t)=>{},"error"),fatal:l((...t)=>{},"fatal")},lc=l(function(t="fatal"){let e=We.fatal;typeof t=="string"?t.toLowerCase()in We&&(e=We[t]):typeof t=="number"&&(e=t),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},e<=We.fatal&&(P.fatal=console.error?console.error.bind(console,he("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",he("FATAL"))),e<=We.error&&(P.error=console.error?console.error.bind(console,he("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",he("ERROR"))),e<=We.warn&&(P.warn=console.warn?console.warn.bind(console,he("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",he("WARN"))),e<=We.info&&(P.info=console.info?console.info.bind(console,he("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",he("INFO"))),e<=We.debug&&(P.debug=console.debug?console.debug.bind(console,he("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("DEBUG"))),e<=We.trace&&(P.trace=console.debug?console.debug.bind(console,he("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("TRACE")))},"setLogLevel"),he=l(t=>`%c${(0,vv.default)().format("ss.SSS")} : ${t} : `,"format");function _v(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r=a)&&(r=a)}return r}l(_v,"max");function Sv(t,e){let r;if(e===void 0)for(let i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}l(Sv,"min");function La(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}l(La,"ascending");function Vp(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}l(Vp,"descending");function fs(t){let e,r,i;t.length!==2?(e=La,r=l((o,c)=>La(t(o),c),"compare2"),i=l((o,c)=>t(o)-c,"delta")):(e=t===La||t===Vp?t:Gp,r=t,i=t);function a(o,c,h=0,u=o.length){if(h>>1;r(o[d],c)<0?h=d+1:u=d}while(h>>1;r(o[d],c)<=0?h=d+1:u=d}while(hh&&i(o[d-1],c)>-i(o[d],c)?d-1:d}return l(s,"center"),{left:a,center:s,right:n}}l(fs,"bisector");function Gp(){return 0}l(Gp,"zero");function Xp(t){return t===null?NaN:+t}l(Xp,"number");var Zp=fs(La),Tv=Zp.right;Zp.left;fs(Xp).center;var Mv=Tv,ki,Id=(ki=class extends Map{constructor(e,r=Kp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[i,a]of e)this.set(i,a)}get(e){return super.get(Sl(this,e))}has(e){return super.has(Sl(this,e))}set(e,r){return super.set(Qp(this,e),r)}delete(e){return super.delete(Jp(this,e))}},l(ki,"InternMap"),ki);function Sl({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):r}l(Sl,"intern_get");function Qp({_intern:t,_key:e},r){let i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}l(Qp,"intern_set");function Jp({_intern:t,_key:e},r){let i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}l(Jp,"intern_delete");function Kp(t){return t!==null&&typeof t=="object"?t.valueOf():t}l(Kp,"keyof");var Bv=Math.sqrt(50),Av=Math.sqrt(10),Lv=Math.sqrt(2);function Ha(t,e,r){let i=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(i)),n=i/Math.pow(10,a),s=n>=Bv?10:n>=Av?5:n>=Lv?2:1,o,c,h;return a<0?(h=Math.pow(10,-a)/s,o=Math.round(t*h),c=Math.round(e*h),o/he&&--c,h=-h):(h=Math.pow(10,a)*s,o=Math.round(t/h),c=Math.round(e/h),o*he&&--c),c0))return[];if(t===e)return[t];let i=e=a))return[];let o=n-a+1,c=new Array(o);if(i)if(s<0)for(let h=0;h+t(e)}l(of,"number");function sf(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}l(sf,"center");function lf(){return!this.__axis}l(lf,"entering");function hc(t,e){var r=[],i=null,a=null,n=6,s=6,o=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===to||t===jn?-1:1,u=t===jn||t===ll?"x":"y",d=t===to||t===Tl?af:nf;function p(f){var g=i??(e.ticks?e.ticks.apply(e,r):e.domain()),y=a??(e.tickFormat?e.tickFormat.apply(e,r):rf),m=Math.max(n,0)+o,x=e.range(),b=+x[0]+c,k=+x[x.length-1]+c,_=(e.bandwidth?sf:of)(e.copy(),c),w=f.selection?f.selection():f,$=w.selectAll(".domain").data([null]),T=w.selectAll(".tick").data(g,e).order(),O=T.exit(),R=T.enter().append("g").attr("class","tick"),I=T.select("line"),S=T.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(R),I=I.merge(R.append("line").attr("stroke","currentColor").attr(u+"2",h*n)),S=S.merge(R.append("text").attr("fill","currentColor").attr(u,h*m).attr("dy",t===to?"0em":t===Tl?"0.71em":"0.32em")),f!==w&&($=$.transition(f),T=T.transition(f),I=I.transition(f),S=S.transition(f),O=O.transition(f).attr("opacity",Pd).attr("transform",function(D){return isFinite(D=_(D))?d(D+c):this.getAttribute("transform")}),R.attr("opacity",Pd).attr("transform",function(D){var A=this.parentNode.__axis;return d((A&&isFinite(A=A(D))?A:_(D))+c)})),O.remove(),$.attr("d",t===jn||t===ll?s?"M"+h*s+","+b+"H"+c+"V"+k+"H"+h*s:"M"+c+","+b+"V"+k:s?"M"+b+","+h*s+"V"+c+"H"+k+"V"+h*s:"M"+b+","+c+"H"+k),T.attr("opacity",1).attr("transform",function(D){return d(_(D)+c)}),I.attr(u+"2",h*n),S.attr(u,h*m).text(y),w.filter(lf).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ll?"start":t===jn?"end":"middle"),w.each(function(){this.__axis=_})}return l(p,"axis"),p.scale=function(f){return arguments.length?(e=f,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(f){return arguments.length?(r=f==null?[]:Array.from(f),p):r.slice()},p.tickValues=function(f){return arguments.length?(i=f==null?null:Array.from(f),p):i&&i.slice()},p.tickFormat=function(f){return arguments.length?(a=f,p):a},p.tickSize=function(f){return arguments.length?(n=s=+f,p):n},p.tickSizeInner=function(f){return arguments.length?(n=+f,p):n},p.tickSizeOuter=function(f){return arguments.length?(s=+f,p):s},p.tickPadding=function(f){return arguments.length?(o=+f,p):o},p.offset=function(f){return arguments.length?(c=+f,p):c},p}l(hc,"axis");function Fv(t){return hc(to,t)}l(Fv,"axisTop");function Ev(t){return hc(Tl,t)}l(Ev,"axisBottom");function hf(){}l(hf,"none");function gs(t){return t==null?hf:function(){return this.querySelector(t)}}l(gs,"default");function cf(t){typeof t!="function"&&(t=gs(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a=k&&(k=b+1);!(w=m[k])&&++k=0;)(s=i[a])&&(n&&s.compareDocumentPosition(n)^4&&n.parentNode.insertBefore(s,n),n=s);return this}l(Ff,"default");function Ef(t){t||(t=Df);function e(d,p){return d&&p?t(d.__data__,p.__data__):!d-!p}l(e,"compareNode");for(var r=this._groups,i=r.length,a=new Array(i),n=0;ne?1:t>=e?0:NaN}l(Df,"ascending");function Of(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}l(Of,"default");function If(){return Array.from(this)}l(If,"default");function Pf(){for(var t=this._groups,e=0,r=t.length;e=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Rd.hasOwnProperty(e)?{space:Rd[e],local:t}:t}l(bn,"default");function qf(t){return function(){this.removeAttribute(t)}}l(qf,"attrRemove");function Wf(t){return function(){this.removeAttributeNS(t.space,t.local)}}l(Wf,"attrRemoveNS");function jf(t,e){return function(){this.setAttribute(t,e)}}l(jf,"attrConstant");function Hf(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}l(Hf,"attrConstantNS");function Uf(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}l(Uf,"attrFunction");function Yf(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}l(Yf,"attrFunctionNS");function Vf(t,e){var r=bn(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?Wf:qf:typeof e=="function"?r.local?Yf:Uf:r.local?Hf:jf)(r,e))}l(Vf,"default");function fc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}l(fc,"default");function Gf(t){return function(){this.style.removeProperty(t)}}l(Gf,"styleRemove");function Xf(t,e,r){return function(){this.style.setProperty(t,e,r)}}l(Xf,"styleConstant");function Zf(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}l(Zf,"styleFunction");function Qf(t,e,r){return arguments.length>1?this.each((e==null?Gf:typeof e=="function"?Zf:Xf)(t,e,r??"")):Or(this.node(),t)}l(Qf,"default");function Or(t,e){return t.style.getPropertyValue(e)||fc(t).getComputedStyle(t,null).getPropertyValue(e)}l(Or,"styleValue");function Jf(t){return function(){delete this[t]}}l(Jf,"propertyRemove");function Kf(t,e){return function(){this[t]=e}}l(Kf,"propertyConstant");function tg(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}l(tg,"propertyFunction");function eg(t,e){return arguments.length>1?this.each((e==null?Jf:typeof e=="function"?tg:Kf)(t,e)):this.node()[t]}l(eg,"default");function gc(t){return t.trim().split(/^|\s+/)}l(gc,"classArray");function ys(t){return t.classList||new yc(t)}l(ys,"classList");function yc(t){this._node=t,this._names=gc(t.getAttribute("class")||"")}l(yc,"ClassList");yc.prototype={add:l(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:l(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:l(function(t){return this._names.indexOf(t)>=0},"contains")};function mc(t,e){for(var r=ys(t),i=-1,a=e.length;++i=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}l(Ag,"parseTypenames");function Lg(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,a=e.length,n;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ka(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ka(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Pv.exec(t))?new Wt(e[1],e[2],e[3],1):(e=Rv.exec(t))?new Wt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Nv.exec(t))?ka(e[1],e[2],e[3],e[4]):(e=zv.exec(t))?ka(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=qv.exec(t))?Dl(e[1],e[2]/100,e[3]/100,1):(e=Wv.exec(t))?Dl(e[1],e[2]/100,e[3]/100,e[4]):Nd.hasOwnProperty(t)?Ll(Nd[t]):t==="transparent"?new Wt(NaN,NaN,NaN,0):null}l(pr,"color");function Ll(t){return new Wt(t>>16&255,t>>8&255,t&255,1)}l(Ll,"rgbn");function ka(t,e,r,i){return i<=0&&(t=e=r=NaN),new Wt(t,e,r,i)}l(ka,"rgba");function $c(t){return t instanceof mr||(t=pr(t)),t?(t=t.rgb(),new Wt(t.r,t.g,t.b,t.opacity)):new Wt}l($c,"rgbConvert");function Ga(t,e,r,i){return arguments.length===1?$c(t):new Wt(t,e,r,i??1)}l(Ga,"rgb");function Wt(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}l(Wt,"Rgb");ra(Wt,Ga,Cn(mr,{brighter(t){return t=t==null?To:Math.pow(To,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ya:Math.pow(Ya,t),new Wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Wt(hr(this.r),hr(this.g),hr(this.b),Xa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fl,formatHex:Fl,formatHex8:Wg,formatRgb:El,toString:El}));function Fl(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}`}l(Fl,"rgb_formatHex");function Wg(){return`#${sr(this.r)}${sr(this.g)}${sr(this.b)}${sr((isNaN(this.opacity)?1:this.opacity)*255)}`}l(Wg,"rgb_formatHex8");function El(){let t=Xa(this.opacity);return`${t===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${t===1?")":`, ${t})`}`}l(El,"rgb_formatRgb");function Xa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}l(Xa,"clampa");function hr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}l(hr,"clampi");function sr(t){return t=hr(t),(t<16?"0":"")+t.toString(16)}l(sr,"hex");function Dl(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new de(t,e,r,i)}l(Dl,"hsla");function wc(t){if(t instanceof de)return new de(t.h,t.s,t.l,t.opacity);if(t instanceof mr||(t=pr(t)),!t)return new de;if(t instanceof de)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),n=Math.max(e,r,i),s=NaN,o=n-a,c=(n+a)/2;return o?(e===n?s=(r-i)/o+(r0&&c<1?0:s,new de(s,o,c,t.opacity)}l(wc,"hslConvert");function jg(t,e,r,i){return arguments.length===1?wc(t):new de(t,e,r,i??1)}l(jg,"hsl");function de(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}l(de,"Hsl");ra(de,jg,Cn(mr,{brighter(t){return t=t==null?To:Math.pow(To,t),new de(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ya:Math.pow(Ya,t),new de(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,a=2*r-i;return new Wt(eo(t>=240?t-240:t+120,a,i),eo(t,a,i),eo(t<120?t+240:t-120,a,i),this.opacity)},clamp(){return new de(Ol(this.h),Ca(this.s),Ca(this.l),Xa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Xa(this.opacity);return`${t===1?"hsl(":"hsla("}${Ol(this.h)}, ${Ca(this.s)*100}%, ${Ca(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ol(t){return t=(t||0)%360,t<0?t+360:t}l(Ol,"clamph");function Ca(t){return Math.max(0,Math.min(1,t||0))}l(Ca,"clampt");function eo(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}l(eo,"hsl2rgb");var jv=Math.PI/180,Hv=180/Math.PI,Mo=18,Hg=.96422,Ug=1,Yg=.82521,Vg=4/29,mi=6/29,Gg=3*mi*mi,Uv=mi*mi*mi;function vc(t){if(t instanceof _e)return new _e(t.l,t.a,t.b,t.opacity);if(t instanceof De)return _c(t);t instanceof Wt||(t=$c(t));var e=no(t.r),r=no(t.g),i=no(t.b),a=ro((.2225045*e+.7168786*r+.0606169*i)/Ug),n,s;return e===r&&r===i?n=s=a:(n=ro((.4360747*e+.3850649*r+.1430804*i)/Hg),s=ro((.0139322*e+.0971045*r+.7141733*i)/Yg)),new _e(116*a-16,500*(n-a),200*(a-s),t.opacity)}l(vc,"labConvert");function Xg(t,e,r,i){return arguments.length===1?vc(t):new _e(t,e,r,i??1)}l(Xg,"lab");function _e(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}l(_e,"Lab");ra(_e,Xg,Cn(mr,{brighter(t){return new _e(this.l+Mo*(t??1),this.a,this.b,this.opacity)},darker(t){return new _e(this.l-Mo*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Hg*io(e),t=Ug*io(t),r=Yg*io(r),new Wt(ao(3.1338561*e-1.6168667*t-.4906146*r),ao(-.9787684*e+1.9161415*t+.033454*r),ao(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function ro(t){return t>Uv?Math.pow(t,1/3):t/Gg+Vg}l(ro,"xyz2lab");function io(t){return t>mi?t*t*t:Gg*(t-Vg)}l(io,"lab2xyz");function ao(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}l(ao,"lrgb2rgb");function no(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}l(no,"rgb2lrgb");function Zg(t){if(t instanceof De)return new De(t.h,t.c,t.l,t.opacity);if(t instanceof _e||(t=vc(t)),t.a===0&&t.b===0)return new De(NaN,0()=>t,"default");function Sc(t,e){return function(r){return t+r*e}}l(Sc,"linear");function Qg(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}l(Qg,"exponential");function Jg(t,e){var r=e-t;return r?Sc(t,r>180||r<-180?r-360*Math.round(r/360):r):ms(isNaN(t)?e:t)}l(Jg,"hue");function Kg(t){return(t=+t)==1?xi:function(e,r){return r-e?Qg(e,r,t):ms(isNaN(e)?r:e)}}l(Kg,"gamma");function xi(t,e){var r=e-t;return r?Sc(t,r):ms(isNaN(t)?e:t)}l(xi,"nogamma");function ty(t){return function(e,r){var i=t((e=Bo(e)).h,(r=Bo(r)).h),a=xi(e.c,r.c),n=xi(e.l,r.l),s=xi(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=a(o),e.l=n(o),e.opacity=s(o),e+""}}}l(ty,"hcl");var bE=ty(Jg);function Tc(t,e,r,i,a){var n=t*t,s=n*t;return((1-3*t+3*n-s)*e+(4-6*n+3*s)*r+(1+3*t+3*n-3*s)*i+s*a)/6}l(Tc,"basis");function Yv(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),a=t[i],n=t[i+1],s=i>0?t[i-1]:2*a-n,o=ir&&(n=e.slice(r,n),o[s]?o[s]+=n:o[++s]=n),(i=i[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,c.push({i:s,x:ue(i,a)})),r=hl.lastIndex;return r180?u+=360:u-h>180&&(h+=360),p.push({i:d.push(a(d)+"rotate(",null,i)-2,x:ue(h,u)})):u&&d.push(a(d)+"rotate("+u+i)}l(s,"rotate");function o(h,u,d,p){h!==u?p.push({i:d.push(a(d)+"skewX(",null,i)-2,x:ue(h,u)}):u&&d.push(a(d)+"skewX("+u+i)}l(o,"skewX");function c(h,u,d,p,f,g){if(h!==d||u!==p){var y=f.push(a(f)+"scale(",null,",",null,")");g.push({i:y-4,x:ue(h,d)},{i:y-2,x:ue(u,p)})}else(d!==1||p!==1)&&f.push(a(f)+"scale("+d+","+p+")")}return l(c,"scale"),function(h,u){var d=[],p=[];return h=t(h),u=t(u),n(h.translateX,h.translateY,u.translateX,u.translateY,d,p),s(h.rotate,u.rotate,d,p),o(h.skewX,u.skewX,d,p),c(h.scaleX,h.scaleY,u.scaleX,u.scaleY,d,p),h=u=null,function(f){for(var g=-1,y=p.length,m;++g=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}l(uy,"default");function Za(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}l(Za,"formatDecimalParts");function Ir(t){return t=Za(Math.abs(t)),t?t[1]:NaN}l(Ir,"default");function dy(t,e){return function(r,i){for(var a=r.length,n=[],s=0,o=t[0],c=0;a>0&&o>0&&(c+o+1>i&&(o=Math.max(1,i-c)),n.push(r.substring(a-=o,a+o)),!((c+=o+1)>i));)o=t[s=(s+1)%t.length];return n.reverse().join(e)}}l(dy,"default");function py(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}l(py,"default");var Qv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qa(t){if(!(e=Qv.exec(t)))throw new Error("invalid format: "+t);var e;return new bs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}l(Qa,"formatSpecifier");Qa.prototype=bs.prototype;function bs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}l(bs,"FormatSpecifier");bs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fy(t){t:for(var e=t.length,r=1,i=-1,a;r0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(a+1):t}l(fy,"default");var gy;function yy(t,e){var r=Za(t,e);if(!r)return t+"";var i=r[0],a=r[1],n=a-(gy=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=i.length;return n===s?i:n>s?i+new Array(n-s+1).join("0"):n>0?i.slice(0,n)+"."+i.slice(n):"0."+new Array(1-n).join("0")+Za(t,Math.max(0,e+n-1))[0]}l(yy,"default");function Rl(t,e){var r=Za(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}l(Rl,"default");var qd={"%":l((t,e)=>(t*100).toFixed(e),"%"),b:l(t=>Math.round(t).toString(2),"b"),c:l(t=>t+"","c"),d:uy,e:l((t,e)=>t.toExponential(e),"e"),f:l((t,e)=>t.toFixed(e),"f"),g:l((t,e)=>t.toPrecision(e),"g"),o:l(t=>Math.round(t).toString(8),"o"),p:l((t,e)=>Rl(t*100,e),"p"),r:Rl,s:yy,X:l(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:l(t=>Math.round(t).toString(16),"x")};function Nl(t){return t}l(Nl,"default");var Wd=Array.prototype.map,jd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function my(t){var e=t.grouping===void 0||t.thousands===void 0?Nl:dy(Wd.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",n=t.numerals===void 0?Nl:py(Wd.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function h(d){d=Qa(d);var p=d.fill,f=d.align,g=d.sign,y=d.symbol,m=d.zero,x=d.width,b=d.comma,k=d.precision,_=d.trim,w=d.type;w==="n"?(b=!0,w="g"):qd[w]||(k===void 0&&(k=12),_=!0,w="g"),(m||p==="0"&&f==="=")&&(m=!0,p="0",f="=");var $=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T=y==="$"?i:/[%p]/.test(w)?s:"",O=qd[w],R=/[defgprs%]/.test(w);k=k===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function I(S){var D=$,A=T,B,L,M;if(w==="c")A=O(S)+A,S="";else{S=+S;var E=S<0||1/S<0;if(S=isNaN(S)?c:O(Math.abs(S),k),_&&(S=fy(S)),E&&+S==0&&g!=="+"&&(E=!1),D=(E?g==="("?g:o:g==="-"||g==="("?"":g)+D,A=(w==="s"?jd[8+gy/3]:"")+A+(E&&g==="("?")":""),R){for(B=-1,L=S.length;++BM||M>57){A=(M===46?a+S.slice(B+1):S.slice(B))+A,S=S.slice(0,B);break}}}b&&!m&&(S=e(S,1/0));var F=D.length+S.length+A.length,z=F>1)+D+S+A+z.slice(F);break;default:S=z+D+S+A;break}return n(S)}return l(I,"format"),I.toString=function(){return d+""},I}l(h,"newFormat");function u(d,p){var f=h((d=Qa(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Ir(p)/3)))*3,y=Math.pow(10,-g),m=jd[8+g/3];return function(x){return f(y*x)+m}}return l(u,"formatPrefix"),{format:h,formatPrefix:u}}l(my,"default");var Un,xy,by;ky({thousands:",",grouping:[3],currency:["$",""]});function ky(t){return Un=my(t),xy=Un.format,by=Un.formatPrefix,Un}l(ky,"defaultLocale");function Cy(t){return Math.max(0,-Ir(Math.abs(t)))}l(Cy,"default");function $y(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ir(e)/3)))*3-Ir(Math.abs(t)))}l($y,"default");function wy(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ir(e)-Ir(t))+1}l(wy,"default");function vy(t){var e=0,r=t.children,i=r&&r.length;if(!i)e=1;else for(;--i>=0;)e+=r[i].value;t.value=e}l(vy,"count");function _y(){return this.eachAfter(vy)}l(_y,"default");function Sy(t,e){let r=-1;for(let i of this)t.call(e,i,++r,this);return this}l(Sy,"default");function Ty(t,e){for(var r=this,i=[r],a,n,s=-1;r=i.pop();)if(t.call(e,r,++s,this),a=r.children)for(n=a.length-1;n>=0;--n)i.push(a[n]);return this}l(Ty,"default");function My(t,e){for(var r=this,i=[r],a=[],n,s,o,c=-1;r=i.pop();)if(a.push(r),n=r.children)for(s=0,o=n.length;s=0;)r+=i[a].value;e.value=r})}l(Ay,"default");function Ly(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}l(Ly,"default");function Fy(t){for(var e=this,r=Ey(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var a=i.length;t!==r;)i.splice(a,0,t),t=t.parent;return i}l(Fy,"default");function Ey(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),a=null;for(t=r.pop(),e=i.pop();t===e;)a=t,t=r.pop(),e=i.pop();return a}l(Ey,"leastCommonAncestor");function Dy(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}l(Dy,"default");function Oy(){return Array.from(this)}l(Oy,"default");function Iy(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}l(Iy,"default");function Py(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}l(Py,"default");function*Ry(){var t=this,e,r=[t],i,a,n;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,i=t.children)for(a=0,n=i.length;a=0;--o)a.push(n=s[o]=new Ja(s[o])),n.parent=i,n.depth=i.depth+1;return r.eachBefore(jy)}l(Lc,"hierarchy");function Ny(){return Lc(this).eachBefore(Wy)}l(Ny,"node_copy");function zy(t){return t.children}l(zy,"objectChildren");function qy(t){return Array.isArray(t)?t[1]:null}l(qy,"mapChildren");function Wy(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}l(Wy,"copyData");function jy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}l(jy,"computeHeight");function Ja(t){this.data=t,this.depth=this.height=0,this.parent=null}l(Ja,"Node");Ja.prototype=Lc.prototype={constructor:Ja,count:_y,each:Sy,eachAfter:My,eachBefore:Ty,find:By,sum:Ay,sort:Ly,path:Fy,ancestors:Dy,descendants:Oy,leaves:Iy,links:Py,copy:Ny,[Symbol.iterator]:Ry};function Hy(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}l(Hy,"default");function Uy(t,e,r,i,a){for(var n=t.children,s,o=-1,c=n.length,h=t.value&&(i-e)/t.value;++ob&&(b=h),$=m*m*w,k=Math.max(b/$,$/x),k>_){m-=h;break}_=k}s.push(c={value:m,dice:f1?i:1)},r}),"custom")(Jv);function Gy(t){if(typeof t!="function")throw new Error;return t}l(Gy,"required");function ri(){return 0}l(ri,"constantZero");function ii(t){return function(){return t}}l(ii,"default");function t_(){var t=Kv,e=!1,r=1,i=1,a=[0],n=ri,s=ri,o=ri,c=ri,h=ri;function u(p){return p.x0=p.y0=0,p.x1=r,p.y1=i,p.eachBefore(d),a=[0],e&&p.eachBefore(Hy),p}l(u,"treemap");function d(p){var f=a[p.depth],g=p.x0+f,y=p.y0+f,m=p.x1-f,x=p.y1-f;me&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}l(Qy,"clamper");function Jy(t,e,r){var i=t[0],a=t[1],n=e[0],s=e[1];return a2?Ky:Jy,c=h=null,d}l(u,"rescale");function d(p){return p==null||isNaN(p=+p)?n:(c||(c=o(t.map(i),e,r)))(i(s(p)))}return l(d,"scale"),d.invert=function(p){return s(a((h||(h=o(e,t.map(i),ue)))(p)))},d.domain=function(p){return arguments.length?(t=Array.from(p,Zy),u()):t.slice()},d.range=function(p){return arguments.length?(e=Array.from(p),u()):e.slice()},d.rangeRound=function(p){return e=Array.from(p),r=ly,u()},d.clamp=function(p){return arguments.length?(s=p?!0:Br,u()):s!==Br},d.interpolate=function(p){return arguments.length?(r=p,u()):r},d.unknown=function(p){return arguments.length?(n=p,d):n},function(p,f){return i=p,a=f,u()}}l(tm,"transformer");function Dc(){return tm()(Br,Br)}l(Dc,"continuous");function em(t,e,r,i){var a=So(t,e,r),n;switch(i=Qa(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(n=$y(a,s))&&(i.precision=n),by(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(n=wy(a,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=n-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(n=Cy(a))&&(i.precision=n-(i.type==="%")*2);break}}return xy(i)}l(em,"tickFormat");function rm(t){var e=t.domain;return t.ticks=function(r){var i=e();return tf(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var a=e();return em(a[0],a[a.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),a=0,n=i.length-1,s=i[a],o=i[n],c,h,u=10;for(o0;){if(h=_o(s,o,r),h===c)return i[a]=s,i[n]=o,e(i);if(h>0)s=Math.floor(s/h)*h,o=Math.ceil(o/h)*h;else if(h<0)s=Math.ceil(s*h)/h,o=Math.floor(o*h)/h;else break;c=h}return t},t}l(rm,"linearish");function im(){var t=Dc();return t.copy=function(){return Ec(t,im())},$n.apply(t,arguments),rm(t)}l(im,"linear");var cl=new Date,ul=new Date;function Ft(t,e,r,i){function a(n){return t(n=arguments.length===0?new Date:new Date(+n)),n}return l(a,"interval"),a.floor=n=>(t(n=new Date(+n)),n),a.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),a.round=n=>{let s=a(n),o=a.ceil(n);return n-s(e(n=new Date(+n),s==null?1:Math.floor(s)),n),a.range=(n,s,o)=>{let c=[];if(n=a.ceil(n),o=o==null?1:Math.floor(o),!(n0))return c;let h;do c.push(h=new Date(+n)),e(n,o),t(n);while(hFt(s=>{if(s>=s)for(;t(s),!n(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!n(s););else for(;--o>=0;)for(;e(s,1),!n(s););}),r&&(a.count=(n,s)=>(cl.setTime(+n),ul.setTime(+s),t(cl),t(ul),Math.floor(r(cl,ul))),a.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?a.filter(i?s=>i(s)%n===0:s=>a.count(0,s)%n===0):a)),a}l(Ft,"timeInterval");var Fo=Ft(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Fo.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ft(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Fo);Fo.range;var pi=Ft(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds());pi.range;var Oc=Ft(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes());Oc.range;var am=Ft(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes());am.range;var Ic=Ft(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours());Ic.range;var nm=Ft(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours());nm.range;var wn=Ft(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1);wn.range;var Pc=Ft(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);Pc.range;var om=Ft(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5));om.range;function xr(t){return Ft(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}l(xr,"timeWeekday");var ks=xr(0),Eo=xr(1),e_=xr(2),r_=xr(3),Vi=xr(4),i_=xr(5),a_=xr(6);ks.range;Eo.range;e_.range;r_.range;Vi.range;i_.range;a_.range;function br(t){return Ft(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}l(br,"utcWeekday");var Rc=br(0),Do=br(1),n_=br(2),o_=br(3),Gi=br(4),s_=br(5),l_=br(6);Rc.range;Do.range;n_.range;o_.range;Gi.range;s_.range;l_.range;var Nc=Ft(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nc.range;var sm=Ft(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());sm.range;var Qe=Ft(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Qe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ft(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});Qe.range;var fr=Ft(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());fr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ft(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});fr.range;function zc(t,e,r,i,a,n){let s=[[pi,1,1e3],[pi,5,5e3],[pi,15,15e3],[pi,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[i,1,864e5],[i,2,1728e5],[r,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function o(h,u,d){let p=um).right(s,p);if(f===s.length)return t.every(So(h/31536e6,u/31536e6,d));if(f===0)return Fo.every(Math.max(So(h,u,d),1));let[g,y]=s[p/s[f-1][2]53)return null;"w"in N||(N.w=1),"Z"in N?(yt=so(ai(N.y,0,1)),Bt=yt.getUTCDay(),yt=Bt>4||Bt===0?Do.ceil(yt):Do(yt),yt=Pc.offset(yt,(N.V-1)*7),N.y=yt.getUTCFullYear(),N.m=yt.getUTCMonth(),N.d=yt.getUTCDate()+(N.w+6)%7):(yt=oo(ai(N.y,0,1)),Bt=yt.getDay(),yt=Bt>4||Bt===0?Eo.ceil(yt):Eo(yt),yt=wn.offset(yt,(N.V-1)*7),N.y=yt.getFullYear(),N.m=yt.getMonth(),N.d=yt.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),Bt="Z"in N?so(ai(N.y,0,1)).getUTCDay():oo(ai(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(Bt+5)%7:N.w+N.U*7-(Bt+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,so(N)):oo(N)}}l(T,"newParse");function O(q,rt,ht,N){for(var $t=0,yt=rt.length,Bt=ht.length,Pt,me;$t=Bt)return-1;if(Pt=rt.charCodeAt($t++),Pt===37){if(Pt=rt.charAt($t++),me=w[Pt in Yd?rt.charAt($t++):Pt],!me||(N=me(q,ht,N))<0)return-1}else if(Pt!=ht.charCodeAt(N++))return-1}return N}l(O,"parseSpecifier");function R(q,rt,ht){var N=h.exec(rt.slice(ht));return N?(q.p=u.get(N[0].toLowerCase()),ht+N[0].length):-1}l(R,"parsePeriod");function I(q,rt,ht){var N=f.exec(rt.slice(ht));return N?(q.w=g.get(N[0].toLowerCase()),ht+N[0].length):-1}l(I,"parseShortWeekday");function S(q,rt,ht){var N=d.exec(rt.slice(ht));return N?(q.w=p.get(N[0].toLowerCase()),ht+N[0].length):-1}l(S,"parseWeekday");function D(q,rt,ht){var N=x.exec(rt.slice(ht));return N?(q.m=b.get(N[0].toLowerCase()),ht+N[0].length):-1}l(D,"parseShortMonth");function A(q,rt,ht){var N=y.exec(rt.slice(ht));return N?(q.m=m.get(N[0].toLowerCase()),ht+N[0].length):-1}l(A,"parseMonth");function B(q,rt,ht){return O(q,e,rt,ht)}l(B,"parseLocaleDateTime");function L(q,rt,ht){return O(q,r,rt,ht)}l(L,"parseLocaleDate");function M(q,rt,ht){return O(q,i,rt,ht)}l(M,"parseLocaleTime");function E(q){return s[q.getDay()]}l(E,"formatShortWeekday");function F(q){return n[q.getDay()]}l(F,"formatWeekday");function z(q){return c[q.getMonth()]}l(z,"formatShortMonth");function V(q){return o[q.getMonth()]}l(V,"formatMonth");function G(q){return a[+(q.getHours()>=12)]}l(G,"formatPeriod");function Z(q){return 1+~~(q.getMonth()/3)}l(Z,"formatQuarter");function U(q){return s[q.getUTCDay()]}l(U,"formatUTCShortWeekday");function ct(q){return n[q.getUTCDay()]}l(ct,"formatUTCWeekday");function et(q){return c[q.getUTCMonth()]}l(et,"formatUTCShortMonth");function wt(q){return o[q.getUTCMonth()]}l(wt,"formatUTCMonth");function Ct(q){return a[+(q.getUTCHours()>=12)]}l(Ct,"formatUTCPeriod");function Tt(q){return 1+~~(q.getUTCMonth()/3)}return l(Tt,"formatUTCQuarter"),{format:l(function(q){var rt=$(q+="",k);return rt.toString=function(){return q},rt},"format"),parse:l(function(q){var rt=T(q+="",!1);return rt.toString=function(){return q},rt},"parse"),utcFormat:l(function(q){var rt=$(q+="",_);return rt.toString=function(){return q},rt},"utcFormat"),utcParse:l(function(q){var rt=T(q+="",!0);return rt.toString=function(){return q},rt},"utcParse")}}l(lm,"formatLocale");var Yd={"-":"",_:" ",0:"0"},It=/^\s*\d+/,u_=/^%/,d_=/[\\^$*+?|[\]().{}]/g;function ft(t,e,r){var i=t<0?"-":"",a=(i?-t:t)+"",n=a.length;return i+(n[e.toLowerCase(),r]))}l(oi,"formatLookup");function cm(t,e,r){var i=It.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}l(cm,"parseWeekdayNumberSunday");function um(t,e,r){var i=It.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}l(um,"parseWeekdayNumberMonday");function dm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}l(dm,"parseWeekNumberSunday");function pm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}l(pm,"parseWeekNumberISO");function fm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}l(fm,"parseWeekNumberMonday");function zl(t,e,r){var i=It.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}l(zl,"parseFullYear");function ql(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}l(ql,"parseYear");function gm(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}l(gm,"parseZone");function ym(t,e,r){var i=It.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}l(ym,"parseQuarter");function mm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}l(mm,"parseMonthNumber");function Wl(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}l(Wl,"parseDayOfMonth");function xm(t,e,r){var i=It.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}l(xm,"parseDayOfYear");function jl(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}l(jl,"parseHour24");function bm(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}l(bm,"parseMinutes");function km(t,e,r){var i=It.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}l(km,"parseSeconds");function Cm(t,e,r){var i=It.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}l(Cm,"parseMilliseconds");function $m(t,e,r){var i=It.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}l($m,"parseMicroseconds");function wm(t,e,r){var i=u_.exec(e.slice(r,r+1));return i?r+i[0].length:-1}l(wm,"parseLiteralPercent");function vm(t,e,r){var i=It.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}l(vm,"parseUnixTimestamp");function _m(t,e,r){var i=It.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}l(_m,"parseUnixTimestampSeconds");function Hl(t,e){return ft(t.getDate(),e,2)}l(Hl,"formatDayOfMonth");function Sm(t,e){return ft(t.getHours(),e,2)}l(Sm,"formatHour24");function Tm(t,e){return ft(t.getHours()%12||12,e,2)}l(Tm,"formatHour12");function Mm(t,e){return ft(1+wn.count(Qe(t),t),e,3)}l(Mm,"formatDayOfYear");function qc(t,e){return ft(t.getMilliseconds(),e,3)}l(qc,"formatMilliseconds");function Bm(t,e){return qc(t,e)+"000"}l(Bm,"formatMicroseconds");function Am(t,e){return ft(t.getMonth()+1,e,2)}l(Am,"formatMonthNumber");function Lm(t,e){return ft(t.getMinutes(),e,2)}l(Lm,"formatMinutes");function Fm(t,e){return ft(t.getSeconds(),e,2)}l(Fm,"formatSeconds");function Em(t){var e=t.getDay();return e===0?7:e}l(Em,"formatWeekdayNumberMonday");function Dm(t,e){return ft(ks.count(Qe(t)-1,t),e,2)}l(Dm,"formatWeekNumberSunday");function Wc(t){var e=t.getDay();return e>=4||e===0?Vi(t):Vi.ceil(t)}l(Wc,"dISO");function Om(t,e){return t=Wc(t),ft(Vi.count(Qe(t),t)+(Qe(t).getDay()===4),e,2)}l(Om,"formatWeekNumberISO");function Im(t){return t.getDay()}l(Im,"formatWeekdayNumberSunday");function Pm(t,e){return ft(Eo.count(Qe(t)-1,t),e,2)}l(Pm,"formatWeekNumberMonday");function Rm(t,e){return ft(t.getFullYear()%100,e,2)}l(Rm,"formatYear");function Nm(t,e){return t=Wc(t),ft(t.getFullYear()%100,e,2)}l(Nm,"formatYearISO");function zm(t,e){return ft(t.getFullYear()%1e4,e,4)}l(zm,"formatFullYear");function qm(t,e){var r=t.getDay();return t=r>=4||r===0?Vi(t):Vi.ceil(t),ft(t.getFullYear()%1e4,e,4)}l(qm,"formatFullYearISO");function Wm(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ft(e/60|0,"0",2)+ft(e%60,"0",2)}l(Wm,"formatZone");function Ul(t,e){return ft(t.getUTCDate(),e,2)}l(Ul,"formatUTCDayOfMonth");function jm(t,e){return ft(t.getUTCHours(),e,2)}l(jm,"formatUTCHour24");function Hm(t,e){return ft(t.getUTCHours()%12||12,e,2)}l(Hm,"formatUTCHour12");function Um(t,e){return ft(1+Pc.count(fr(t),t),e,3)}l(Um,"formatUTCDayOfYear");function jc(t,e){return ft(t.getUTCMilliseconds(),e,3)}l(jc,"formatUTCMilliseconds");function Ym(t,e){return jc(t,e)+"000"}l(Ym,"formatUTCMicroseconds");function Vm(t,e){return ft(t.getUTCMonth()+1,e,2)}l(Vm,"formatUTCMonthNumber");function Gm(t,e){return ft(t.getUTCMinutes(),e,2)}l(Gm,"formatUTCMinutes");function Xm(t,e){return ft(t.getUTCSeconds(),e,2)}l(Xm,"formatUTCSeconds");function Zm(t){var e=t.getUTCDay();return e===0?7:e}l(Zm,"formatUTCWeekdayNumberMonday");function Qm(t,e){return ft(Rc.count(fr(t)-1,t),e,2)}l(Qm,"formatUTCWeekNumberSunday");function Hc(t){var e=t.getUTCDay();return e>=4||e===0?Gi(t):Gi.ceil(t)}l(Hc,"UTCdISO");function Jm(t,e){return t=Hc(t),ft(Gi.count(fr(t),t)+(fr(t).getUTCDay()===4),e,2)}l(Jm,"formatUTCWeekNumberISO");function Km(t){return t.getUTCDay()}l(Km,"formatUTCWeekdayNumberSunday");function t0(t,e){return ft(Do.count(fr(t)-1,t),e,2)}l(t0,"formatUTCWeekNumberMonday");function e0(t,e){return ft(t.getUTCFullYear()%100,e,2)}l(e0,"formatUTCYear");function r0(t,e){return t=Hc(t),ft(t.getUTCFullYear()%100,e,2)}l(r0,"formatUTCYearISO");function i0(t,e){return ft(t.getUTCFullYear()%1e4,e,4)}l(i0,"formatUTCFullYear");function a0(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Gi(t):Gi.ceil(t),ft(t.getUTCFullYear()%1e4,e,4)}l(a0,"formatUTCFullYearISO");function n0(){return"+0000"}l(n0,"formatUTCZone");function Yl(){return"%"}l(Yl,"formatLiteralPercent");function Vl(t){return+t}l(Vl,"formatUnixTimestamp");function Gl(t){return Math.floor(+t/1e3)}l(Gl,"formatUnixTimestampSeconds");var ei,o0;s0({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function s0(t){return ei=lm(t),o0=ei.format,ei.parse,ei.utcFormat,ei.utcParse,ei}l(s0,"defaultLocale");function l0(t,e){t=t.slice();var r=0,i=t.length-1,a=t[r],n=t[i],s;return n1?0:t<-1?Ka:Math.acos(t)}l(p0,"acos");function Xl(t){return t>=1?Oo:t<=-1?-Oo:Math.asin(t)}l(Xl,"asin");var Zl=Math.PI,Ql=2*Zl,Sr=1e-6,g_=Ql-Sr;function Yc(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Yc;let r=10**e;return function(i){this._+=i[0];for(let a=1,n=i.length;aSr)if(!(Math.abs(d*c-h*u)>Sr)||!n)this._append`L${this._x1=e},${this._y1=r}`;else{let f=i-s,g=a-o,y=c*c+h*h,m=f*f+g*g,x=Math.sqrt(y),b=Math.sqrt(p),k=n*Math.tan((Zl-Math.acos((y+p-m)/(2*x*b)))/2),_=k/b,w=k/x;Math.abs(_-1)>Sr&&this._append`L${e+_*u},${r+_*d}`,this._append`A${n},${n},0,0,${+(d*f>u*g)},${this._x1=e+w*c},${this._y1=r+w*h}`}}arc(e,r,i,a,n,s){if(e=+e,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(a),c=i*Math.sin(a),h=e+o,u=r+c,d=1^s,p=s?a-n:n-a;this._x1===null?this._append`M${h},${u}`:(Math.abs(this._x1-h)>Sr||Math.abs(this._y1-u)>Sr)&&this._append`L${h},${u}`,i&&(p<0&&(p=p%Ql+Ql),p>g_?this._append`A${i},${i},0,1,${d},${e-o},${r-c}A${i},${i},0,1,${d},${this._x1=h},${this._y1=u}`:p>Sr&&this._append`A${i},${i},0,${+(p>=Zl)},${d},${this._x1=e+i*Math.cos(n)},${this._y1=r+i*Math.sin(n)}`)}rect(e,r,i,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}},l(Ci,"Path"),Ci);function g0(){return new Vc}l(g0,"path");g0.prototype=Vc.prototype;function Gc(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new Vc(e)}l(Gc,"withPath");function y0(t){return t.innerRadius}l(y0,"arcInnerRadius");function m0(t){return t.outerRadius}l(m0,"arcOuterRadius");function x0(t){return t.startAngle}l(x0,"arcStartAngle");function b0(t){return t.endAngle}l(b0,"arcEndAngle");function k0(t){return t&&t.padAngle}l(k0,"arcPadAngle");function C0(t,e,r,i,a,n,s,o){var c=r-t,h=i-e,u=s-a,d=o-n,p=d*c-u*h;if(!(p*pB*B+L*L&&(O=I,R=S),{cx:O,cy:R,x01:-u,y01:-d,x11:O*(a/w-1),y11:R*(a/w-1)}}l($a,"cornerTangents");function y_(){var t=y0,e=m0,r=Mt(0),i=null,a=x0,n=b0,s=k0,o=null,c=Gc(h);function h(){var u,d,p=+t.apply(this,arguments),f=+e.apply(this,arguments),g=a.apply(this,arguments)-Oo,y=n.apply(this,arguments)-Oo,m=Vd(y-g),x=y>g;if(o||(o=u=c()),fHt))o.moveTo(0,0);else if(m>lo-Ht)o.moveTo(f*vr(g),f*Fe(g)),o.arc(0,0,f,g,y,!x),p>Ht&&(o.moveTo(p*vr(y),p*Fe(y)),o.arc(0,0,p,y,g,x));else{var b=g,k=y,_=g,w=y,$=m,T=m,O=s.apply(this,arguments)/2,R=O>Ht&&(i?+i.apply(this,arguments):fi(p*p+f*f)),I=dl(Vd(f-p)/2,+r.apply(this,arguments)),S=I,D=I,A,B;if(R>Ht){var L=Xl(R/p*Fe(O)),M=Xl(R/f*Fe(O));($-=L*2)>Ht?(L*=x?1:-1,_+=L,w-=L):($=0,_=w=(g+y)/2),(T-=M*2)>Ht?(M*=x?1:-1,b+=M,k-=M):(T=0,b=k=(g+y)/2)}var E=f*vr(b),F=f*Fe(b),z=p*vr(w),V=p*Fe(w);if(I>Ht){var G=f*vr(k),Z=f*Fe(k),U=p*vr(_),ct=p*Fe(_),et;if(mHt?D>Ht?(A=$a(U,ct,E,F,f,D,x),B=$a(G,Z,z,V,f,D,x),o.moveTo(A.cx+A.x01,A.cy+A.y01),DHt)||!($>Ht)?o.lineTo(z,V):S>Ht?(A=$a(z,V,G,Z,p,-S,x),B=$a(E,F,U,ct,p,-S,x),o.lineTo(A.cx+A.x01,A.cy+A.y01),St?1:e>=t?0:NaN}l(_0,"default");function S0(t){return t}l(S0,"default");function m_(){var t=S0,e=_0,r=null,i=Mt(0),a=Mt(lo),n=Mt(0);function s(o){var c,h=(o=Zc(o)).length,u,d,p=0,f=new Array(h),g=new Array(h),y=+i.apply(this,arguments),m=Math.min(lo,Math.max(-lo,a.apply(this,arguments)-y)),x,b=Math.min(Math.abs(m)/h,n.apply(this,arguments)),k=b*(m<0?-1:1),_;for(c=0;c0&&(p+=_);for(e!=null?f.sort(function(w,$){return e(g[w],g[$])}):r!=null&&f.sort(function(w,$){return r(o[w],o[$])}),c=0,d=p?(m-h*k)/p:0;c0?_*d:0)+k,g[u]={data:o[u],index:c,value:_,startAngle:y,endAngle:x,padAngle:b};return g}return l(s,"pie"),s.value=function(o){return arguments.length?(t=typeof o=="function"?o:Mt(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Mt(+o),s):i},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Mt(+o),s):a},s.padAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Mt(+o),s):n},s}l(m_,"default");var $i,T0=($i=class{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}},l($i,"Bump"),$i);function Qc(t){return new T0(t,!0)}l(Qc,"bumpX");function Jc(t){return new T0(t,!1)}l(Jc,"bumpY");function tn(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}l(tn,"point");function vn(t){this._context=t}l(vn,"Basis");vn.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 3:tn(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},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function Io(t){return new vn(t)}l(Io,"default");function Je(){}l(Je,"default");function Kc(t){this._context=t}l(Kc,"BasisClosed");Kc.prototype={areaStart:Je,areaEnd:Je,lineStart:l(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},"lineStart"),lineEnd:l(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}}},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:tn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function M0(t){return new Kc(t)}l(M0,"default");function tu(t){this._context=t}l(tu,"BasisOpen");tu.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:tn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function B0(t){return new tu(t)}l(B0,"default");function eu(t,e){this._basis=new vn(t),this._beta=e}l(eu,"Bundle");eu.prototype={lineStart:l(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:l(function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i=t[0],a=e[0],n=t[r]-i,s=e[r]-a,o=-1,c;++o<=r;)c=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(i+c*n),this._beta*e[o]+(1-this._beta)*(a+c*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:l(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};var x_=l((function t(e){function r(i){return e===1?new vn(i):new eu(i,e)}return l(r,"bundle"),r.beta=function(i){return t(+i)},r}),"custom")(.85);function en(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}l(en,"point");function Cs(t,e){this._context=t,this._k=(1-e)/6}l(Cs,"Cardinal");Cs.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:en(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:en(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var A0=l((function t(e){function r(i){return new Cs(i,e)}return l(r,"cardinal"),r.tension=function(i){return t(+i)},r}),"custom")(0);function $s(t,e){this._context=t,this._k=(1-e)/6}l($s,"CardinalClosed");$s.prototype={areaStart:Je,areaEnd:Je,lineStart:l(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},"lineStart"),lineEnd:l(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}}},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:en(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var b_=l((function t(e){function r(i){return new $s(i,e)}return l(r,"cardinal"),r.tension=function(i){return t(+i)},r}),"custom")(0);function ws(t,e){this._context=t,this._k=(1-e)/6}l(ws,"CardinalOpen");ws.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,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:en(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var k_=l((function t(e){function r(i){return new ws(i,e)}return l(r,"cardinal"),r.tension=function(i){return t(+i)},r}),"custom")(0);function vs(t,e,r){var i=t._x1,a=t._y1,n=t._x2,s=t._y2;if(t._l01_a>Ht){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,a=(a*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ht){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);n=(n*h+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(i,a,n,s,t._x2,t._y2)}l(vs,"point");function ru(t,e){this._context=t,this._alpha=e}l(ru,"CatmullRom");ru.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(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},"lineStart"),lineEnd:l(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},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:vs(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var L0=l((function t(e){function r(i){return e?new ru(i,e):new Cs(i,0)}return l(r,"catmullRom"),r.alpha=function(i){return t(+i)},r}),"custom")(.5);function iu(t,e){this._context=t,this._alpha=e}l(iu,"CatmullRomClosed");iu.prototype={areaStart:Je,areaEnd:Je,lineStart:l(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},"lineStart"),lineEnd:l(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}}},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vs(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var C_=l((function t(e){function r(i){return e?new iu(i,e):new $s(i,0)}return l(r,"catmullRom"),r.alpha=function(i){return t(+i)},r}),"custom")(.5);function au(t,e){this._context=t,this._alpha=e}l(au,"CatmullRomOpen");au.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(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},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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:vs(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var $_=l((function t(e){function r(i){return e?new au(i,e):new ws(i,0)}return l(r,"catmullRom"),r.alpha=function(i){return t(+i)},r}),"custom")(.5);function nu(t){this._context=t}l(nu,"LinearClosed");nu.prototype={areaStart:Je,areaEnd:Je,lineStart:l(function(){this._point=0},"lineStart"),lineEnd:l(function(){this._point&&this._context.closePath()},"lineEnd"),point:l(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};function F0(t){return new nu(t)}l(F0,"default");function Jl(t){return t<0?-1:1}l(Jl,"sign");function Kl(t,e,r){var i=t._x1-t._x0,a=e-t._x1,n=(t._y1-t._y0)/(i||a<0&&-0),s=(r-t._y1)/(a||i<0&&-0),o=(n*a+s*i)/(i+a);return(Jl(n)+Jl(s))*Math.min(Math.abs(n),Math.abs(s),.5*Math.abs(o))||0}l(Kl,"slope3");function th(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}l(th,"slope2");function ho(t,e,r){var i=t._x0,a=t._y0,n=t._x1,s=t._y1,o=(n-i)/3;t._context.bezierCurveTo(i+o,a+o*e,n-o,s-o*r,n,s)}l(ho,"point");function rn(t){this._context=t}l(rn,"MonotoneX");rn.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ho(this,this._t0,th(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ho(this,th(this,r=Kl(this,t,e)),r);break;default:ho(this,this._t0,r=Kl(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")};function ou(t){this._context=new su(t)}l(ou,"MonotoneY");(ou.prototype=Object.create(rn.prototype)).point=function(t,e){rn.prototype.point.call(this,e,t)};function su(t){this._context=t}l(su,"ReflectContext");su.prototype={moveTo:l(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:l(function(){this._context.closePath()},"closePath"),lineTo:l(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:l(function(t,e,r,i,a,n){this._context.bezierCurveTo(e,t,i,r,n,a)},"bezierCurveTo")};function lu(t){return new rn(t)}l(lu,"monotoneX");function hu(t){return new ou(t)}l(hu,"monotoneY");function cu(t){this._context=t}l(cu,"Natural");cu.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:l(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=eh(t),a=eh(e),n=0,s=1;s=0;--e)a[e]=(s[e]-a[e+1])/n[e];for(n[r-1]=(t[r]+a[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e},"point")};function du(t){return new _n(t,.5)}l(du,"default");function pu(t){return new _n(t,0)}l(pu,"stepBefore");function fu(t){return new _n(t,1)}l(fu,"stepAfter");var w_={value:l(()=>{},"value")};function gu(){for(var t=0,e=arguments.length,r={},i;t=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}l(E0,"parseTypenames");Fa.prototype=gu.prototype={constructor:Fa,on:l(function(t,e){var r=this._,i=E0(t+"",r),a,n=-1,s=i.length;if(arguments.length<2){for(;++n0)for(var r=new Array(a),i=0,a,n;i=0&&t._call.call(void 0,e),t=t._next;--Xi}l(R0,"timerFlush");function ih(){Pr=(Ro=an.now())+_s,Xi=wa=0;try{R0()}finally{Xi=0,z0(),Pr=0}}l(ih,"wake");function N0(){var t=an.now(),e=t-Ro;e>O0&&(_s-=e,Ro=t)}l(N0,"poke");function z0(){for(var t,e=Po,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Po=r);va=t,No(i)}l(z0,"nap");function No(t){if(!Xi){wa&&(wa=clearTimeout(wa));var e=t-Pr;e>24?(t<1/0&&(wa=setTimeout(ih,t-an.now()-_s)),ua&&(ua=clearInterval(ua))):(ua||(Ro=an.now(),ua=setInterval(N0,O0)),Xi=1,I0(ih))}}l(No,"sleep");function ah(t,e,r){var i=new nn;return e=e==null?0:+e,i.restart(a=>{i.stop(),t(a+e)},e,r),i}l(ah,"default");var __=v_("start","end","cancel","interrupt"),S_=[],q0=0,Gd=1,nh=2,co=3,Xd=4,oh=5,uo=6;function Sn(t,e,r,i,a,n){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;W0(t,r,{name:e,index:i,group:a,on:__,tween:S_,time:n.time,delay:n.delay,duration:n.duration,ease:n.ease,timer:null,state:q0})}l(Sn,"default");function Ts(t,e){var r=ye(t,e);if(r.state>q0)throw new Error("too late; already scheduled");return r}l(Ts,"init");function Be(t,e){var r=ye(t,e);if(r.state>co)throw new Error("too late; already running");return r}l(Be,"set");function ye(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}l(ye,"get");function W0(t,e,r){var i=t.__transition,a;i[e]=r,r.timer=yu(n,0,r.time);function n(h){r.state=Gd,r.timer.restart(s,r.delay,r.time),r.delay<=h&&s(h-r.delay)}l(n,"schedule");function s(h){var u,d,p,f;if(r.state!==Gd)return c();for(u in i)if(f=i[u],f.name===r.name){if(f.state===co)return ah(s);f.state===Xd?(f.state=uo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+unh&&i.state=0&&(e=e.slice(0,r)),!e||e==="start"})}l(x1,"start");function b1(t,e,r){var i,a,n=x1(e)?Ts:Be;return function(){var s=n(this,t),o=s.on;o!==i&&(a=(i=o).copy()).on(e,r),s.on=a}}l(b1,"onFunction");function k1(t,e){var r=this._id;return arguments.length<2?ye(this.node(),r).on.on(t):this.each(b1(r,t,e))}l(k1,"default");function C1(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}l(C1,"removeFunction");function $1(){return this.on("end.remove",C1(this._id))}l($1,"default");function w1(t){var e=this._name,r=this._id;typeof t!="function"&&(t=gs(t));for(var i=this._groups,a=i.length,n=new Array(a),s=0;s{for(let{id:e,detector:r,loader:i}of t)Z1(e,r,i)},"registerLazyLoadedDiagrams"),Z1=l((t,e,r)=>{Rr[t]&&P.warn(`Detector with key ${t} already exists. Overwriting.`),Rr[t]={detector:e,loader:r},P.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),E_=l(t=>Rr[t].loader,"getDiagramLoader"),hh=l((t,e,{depth:r=2,clobber:i=!1}={})=>{let a={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>hh(t,n,a)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(n=>{typeof e[n]=="object"&&e[n]!==null&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=hh(t[n],e[n],{depth:r-1,clobber:i})):(i||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},"assignWithDepth"),Dt=hh,po={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:l(t=>t>=255?255:t<0?0:t,"r"),g:l(t=>t>=255?255:t<0?0:t,"g"),b:l(t=>t>=255?255:t<0?0:t,"b"),h:l(t=>t%360,"h"),s:l(t=>t>=100?100:t<0?0:t,"s"),l:l(t=>t>=100?100:t<0?0:t,"l"),a:l(t=>t>=1?1:t<0?0:t,"a")},toLinear:l(t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:l((t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),"hue2rgb"),hsl2rgb:l(({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let a=r<.5?r*(1+e):r+e-r*e,n=2*r-a;switch(i){case"r":return po.hue2rgb(n,a,t+.3333333333333333)*255;case"g":return po.hue2rgb(n,a,t)*255;case"b":return po.hue2rgb(n,a,t-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:l(({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;let a=Math.max(t,e,r),n=Math.min(t,e,r),s=(a+n)/2;if(i==="l")return s*100;if(a===n)return 0;let o=a-n,c=s>.5?o/(2-a-n):o/(a+n);if(i==="s")return c*100;switch(a){case t:return((e-r)/o+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:l(t=>Math.round(t*1e10)/1e10,"round")},I_=O_,P_={dec2hex:l(t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`},"dec2hex")},R_=P_,N_={channel:D_,lang:I_,unit:R_},lt=N_,ar={};for(let t=0;t<=255;t++)ar[t]=lt.unit.dec2hex(t);var Ut={ALL:0,RGB:1,HSL:2},vi,z_=(vi=class{constructor(){this.type=Ut.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ut.ALL}is(e){return this.type===e}},l(vi,"Type"),vi),q_=z_,_i,W_=(_i=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new q_}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Ut.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:i,l:a}=e;r===void 0&&(e.h=lt.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=lt.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=lt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:i,b:a}=e;r===void 0&&(e.r=lt.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=lt.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=lt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(Ut.HSL)&&r!==void 0?r:(this._ensureHSL(),lt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(Ut.RGB)&&r!==void 0?r:(this._ensureRGB(),lt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ut.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ut.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ut.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ut.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ut.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ut.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},l(_i,"Channels"),_i),j_=W_,H_=new j_({r:0,g:0,b:0,a:0},"transparent"),Bs=H_,Q1={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:l(t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Q1.re);if(!e)return;let r=e[1],i=parseInt(r,16),a=r.length,n=a%4===0,s=a>4,o=s?1:17,c=s?8:4,h=n?0:-1,u=s?255:15;return Bs.set({r:(i>>c*(h+3)&u)*o,g:(i>>c*(h+2)&u)*o,b:(i>>c*(h+1)&u)*o,a:n?(i&u)*o/255:1},t)},"parse"),stringify:l(t=>{let{r:e,g:r,b:i,a}=t;return a<1?`#${ar[Math.round(e)]}${ar[Math.round(r)]}${ar[Math.round(i)]}${ar[Math.round(a*255)]}`:`#${ar[Math.round(e)]}${ar[Math.round(r)]}${ar[Math.round(i)]}`},"stringify")},Da=Q1,fo={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:l(t=>{let e=t.match(fo.hueRe);if(e){let[,r,i]=e;switch(i){case"grad":return lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return lt.channel.clamp.h(parseFloat(r)*360)}}return lt.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:l(t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(fo.re);if(!r)return;let[,i,a,n,s,o]=r;return Bs.set({h:fo._hue2deg(i),s:lt.channel.clamp.s(parseFloat(a)),l:lt.channel.clamp.l(parseFloat(n)),a:s?lt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:l(t=>{let{h:e,s:r,l:i,a}=t;return a<1?`hsla(${lt.lang.round(e)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%, ${a})`:`hsl(${lt.lang.round(e)}, ${lt.lang.round(r)}%, ${lt.lang.round(i)}%)`},"stringify")},Yn=fo,go={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:l(t=>{t=t.toLowerCase();let e=go.colors[t];if(e)return Da.parse(e)},"parse"),stringify:l(t=>{let e=Da.stringify(t);for(let r in go.colors)if(go.colors[r]===e)return r},"stringify")},Zd=go,J1={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:l(t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(J1.re);if(!r)return;let[,i,a,n,s,o,c,h,u]=r;return Bs.set({r:lt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:lt.channel.clamp.g(s?parseFloat(n)*2.55:parseFloat(n)),b:lt.channel.clamp.b(c?parseFloat(o)*2.55:parseFloat(o)),a:h?lt.channel.clamp.a(u?parseFloat(h)/100:parseFloat(h)):1},t)},"parse"),stringify:l(t=>{let{r:e,g:r,b:i,a}=t;return a<1?`rgba(${lt.lang.round(e)}, ${lt.lang.round(r)}, ${lt.lang.round(i)}, ${lt.lang.round(a)})`:`rgb(${lt.lang.round(e)}, ${lt.lang.round(r)}, ${lt.lang.round(i)})`},"stringify")},Vn=J1,U_={format:{keyword:Zd,hex:Da,rgb:Vn,rgba:Vn,hsl:Yn,hsla:Yn},parse:l(t=>{if(typeof t!="string")return t;let e=Da.parse(t)||Vn.parse(t)||Yn.parse(t)||Zd.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:l(t=>!t.changed&&t.color?t.color:t.type.is(Ut.HSL)||t.data.r===void 0?Yn.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Vn.stringify(t):Da.stringify(t),"stringify")},Te=U_,Y_=l((t,e)=>{let r=Te.parse(t);for(let i in e)r[i]=lt.channel.clamp[i](e[i]);return Te.stringify(r)},"change"),K1=Y_,V_=l((t,e,r=0,i=1)=>{if(typeof t!="number")return K1(t,{a:e});let a=Bs.set({r:lt.channel.clamp.r(t),g:lt.channel.clamp.g(e),b:lt.channel.clamp.b(r),a:lt.channel.clamp.a(i)});return Te.stringify(a)},"rgba"),Oa=V_,G_=l((t,e)=>lt.lang.round(Te.parse(t)[e]),"channel"),wE=G_,X_=l(t=>{let{r:e,g:r,b:i}=Te.parse(t),a=.2126*lt.channel.toLinear(e)+.7152*lt.channel.toLinear(r)+.0722*lt.channel.toLinear(i);return lt.lang.round(a)},"luminance"),Z_=X_,Q_=l(t=>Z_(t)>=.5,"isLight"),J_=Q_,K_=l(t=>!J_(t),"isDark"),Tn=K_,tS=l((t,e,r)=>{let i=Te.parse(t),a=i[e],n=lt.channel.clamp[e](a+r);return a!==n&&(i[e]=n),Te.stringify(i)},"adjustChannel"),Cu=tS,eS=l((t,e)=>Cu(t,"l",e),"lighten"),X=eS,rS=l((t,e)=>Cu(t,"l",-e),"darken"),at=rS,iS=l((t,e)=>Cu(t,"a",-e),"transparentize"),vE=iS,aS=l((t,e)=>{let r=Te.parse(t),i={};for(let a in e)e[a]&&(i[a]=r[a]+e[a]);return K1(t,i)},"adjust"),v=aS,nS=l((t,e,r=50)=>{let{r:i,g:a,b:n,a:s}=Te.parse(t),{r:o,g:c,b:h,a:u}=Te.parse(e),d=r/100,p=d*2-1,f=s-u,g=((p*f===-1?p:(p+f)/(1+p*f))+1)/2,y=1-g,m=i*g+o*y,x=a*g+c*y,b=n*g+h*y,k=s*d+u*(1-d);return Oa(m,x,b,k)},"mix"),oS=nS,sS=l((t,e=100)=>{let r=Te.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,oS(r,t,e)},"invert"),j=sS,As="#ffffff",Ls="#f2f2f2",te=l((t,e)=>e?v(t,{s:-40,l:10}):v(t,{s:-40,l:-10}),"mkBorder"),Si,lS=(Si=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?at(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||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(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||X(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||at(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10)):(this.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||X(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Si,"Theme"),Si),hS=l(t=>{let e=new lS;return e.calculate(t),e},"getThemeVariables"),Ti,cS=(Ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=X(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=j(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=X(j("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oa(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=at("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=at(this.sectionBkgColor,10),this.taskBorderColor=Oa(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oa(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||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=X(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=X(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=X(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=j(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=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330});for(let e=0;e{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Ti,"Theme"),Ti),uS=l(t=>{let e=new cS;return e.calculate(t),e},"getThemeVariables"),Mi,dS=(Mi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=v(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Oa(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let e=0;e{this[i]==="calculated"&&(this[i]=void 0)}),typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Mi,"Theme"),Mi),pS=l(t=>{let e=new dS;return e.calculate(t),e},"getThemeVariables"),Bi,fS=(Bi=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=X("#cde498",10),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.primaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=at(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||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let e=0;e{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Bi,"Theme"),Bi),gS=l(t=>{let e=new fS;return e.calculate(t),e},"getThemeVariables"),Ai,yS=(Ai=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=X(this.contrast,55),this.background="#ffffff",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.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.rowOdd=this.rowOdd||X(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=X(this.contrast,55),this.border2=this.contrast,this.actorBorder=X(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 e=0;e{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}},l(Ai,"Theme"),Ai),mS=l(t=>{let e=new yS;return e.calculate(t),e},"getThemeVariables"),Xe={base:{getThemeVariables:hS},dark:{getThemeVariables:uS},default:{getThemeVariables:pS},forest:{getThemeVariables:gS},neutral:{getThemeVariables:mS}},ce={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},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},tx={...ce,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Xe.default.getThemeVariables(),sequence:{...ce.sequence,messageFont:l(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:l(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:l(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ce.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ce.c4,useWidth:void 0,personFont:l(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ce.flowchart,inheritDir:!1},external_personFont:l(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:l(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:l(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:l(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:l(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:l(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:l(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:l(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:l(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:l(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:l(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:l(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:l(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:l(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:l(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:l(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:l(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:l(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:l(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:l(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:l(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ce.pie,useWidth:984},xyChart:{...ce.xyChart,useWidth:void 0},requirement:{...ce.requirement,useWidth:void 0},packet:{...ce.packet},radar:{...ce.radar},ishikawa:{...ce.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ce.venn}},ex=l((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...ex(t[i],"")]:[...r,e+i],[]),"keyify"),xS=new Set(ex(tx,"")),rx=tx,zo=l(t=>{if(P.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>zo(e));return}for(let e of Object.keys(t)){if(P.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xS.has(e)||t[e]==null){P.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){P.debug("sanitizing object",e),zo(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)e.includes(i)&&(P.debug("sanitizing css option",e),t[e]=bS(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}P.debug("After sanitization",t)}},"sanitizeDirective"),bS=l(t=>{let e=0,r=0;for(let i of t){if(e!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),ne=Dt({},Zi),qo,Nr=[],Ia=Dt({},Zi),Fs=l((t,e)=>{let r=Dt({},t),i={};for(let a of e)nx(a),i=Dt(i,a);if(r=Dt(r,i),i.theme&&i.theme in Xe){let a=Dt({},qo),n=Dt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in Xe&&(r.themeVariables=Xe[r.theme].getThemeVariables(n))}return Ia=r,sx(Ia),Ia},"updateCurrentConfig"),kS=l(t=>(ne=Dt({},Zi),ne=Dt(ne,t),t.theme&&Xe[t.theme]&&(ne.themeVariables=Xe[t.theme].getThemeVariables(t.themeVariables)),Fs(ne,Nr),ne),"setSiteConfig"),CS=l(t=>{qo=Dt({},t)},"saveConfigFromInitialize"),$S=l(t=>(ne=Dt(ne,t),Fs(ne,Nr),ne),"updateSiteConfig"),ix=l(()=>Dt({},ne),"getSiteConfig"),ax=l(t=>(sx(t),Dt(Ia,t),Vt()),"setConfig"),Vt=l(()=>Dt({},Ia),"getConfig"),nx=l(t=>{t&&(["secure",...ne.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(P.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&nx(t[e])}))},"sanitize"),wS=l(t=>{zo(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Nr.push(t),Fs(ne,Nr)},"addDirective"),Wo=l((t=ne)=>{Nr=[],Fs(t,Nr)},"reset"),vS={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."},Qd={},ox=l(t=>{Qd[t]||(P.warn(vS[t]),Qd[t]=!0)},"issueWarning"),sx=l(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ox("LAZY_LOAD_DEPRECATED")},"checkConfig"),_E=l(()=>{let t={};qo&&(t=Dt(t,qo));for(let e of Nr)t=Dt(t,e);return t},"getUserDefinedConfig"),Zt=l(t=>(t.flowchart?.htmlLabels!=null&&ox("FLOWCHART_HTML_LABELS_DEPRECATED"),kr(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),{entries:lx,setPrototypeOf:Jd,isFrozen:_S,getPrototypeOf:SS,getOwnPropertyDescriptor:TS}=Object,{freeze:ie,seal:fe,create:ch}=Object,{apply:uh,construct:dh}=typeof Reflect<"u"&&Reflect;ie||(ie=l(function(t){return t},"freeze"));fe||(fe=l(function(t){return t},"seal"));uh||(uh=l(function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a1?e-1:0),i=1;i1?r-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:yo;Jd&&Jd(t,null);let i=e.length;for(;i--;){let a=e[i];if(typeof a=="string"){let n=r(a);n!==a&&(_S(e)||(e[i]=n),a=n)}t[a]=!0}return t}l(dt,"addToSet");function cx(t){for(let e=0;e/gm),IS=fe(/\$\{[\w\W]*/gm),PS=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),RS=fe(/^aria-[\-\w]+$/),ux=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NS=fe(/^(?:\w+script|data):/i),zS=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dx=fe(/^html$/i),qS=fe(/^[a-z][.\w]*(-[.\w]+)+$/i),ap=Object.freeze({__proto__:null,ARIA_ATTR:RS,ATTR_WHITESPACE:zS,CUSTOM_ELEMENT:qS,DATA_ATTR:PS,DOCTYPE_NAME:dx,ERB_EXPR:OS,IS_ALLOWED_URI:ux,IS_SCRIPT_OR_DATA:NS,MUSTACHE_EXPR:DS,TMPLIT_EXPR:IS}),ga={element:1,text:3,progressingInstruction:7,comment:8,document:9},WS=l(function(){return typeof window>"u"?null:window},"getGlobal"),jS=l(function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},"_createTrustedTypesPolicy"),np=l(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");function $u(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WS(),e=l(C=>$u(C),"DOMPurify");if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==ga.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t,i=r,a=i.currentScript,{DocumentFragment:n,HTMLTemplateElement:s,Node:o,Element:c,NodeFilter:h,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=t,g=c.prototype,y=si(g,"cloneNode"),m=si(g,"remove"),x=si(g,"nextSibling"),b=si(g,"childNodes"),k=si(g,"parentNode");if(typeof s=="function"){let C=r.createElement("template");C.content&&C.content.ownerDocument&&(r=C.content.ownerDocument)}let _,w="",{implementation:$,createNodeIterator:T,createDocumentFragment:O,getElementsByTagName:R}=r,{importNode:I}=i,S=np();e.isSupported=typeof lx=="function"&&typeof k=="function"&&$&&$.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:D,ERB_EXPR:A,TMPLIT_EXPR:B,DATA_ATTR:L,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:E,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:z}=ap,{IS_ALLOWED_URI:V}=ap,G=null,Z=dt({},[...tp,...gl,...yl,...ml,...ep]),U=null,ct=dt({},[...rp,...xl,...ip,...Xn]),et=Object.seal(ch(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}})),wt=null,Ct=null,Tt=Object.seal(ch(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),q=!0,rt=!0,ht=!1,N=!0,$t=!1,yt=!0,Bt=!1,Pt=!1,me=!1,Ne=!1,Pn=!1,Rn=!1,kd=!0,Cd=!1,ov="user-content-",Ks=!0,ha=!1,Jr={},Ae=null,tl=dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$d=null,wd=dt({},["audio","video","img","source","image","track"]),el=null,vd=dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nn="http://www.w3.org/1998/Math/MathML",zn="http://www.w3.org/2000/svg",ze="http://www.w3.org/1999/xhtml",Kr=ze,rl=!1,il=null,sv=dt({},[Nn,zn,ze],pl),qn=dt({},["mi","mo","mn","ms","mtext"]),Wn=dt({},["annotation-xml"]),lv=dt({},["title","style","font","a","script"]),ca=null,hv=["application/xhtml+xml","text/html"],cv="text/html",Et=null,ti=null,uv=r.createElement("form"),_d=l(function(C){return C instanceof RegExp||C instanceof Function},"isRegexOrFunction"),al=l(function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ti&&ti===C)){if((!C||typeof C!="object")&&(C={}),C=Ce(C),ca=hv.indexOf(C.PARSER_MEDIA_TYPE)===-1?cv:C.PARSER_MEDIA_TYPE,Et=ca==="application/xhtml+xml"?pl:yo,G=ke(C,"ALLOWED_TAGS")?dt({},C.ALLOWED_TAGS,Et):Z,U=ke(C,"ALLOWED_ATTR")?dt({},C.ALLOWED_ATTR,Et):ct,il=ke(C,"ALLOWED_NAMESPACES")?dt({},C.ALLOWED_NAMESPACES,pl):sv,el=ke(C,"ADD_URI_SAFE_ATTR")?dt(Ce(vd),C.ADD_URI_SAFE_ATTR,Et):vd,$d=ke(C,"ADD_DATA_URI_TAGS")?dt(Ce(wd),C.ADD_DATA_URI_TAGS,Et):wd,Ae=ke(C,"FORBID_CONTENTS")?dt({},C.FORBID_CONTENTS,Et):tl,wt=ke(C,"FORBID_TAGS")?dt({},C.FORBID_TAGS,Et):Ce({}),Ct=ke(C,"FORBID_ATTR")?dt({},C.FORBID_ATTR,Et):Ce({}),Jr=ke(C,"USE_PROFILES")?C.USE_PROFILES:!1,q=C.ALLOW_ARIA_ATTR!==!1,rt=C.ALLOW_DATA_ATTR!==!1,ht=C.ALLOW_UNKNOWN_PROTOCOLS||!1,N=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$t=C.SAFE_FOR_TEMPLATES||!1,yt=C.SAFE_FOR_XML!==!1,Bt=C.WHOLE_DOCUMENT||!1,Ne=C.RETURN_DOM||!1,Pn=C.RETURN_DOM_FRAGMENT||!1,Rn=C.RETURN_TRUSTED_TYPE||!1,me=C.FORCE_BODY||!1,kd=C.SANITIZE_DOM!==!1,Cd=C.SANITIZE_NAMED_PROPS||!1,Ks=C.KEEP_CONTENT!==!1,ha=C.IN_PLACE||!1,V=C.ALLOWED_URI_REGEXP||ux,Kr=C.NAMESPACE||ze,qn=C.MATHML_TEXT_INTEGRATION_POINTS||qn,Wn=C.HTML_INTEGRATION_POINTS||Wn,et=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&_d(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(et.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&_d(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(et.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(et.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$t&&(rt=!1),Pn&&(Ne=!0),Jr&&(G=dt({},ep),U=[],Jr.html===!0&&(dt(G,tp),dt(U,rp)),Jr.svg===!0&&(dt(G,gl),dt(U,xl),dt(U,Xn)),Jr.svgFilters===!0&&(dt(G,yl),dt(U,xl),dt(U,Xn)),Jr.mathMl===!0&&(dt(G,ml),dt(U,ip),dt(U,Xn))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?Tt.tagCheck=C.ADD_TAGS:(G===Z&&(G=Ce(G)),dt(G,C.ADD_TAGS,Et))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?Tt.attributeCheck=C.ADD_ATTR:(U===ct&&(U=Ce(U)),dt(U,C.ADD_ATTR,Et))),C.ADD_URI_SAFE_ATTR&&dt(el,C.ADD_URI_SAFE_ATTR,Et),C.FORBID_CONTENTS&&(Ae===tl&&(Ae=Ce(Ae)),dt(Ae,C.FORBID_CONTENTS,Et)),C.ADD_FORBID_CONTENTS&&(Ae===tl&&(Ae=Ce(Ae)),dt(Ae,C.ADD_FORBID_CONTENTS,Et)),Ks&&(G["#text"]=!0),Bt&&dt(G,["html","head","body"]),G.table&&(dt(G,["tbody"]),delete wt.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw fa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=C.TRUSTED_TYPES_POLICY,w=_.createHTML("")}else _===void 0&&(_=jS(f,a)),_!==null&&typeof w=="string"&&(w=_.createHTML(""));ie&&ie(C),ti=C}},"_parseConfig"),Sd=dt({},[...gl,...yl,...FS]),Td=dt({},[...ml,...ES]),dv=l(function(C){let Y=k(C);(!Y||!Y.tagName)&&(Y={namespaceURI:Kr,tagName:"template"});let W=yo(C.tagName),kt=yo(Y.tagName);return il[C.namespaceURI]?C.namespaceURI===zn?Y.namespaceURI===ze?W==="svg":Y.namespaceURI===Nn?W==="svg"&&(kt==="annotation-xml"||qn[kt]):!!Sd[W]:C.namespaceURI===Nn?Y.namespaceURI===ze?W==="math":Y.namespaceURI===zn?W==="math"&&Wn[kt]:!!Td[W]:C.namespaceURI===ze?Y.namespaceURI===zn&&!Wn[kt]||Y.namespaceURI===Nn&&!qn[kt]?!1:!Td[W]&&(lv[W]||!Sd[W]):!!(ca==="application/xhtml+xml"&&il[C.namespaceURI]):!1},"_checkValidNamespace"),$r=l(function(C){da(e.removed,{element:C});try{k(C).removeChild(C)}catch{m(C)}},"_forceRemove"),wr=l(function(C,Y){try{da(e.removed,{attribute:Y.getAttributeNode(C),from:Y})}catch{da(e.removed,{attribute:null,from:Y})}if(Y.removeAttribute(C),C==="is")if(Ne||Pn)try{$r(Y)}catch{}else try{Y.setAttribute(C,"")}catch{}},"_removeAttribute"),Md=l(function(C){let Y=null,W=null;if(me)C=""+C;else{let St=fl(C,/^[\r\n\t ]+/);W=St&&St[0]}ca==="application/xhtml+xml"&&Kr===ze&&(C=''+C+"");let kt=_?_.createHTML(C):C;if(Kr===ze)try{Y=new p().parseFromString(kt,ca)}catch{}if(!Y||!Y.documentElement){Y=$.createDocument(Kr,"template",null);try{Y.documentElement.innerHTML=rl?w:kt}catch{}}let Rt=Y.body||Y.documentElement;return C&&W&&Rt.insertBefore(r.createTextNode(W),Rt.childNodes[0]||null),Kr===ze?R.call(Y,Bt?"html":"body")[0]:Bt?Y.documentElement:Rt},"_initDocument"),Bd=l(function(C){return T.call(C.ownerDocument||C,C,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),nl=l(function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof u)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},"_isClobbered"),Ad=l(function(C){return typeof o=="function"&&C instanceof o},"_isNode");function Le(C,Y,W){Gn(C,kt=>{kt.call(e,Y,W,ti)})}l(Le,"_executeHooks");let Ld=l(function(C){let Y=null;if(Le(S.beforeSanitizeElements,C,null),nl(C))return $r(C),!0;let W=Et(C.nodeName);if(Le(S.uponSanitizeElement,C,{tagName:W,allowedTags:G}),yt&&C.hasChildNodes()&&!Ad(C.firstElementChild)&&Kt(/<[/\w!]/g,C.innerHTML)&&Kt(/<[/\w!]/g,C.textContent)||C.nodeType===ga.progressingInstruction||yt&&C.nodeType===ga.comment&&Kt(/<[/\w]/g,C.data))return $r(C),!0;if(!(Tt.tagCheck instanceof Function&&Tt.tagCheck(W))&&(!G[W]||wt[W])){if(!wt[W]&&Ed(W)&&(et.tagNameCheck instanceof RegExp&&Kt(et.tagNameCheck,W)||et.tagNameCheck instanceof Function&&et.tagNameCheck(W)))return!1;if(Ks&&!Ae[W]){let kt=k(C)||C.parentNode,Rt=b(C)||C.childNodes;if(Rt&&kt){let St=Rt.length;for(let qe=St-1;qe>=0;--qe){let xe=y(Rt[qe],!0);xe.__removalCount=(C.__removalCount||0)+1,kt.insertBefore(xe,x(C))}}}return $r(C),!0}return C instanceof c&&!dv(C)||(W==="noscript"||W==="noembed"||W==="noframes")&&Kt(/<\/no(script|embed|frames)/i,C.innerHTML)?($r(C),!0):($t&&C.nodeType===ga.text&&(Y=C.textContent,Gn([D,A,B],kt=>{Y=pa(Y,kt," ")}),C.textContent!==Y&&(da(e.removed,{element:C.cloneNode()}),C.textContent=Y)),Le(S.afterSanitizeElements,C,null),!1)},"_sanitizeElements"),Fd=l(function(C,Y,W){if(kd&&(Y==="id"||Y==="name")&&(W in r||W in uv))return!1;if(!(rt&&!Ct[Y]&&Kt(L,Y))&&!(q&&Kt(M,Y))&&!(Tt.attributeCheck instanceof Function&&Tt.attributeCheck(Y,C))){if(!U[Y]||Ct[Y]){if(!(Ed(C)&&(et.tagNameCheck instanceof RegExp&&Kt(et.tagNameCheck,C)||et.tagNameCheck instanceof Function&&et.tagNameCheck(C))&&(et.attributeNameCheck instanceof RegExp&&Kt(et.attributeNameCheck,Y)||et.attributeNameCheck instanceof Function&&et.attributeNameCheck(Y,C))||Y==="is"&&et.allowCustomizedBuiltInElements&&(et.tagNameCheck instanceof RegExp&&Kt(et.tagNameCheck,W)||et.tagNameCheck instanceof Function&&et.tagNameCheck(W))))return!1}else if(!el[Y]&&!Kt(V,pa(W,F,""))&&!((Y==="src"||Y==="xlink:href"||Y==="href")&&C!=="script"&&AS(W,"data:")===0&&$d[C])&&!(ht&&!Kt(E,pa(W,F,"")))&&W)return!1}return!0},"_isValidAttribute"),Ed=l(function(C){return C!=="annotation-xml"&&fl(C,z)},"_isBasicCustomElement"),Dd=l(function(C){Le(S.beforeSanitizeAttributes,C,null);let{attributes:Y}=C;if(!Y||nl(C))return;let W={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0},kt=Y.length;for(;kt--;){let Rt=Y[kt],{name:St,namespaceURI:qe,value:xe}=Rt,be=Et(St),ol=xe,Nt=St==="value"?ol:LS(ol);if(W.attrName=be,W.attrValue=Nt,W.keepAttr=!0,W.forceKeepAttr=void 0,Le(S.uponSanitizeAttribute,C,W),Nt=W.attrValue,Cd&&(be==="id"||be==="name")&&(wr(St,C),Nt=ov+Nt),yt&&Kt(/((--!?|])>)|<\/(style|title|textarea)/i,Nt)){wr(St,C);continue}if(be==="attributename"&&fl(Nt,"href")){wr(St,C);continue}if(W.forceKeepAttr)continue;if(!W.keepAttr){wr(St,C);continue}if(!N&&Kt(/\/>/i,Nt)){wr(St,C);continue}$t&&Gn([D,A,B],fv=>{Nt=pa(Nt,fv," ")});let Od=Et(C.nodeName);if(!Fd(Od,be,Nt)){wr(St,C);continue}if(_&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!qe)switch(f.getAttributeType(Od,be)){case"TrustedHTML":{Nt=_.createHTML(Nt);break}case"TrustedScriptURL":{Nt=_.createScriptURL(Nt);break}}if(Nt!==ol)try{qe?C.setAttributeNS(qe,St,Nt):C.setAttribute(St,Nt),nl(C)?$r(C):Kd(e.removed)}catch{wr(St,C)}}Le(S.afterSanitizeAttributes,C,null)},"_sanitizeAttributes"),pv=l(function C(Y){let W=null,kt=Bd(Y);for(Le(S.beforeSanitizeShadowDOM,Y,null);W=kt.nextNode();)Le(S.uponSanitizeShadowNode,W,null),Ld(W),Dd(W),W.content instanceof n&&C(W.content);Le(S.afterSanitizeShadowDOM,Y,null)},"_sanitizeShadowDOM");return e.sanitize=function(C){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,kt=null,Rt=null,St=null;if(rl=!C,rl&&(C=""),typeof C!="string"&&!Ad(C))if(typeof C.toString=="function"){if(C=C.toString(),typeof C!="string")throw fa("dirty is not a string, aborting")}else throw fa("toString is not a function");if(!e.isSupported)return C;if(Pt||al(Y),e.removed=[],typeof C=="string"&&(ha=!1),ha){if(C.nodeName){let be=Et(C.nodeName);if(!G[be]||wt[be])throw fa("root node is forbidden and cannot be sanitized in-place")}}else if(C instanceof o)W=Md(""),kt=W.ownerDocument.importNode(C,!0),kt.nodeType===ga.element&&kt.nodeName==="BODY"||kt.nodeName==="HTML"?W=kt:W.appendChild(kt);else{if(!Ne&&!$t&&!Bt&&C.indexOf("<")===-1)return _&&Rn?_.createHTML(C):C;if(W=Md(C),!W)return Ne?null:Rn?w:""}W&&me&&$r(W.firstChild);let qe=Bd(ha?C:W);for(;Rt=qe.nextNode();)Ld(Rt),Dd(Rt),Rt.content instanceof n&&pv(Rt.content);if(ha)return C;if(Ne){if(Pn)for(St=O.call(W.ownerDocument);W.firstChild;)St.appendChild(W.firstChild);else St=W;return(U.shadowroot||U.shadowrootmode)&&(St=I.call(i,St,!0)),St}let xe=Bt?W.outerHTML:W.innerHTML;return Bt&&G["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Kt(dx,W.ownerDocument.doctype.name)&&(xe=" `+xe),$t&&Gn([D,A,B],be=>{xe=pa(xe,be," ")}),_&&Rn?_.createHTML(xe):xe},e.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};al(C),Pt=!0},e.clearConfig=function(){ti=null,Pt=!1},e.isValidAttribute=function(C,Y,W){ti||al({});let kt=Et(C),Rt=Et(Y);return Fd(kt,Rt,W)},e.addHook=function(C,Y){typeof Y=="function"&&da(S[C],Y)},e.removeHook=function(C,Y){if(Y!==void 0){let W=MS(S[C],Y);return W===-1?void 0:BS(S[C],W,1)[0]}return Kd(S[C])},e.removeHooks=function(C){S[C]=[]},e.removeAllHooks=function(){S=np()},e}l($u,"createDOMPurify");var Qi=$u(),Mn=//gi,HS=l(t=>t?gx(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),US=(()=>{let t=!1;return()=>{t||(px(),t=!0)}})();function px(){let t="data-temp-href-target";Qi.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Qi.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}l(px,"setupDompurifyHooks");var fx=l(t=>(US(),Qi.sanitize(t)),"removeScript"),op=l((t,e)=>{if(Zt(e)){let r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?t=fx(t):r!=="loose"&&(t=gx(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=XS(t))}return t},"sanitizeMore"),Me=l((t,e)=>t&&(e.dompurifyConfig?t=Qi.sanitize(op(t,e),e.dompurifyConfig).toString():t=Qi.sanitize(op(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),YS=l((t,e)=>typeof t=="string"?Me(t,e):t.flat().map(r=>Me(r,e)),"sanitizeTextOrArray"),VS=l(t=>Mn.test(t),"hasBreaks"),GS=l(t=>t.split(Mn),"splitBreaks"),XS=l(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),gx=l(t=>t.replace(Mn,"#br#"),"breakToPlaceholder"),ZS=l(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),QS=l(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),JS=l(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),sp=l(function(t){let e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),"countOccurrence"),KS=l((t,e)=>{let r=ph(t,"~"),i=ph(e,"~");return r===1&&i===1},"shouldCombineSets"),tT=l(t=>{let e=ph(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let i=[...t],a=i.indexOf("~"),n=i.lastIndexOf("~");for(;a!==-1&&n!==-1&&a!==n;)i[a]="<",i[n]=">",a=i.indexOf("~"),n=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),lp=l(()=>window.MathMLElement!==void 0,"isMathMLSupported"),fh=/\$\$(.*)\$\$/g,on=l(t=>(t.match(fh)?.length??0)>0,"hasKatex"),SE=l(async(t,e)=>{let r=document.createElement("div");r.innerHTML=await yx(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),eT=l(async(t,e)=>{if(!on(t))return t;if(!(lp()||e.legacyMathML||e.forceLegacyMathML))return t.replace(fh,"MathML is unsupported in this environment.");{let{default:r}=await gt(()=>import("./katex-GD7MH7QM-DGjPZnL0.js"),__vite__mapDeps([0,1])),i=e.forceLegacyMathML||!lp()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Mn).map(a=>on(a)?`
${a}
`:`
${a}
`).join("").replace(fh,(a,n)=>r.renderToString(n,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),yx=l(async(t,e)=>Me(await eT(t,e),e),"renderKatexSanitized"),Bn={getRows:HS,sanitizeText:Me,sanitizeTextOrArray:YS,hasBreaks:VS,splitBreaks:GS,lineBreakRegex:Mn,removeScript:fx,getUrl:ZS,evaluate:kr,getMax:QS,getMin:JS},rT=l(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),iT=l(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),mx=l(function(t,e,r,i){let a=iT(e,r,i);rT(t,a)},"configureSvgSize"),aT=l(function(t,e,r,i){let a=e.node().getBBox(),n=a.width,s=a.height;P.info(`SVG bounds: ${n}x${s}`,a);let o=0,c=0;P.info(`Graph bounds: ${o}x${c}`,t),o=n+r*2,c=s+r*2,P.info(`Calculated bounds: ${o}x${c}`),mx(e,c,o,i);let h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),mo={},nT=l((t,e,r)=>{let i="";return t in mo&&mo[t]?i=mo[t](r):P.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: 1px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${i} ${e} `},"getStyles"),oT=l((t,e)=>{e!==void 0&&(mo[t]=e)},"addStylesForDiagram"),sT=nT,xx={};$v(xx,{clear:()=>lT,getAccDescription:()=>dT,getAccTitle:()=>cT,getDiagramTitle:()=>fT,setAccDescription:()=>uT,setAccTitle:()=>hT,setDiagramTitle:()=>pT});var wu="",vu="",_u="",Su=l(t=>Me(t,Vt()),"sanitizeText"),lT=l(()=>{wu="",_u="",vu=""},"clear"),hT=l(t=>{wu=Su(t).replace(/^\s+/g,"")},"setAccTitle"),cT=l(()=>wu,"getAccTitle"),uT=l(t=>{_u=Su(t).replace(/\n\s+/g,` `)},"setAccDescription"),dT=l(()=>_u,"getAccDescription"),pT=l(t=>{vu=Su(t)},"setDiagramTitle"),fT=l(()=>vu,"getDiagramTitle"),hp=P,gT=lc,xt=Vt,TE=ax,ME=Zi,Tu=l(t=>Me(t,xt()),"sanitizeText"),yT=aT,mT=l(()=>xx,"getCommonDb"),jo={},Ho=l((t,e,r)=>{jo[t]&&hp.warn(`Diagram with id ${t} already registered. Overwriting.`),jo[t]=e,r&&Z1(t,r),oT(t,e.styles),e.injectUtils?.(hp,gT,xt,Tu,yT,mT(),()=>{})},"registerDiagram"),gh=l(t=>{if(t in jo)return jo[t];throw new xT(t)},"getDiagram"),Li,xT=(Li=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},l(Li,"DiagramNotFoundError"),Li);/*! Bundled license information: dompurify/dist/purify.es.mjs: (*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE *) */var bT=l(t=>{let{securityLevel:e}=xt(),r=ut("body");if(e==="sandbox"){let i=ut(`#i${t}`).node()?.contentDocument??document;r=ut(i.body)}return r.select(`#${t}`)},"selectSvgElement");function Mu(t){return typeof t>"u"||t===null}l(Mu,"isNothing");function bx(t){return typeof t=="object"&&t!==null}l(bx,"isObject");function kx(t){return Array.isArray(t)?t:Mu(t)?[]:[t]}l(kx,"toArray");function Cx(t,e){var r,i,a,n;if(e)for(n=Object.keys(e),r=0,i=n.length;ro&&(n=" ... ",e=i-o+n.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:n+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+n.length}}l(xo,"getLine");function bo(t,e){return Ot.repeat(" ",e-t.length)+t}l(bo,"padStart");function vx(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],n,s=-1;n=r.exec(t.buffer);)a.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",c,h,u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(c=1;c<=e.linesBefore&&!(s-c<0);c++)h=xo(t.buffer,i[s-c],a[s-c],t.position-(i[s]-i[s-c]),d),o=Ot.repeat(" ",e.indent)+bo((t.line-c+1).toString(),u)+" | "+h.str+` `+o;for(h=xo(t.buffer,i[s],a[s],t.position,d),o+=Ot.repeat(" ",e.indent)+bo((t.line+1).toString(),u)+" | "+h.str+` `,o+=Ot.repeat("-",e.indent+u+3+h.pos)+`^ `,c=1;c<=e.linesAfter&&!(s+c>=a.length);c++)h=xo(t.buffer,i[s+c],a[s+c],t.position-(i[s]-i[s+c]),d),o+=Ot.repeat(" ",e.indent)+bo((t.line+c+1).toString(),u)+" | "+h.str+` `;return o.replace(/\n$/,"")}l(vx,"makeSnippet");var ST=vx,TT=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],MT=["scalar","sequence","mapping"];function _x(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}l(_x,"compileStyleAliases");function Sx(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(TT.indexOf(r)===-1)throw new oe('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=_x(e.styleAliases||null),MT.indexOf(this.kind)===-1)throw new oe('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}l(Sx,"Type$1");var Gt=Sx;function yh(t,e){var r=[];return t[e].forEach(function(i){var a=r.length;r.forEach(function(n,s){n.tag===i.tag&&n.kind===i.kind&&n.multi===i.multi&&(a=s)}),r[a]=i}),r}l(yh,"compileList");function Tx(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(a){a.multi?(t.multi[a.kind].push(a),t.multi.fallback.push(a)):t[a.kind][a.tag]=t.fallback[a.tag]=a}for(l(i,"collectType"),e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:l(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:l(function(t){return t.toString(10)},"decimal"),hexadecimal:l(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),PT=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function zx(t){return!(t===null||!PT.test(t)||t[t.length-1]==="_")}l(zx,"resolveYamlFloat");function qx(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}l(qx,"constructYamlFloat");var RT=/^[-+]?[0-9]+e/;function Wx(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ot.isNegativeZero(t))return"-0.0";return r=t.toString(10),RT.test(r)?r.replace("e",".e"):r}l(Wx,"representYamlFloat");function jx(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ot.isNegativeZero(t))}l(jx,"isFloat");var NT=new Gt("tag:yaml.org,2002:float",{kind:"scalar",resolve:zx,construct:qx,predicate:jx,represent:Wx,defaultStyle:"lowercase"}),Hx=ET.extend({implicit:[DT,OT,IT,NT]}),zT=Hx,Ux=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yx=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 Vx(t){return t===null?!1:Ux.exec(t)!==null||Yx.exec(t)!==null}l(Vx,"resolveYamlTimestamp");function Gx(t){var e,r,i,a,n,s,o,c=0,h=null,u,d,p;if(e=Ux.exec(t),e===null&&(e=Yx.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,i,a));if(n=+e[4],s=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=+e[10],d=+(e[11]||0),h=(u*60+d)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,a,n,s,o,c)),h&&p.setTime(p.getTime()-h),p}l(Gx,"constructYamlTimestamp");function Xx(t){return t.toISOString()}l(Xx,"representYamlTimestamp");var qT=new Gt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Vx,construct:Gx,instanceOf:Date,represent:Xx});function Zx(t){return t==="<<"||t===null}l(Zx,"resolveYamlMerge");var WT=new Gt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Zx}),Au=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function Qx(t){if(t===null)return!1;var e,r,i=0,a=t.length,n=Au;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8===0}l(Qx,"resolveYamlBinary");function Jx(t){var e,r,i=t.replace(/[\r\n=]/g,""),a=i.length,n=Au,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|n.indexOf(i.charAt(e));return r=a%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}l(Jx,"constructYamlBinary");function Kx(t){var e="",r=0,i,a,n=t.length,s=Au;for(i=0;i>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[i];return a=n%3,a===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):a===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):a===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}l(Kx,"representYamlBinary");function tb(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}l(tb,"isBinary");var jT=new Gt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Qx,construct:Jx,predicate:tb,represent:Kx}),HT=Object.prototype.hasOwnProperty,UT=Object.prototype.toString;function eb(t){if(t===null)return!0;var e=[],r,i,a,n,s,o=t;for(r=0,i=o.length;r>10)+55296,(t-65536&1023)+56320)}l(gb,"charFromCodepoint");function Lu(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}l(Lu,"setProperty");var yb=new Array(256),mb=new Array(256);for(_r=0;_r<256;_r++)yb[_r]=xh(_r)?1:0,mb[_r]=xh(_r);var _r;function xb(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||sb,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}l(xb,"State$1");function Fu(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=ST(r),new oe(e,r)}l(Fu,"generateError");function it(t,e){throw Fu(t,e)}l(it,"throwError");function sn(t,e){t.onWarning&&t.onWarning.call(null,Fu(t,e))}l(sn,"throwWarning");var up={YAML:l(function(t,e,r){var i,a,n;t.version!==null&&it(t,"duplication of %YAML directive"),r.length!==1&&it(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&it(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),n=parseInt(i[2],10),a!==1&&it(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&sn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:l(function(t,e,r){var i,a;r.length!==2&&it(t,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],cb.test(i)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),gr.call(t.tagMap,i)&&it(t,'there is a previously declared suffix for "'+i+'" tag handle'),ub.test(a)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{it(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a},"handleTagDirective")};function Ze(t,e,r,i){var a,n,s,o;if(e1&&(t.result+=Ot.repeat(` `,e-1))}l(Ds,"writeFoldedLines");function bb(t,e,r){var i,a,n,s,o,c,h,u,d=t.kind,p=t.result,f;if(f=t.input.charCodeAt(t.position),ee(f)||Lr(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(a=t.input.charCodeAt(t.position+1),ee(a)||r&&Lr(a)))return!1;for(t.kind="scalar",t.result="",n=s=t.position,o=!1;f!==0;){if(f===58){if(a=t.input.charCodeAt(t.position+1),ee(a)||r&&Lr(a))break}else if(f===35){if(i=t.input.charCodeAt(t.position-1),ee(i))break}else{if(t.position===t.lineStart&&An(t)||r&&Lr(f))break;if(Se(f))if(c=t.line,h=t.lineStart,u=t.lineIndent,At(t,!1,-1),t.lineIndent>=e){o=!0,f=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=c,t.lineStart=h,t.lineIndent=u;break}}o&&(Ze(t,n,s,!1),Ds(t,t.line-c),n=s=t.position,o=!1),cr(f)||(s=t.position+1),f=t.input.charCodeAt(++t.position)}return Ze(t,n,s,!1),t.result?!0:(t.kind=d,t.result=p,!1)}l(bb,"readPlainScalar");function kb(t,e){var r,i,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Ze(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,a=t.position;else return!0;else Se(r)?(Ze(t,i,a,!0),Ds(t,At(t,!1,e)),i=a=t.position):t.position===t.lineStart&&An(t)?it(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);it(t,"unexpected end of the stream within a single quoted scalar")}l(kb,"readSingleQuotedScalar");function Cb(t,e){var r,i,a,n,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Ze(t,r,t.position,!0),t.position++,!0;if(o===92){if(Ze(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Se(o))At(t,!1,e);else if(o<256&&yb[o])t.result+=mb[o],t.position++;else if((s=pb(o))>0){for(a=s,n=0;a>0;a--)o=t.input.charCodeAt(++t.position),(s=db(o))>=0?n=(n<<4)+s:it(t,"expected hexadecimal character");t.result+=gb(n),t.position++}else it(t,"unknown escape sequence");r=i=t.position}else Se(o)?(Ze(t,r,i,!0),Ds(t,At(t,!1,e)),r=i=t.position):t.position===t.lineStart&&An(t)?it(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}it(t,"unexpected end of the stream within a double quoted scalar")}l(Cb,"readDoubleQuotedScalar");function $b(t,e){var r=!0,i,a,n,s=t.tag,o,c=t.anchor,h,u,d,p,f,g=Object.create(null),y,m,x,b;if(b=t.input.charCodeAt(t.position),b===91)u=93,f=!1,o=[];else if(b===123)u=125,f=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if(At(t,!0,e),b=t.input.charCodeAt(t.position),b===u)return t.position++,t.tag=s,t.anchor=c,t.kind=f?"mapping":"sequence",t.result=o,!0;r?b===44&&it(t,"expected the node content, but found ','"):it(t,"missed comma between flow collection entries"),m=y=x=null,d=p=!1,b===63&&(h=t.input.charCodeAt(t.position+1),ee(h)&&(d=p=!0,t.position++,At(t,!0,e))),i=t.line,a=t.lineStart,n=t.position,zr(t,e,Yo,!1,!0),m=t.tag,y=t.result,At(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===i)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),At(t,!0,e),zr(t,e,Yo,!1,!0),x=t.result),f?Fr(t,o,g,m,y,x,i,a,n):d?o.push(Fr(t,null,g,m,y,x,i,a,n)):o.push(y),At(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}it(t,"unexpected end of the stream within a flow collection")}l($b,"readFlowCollection");function wb(t,e){var r,i,a=bl,n=!1,s=!1,o=e,c=0,h=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)bl===a?a=d===43?cp:QT:it(t,"repeat of a chomping mode identifier");else if((u=fb(d))>=0)u===0?it(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?it(t,"repeat of an indentation width identifier"):(o=e+u-1,s=!0);else break;if(cr(d)){do d=t.input.charCodeAt(++t.position);while(cr(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Se(d)&&d!==0)}for(;d!==0;){for(Es(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!s||t.lineIndento&&(o=t.lineIndent),Se(d)){c++;continue}if(t.lineIndente)&&c!==0)it(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(s=t.line,o=t.lineStart,c=t.position),zr(t,e,Vo,!0,a)&&(m?g=t.result:y=t.result),m||(Fr(t,d,p,f,g,y,s,o,c),f=g=y=null),At(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&b!==0)it(t,"bad indentation of a mapping entry");else if(t.lineIndente?c=1:t.lineIndent===e?c=0:t.lineIndente?c=1:t.lineIndent===e?c=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d"),t.result!==null&&g.kind!==t.kind&&it(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):it(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}l(zr,"composeNode");function Mb(t){var e=t.position,r,i,a,n=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(At(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(n=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!ee(s);)s=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),a=[],i.length<1&&it(t,"directive name must not be less than one character in length");s!==0;){for(;cr(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Se(s));break}if(Se(s))break;for(r=t.position;s!==0&&!ee(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}s!==0&&Es(t),gr.call(up,i)?up[i](t,i,a):sn(t,'unknown document directive "'+i+'"')}if(At(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,At(t,!0,-1)):n&&it(t,"directives end mark is expected"),zr(t,t.lineIndent-1,Vo,!1,!0),At(t,!0,-1),t.checkLineBreaks&&KT.test(t.input.slice(e,t.position))&&sn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&An(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,At(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var i=Eu(t,r);if(typeof e!="function")return i;for(var a=0,n=i.length;a=55296&&r<=56319&&e+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}l(gi,"codePointAt");function Ou(t){var e=/^\n* /;return e.test(t)}l(Ou,"needIndentIndicator");var jb=1,_h=2,Hb=3,Ub=4,li=5;function Yb(t,e,r,i,a,n,s,o){var c,h=0,u=null,d=!1,p=!1,f=i!==-1,g=-1,y=qb(gi(t,0))&&Wb(gi(t,t.length-1));if(e||s)for(c=0;c=65536?c+=2:c++){if(h=gi(t,c),!Ki(h))return li;y=y&&vh(h,u,o),u=h}else{for(c=0;c=65536?c+=2:c++){if(h=gi(t,c),h===ln)d=!0,f&&(p=p||c-g-1>i&&t[g+1]!==" ",g=c);else if(!Ki(h))return li;y=y&&vh(h,u,o),u=h}p=p||f&&c-g-1>i&&t[g+1]!==" "}return!d&&!p?y&&!s&&!a(t)?jb:n===hn?li:_h:r>9&&Ou(t)?li:s?n===hn?li:_h:p?Ub:Hb}l(Yb,"chooseScalarStyle");function Vb(t,e,r,i,a){t.dump=(function(){if(e.length===0)return t.quotingType===hn?'""':"''";if(!t.noCompatMode&&(k3.indexOf(e)!==-1||C3.test(e)))return t.quotingType===hn?'"'+e+'"':"'"+e+"'";var n=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),o=i||t.flowLevel>-1&&r>=t.flowLevel;function c(h){return zb(t,h)}switch(l(c,"testAmbiguity"),Yb(e,o,t.indent,s,c,t.quotingType,t.forceQuotes&&!i,a)){case jb:return e;case _h:return"'"+e.replace(/'/g,"''")+"'";case Hb:return"|"+Sh(e,t.indent)+Th($h(e,n));case Ub:return">"+Sh(e,t.indent)+Th($h(Gb(e,s),n));case li:return'"'+Xb(e)+'"';default:throw new oe("impossible error: invalid scalar style")}})()}l(Vb,"writeScalar");function Sh(t,e){var r=Ou(t)?String(e):"",i=t[t.length-1]===` `,a=i&&(t[t.length-2]===` `||t===` `),n=a?"+":i?"":"-";return r+n+` `}l(Sh,"blockHeader");function Th(t){return t[t.length-1]===` `?t.slice(0,-1):t}l(Th,"dropEndingNewline");function Gb(t,e){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=t.indexOf(` `);return h=h!==-1?h:t.length,r.lastIndex=h,Mh(t.slice(0,h),e)})(),a=t[0]===` `||t[0]===" ",n,s;s=r.exec(t);){var o=s[1],c=s[2];n=c[0]===" ",i+=o+(!a&&!n&&c!==""?` `:"")+Mh(c,e),a=n}return i}l(Gb,"foldString");function Mh(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,a=0,n,s=0,o=0,c="";i=r.exec(t);)o=i.index,o-a>e&&(n=s>a?s:o,c+=` `+t.slice(a,n),a=n+1),s=o;return c+=` `,t.length-a>e&&s>a?c+=t.slice(a,s)+` `+t.slice(s+1):c+=t.slice(a),c.slice(1)}l(Mh,"foldLine");function Xb(t){for(var e="",r=0,i,a=0;a=65536?a+=2:a++)r=gi(t,a),i=Jt[r],!i&&Ki(r)?(e+=t[a],r>=65536&&(e+=t[a+1])):e+=i||Rb(r);return e}l(Xb,"escapeString");function Zb(t,e,r){var i="",a=t.tag,n,s,o;for(n=0,s=r.length;n"u"&&Pe(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=a,t.dump="["+i+"]"}l(Zb,"writeFlowSequence");function Bh(t,e,r,i){var a="",n=t.tag,s,o,c;for(s=0,o=r.length;s"u"&&Pe(t,e+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=Xo(t,e)),t.dump&&ln===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}l(Bh,"writeBlockSequence");function Qb(t,e,r){var i="",a=t.tag,n=Object.keys(r),s,o,c,h,u;for(s=0,o=n.length;s1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Pe(t,e,h,!1,!1)&&(u+=t.dump,i+=u));t.tag=a,t.dump="{"+i+"}"}l(Qb,"writeFlowMapping");function Jb(t,e,r,i){var a="",n=t.tag,s=Object.keys(r),o,c,h,u,d,p;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new oe("sortKeys must be a boolean or a function");for(o=0,c=s.length;o1024,d&&(t.dump&&ln===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=Xo(t,e)),Pe(t,e+1,u,!0,d)&&(t.dump&&ln===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,a+=p));t.tag=n,t.dump=a||"{}"}l(Jb,"writeBlockMapping");function Ah(t,e,r){var i,a,n,s,o,c;for(a=r?t.explicitTypes:t.implicitTypes,n=0,s=a.length;n tag resolver accepts not "'+c+'" style');t.dump=i}return!0}return!1}l(Ah,"detectType");function Pe(t,e,r,i,a,n,s){t.tag=null,t.dump=r,Ah(t,r,!1)||Ah(t,r,!0);var o=Ab.call(t.dump),c=i,h;i&&(i=t.flowLevel<0||t.flowLevel>e);var u=o==="[object Object]"||o==="[object Array]",d,p;if(u&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(a=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),o==="[object Object]")i&&Object.keys(t.dump).length!==0?(Jb(t,e,t.dump,a),p&&(t.dump="&ref_"+d+t.dump)):(Qb(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(o==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?Bh(t,e-1,t.dump,a):Bh(t,e,t.dump,a),p&&(t.dump="&ref_"+d+t.dump)):(Zb(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&Vb(t,t.dump,e,n,c);else{if(o==="[object Undefined]"||t.skipInvalid)return!1;throw new oe("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}l(Pe,"writeNode");function Kb(t,e){var r=[],i=[],a,n;for(Zo(t,r,i),a=0,n=i.length;a{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";let r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),Yt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},dp={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function _a(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=_t(t),e=_t(e);let[r,i]=[t.x,t.y],[a,n]=[e.x,e.y],s=a-r,o=n-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}l(_a,"calculateDeltaAndAngle");var _t=l(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),T3=l(t=>({x:l(function(e,r,i){let a=0,n=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Yt,t.arrowTypeStart)){let{angle:f,deltaX:g}=_a(i[0],i[1]);a=Yt[t.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Yt,t.arrowTypeEnd)){let{angle:f,deltaX:g}=_a(i[i.length-1],i[i.length-2]);a=Yt[t.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}let s=Math.abs(_t(e).x-_t(i[i.length-1]).x),o=Math.abs(_t(e).y-_t(i[i.length-1]).y),c=Math.abs(_t(e).x-_t(i[0]).x),h=Math.abs(_t(e).y-_t(i[0]).y),u=Yt[t.arrowTypeStart],d=Yt[t.arrowTypeEnd],p=1;if(s0&&o0&&h=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Yt,t.arrowTypeEnd)){let{angle:f,deltaY:g}=_a(i[i.length-1],i[i.length-2]);a=Yt[t.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}let s=Math.abs(_t(e).y-_t(i[i.length-1]).y),o=Math.abs(_t(e).x-_t(i[i.length-1]).x),c=Math.abs(_t(e).y-_t(i[0]).y),h=Math.abs(_t(e).x-_t(i[0]).x),u=Yt[t.arrowTypeStart],d=Yt[t.arrowTypeEnd],p=1;if(s0&&o0&&h{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"}),B3=oc(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var e=M3();function r(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}l(r,"isRelativeUrlWithoutProtocol");function i(o){var c=o.replace(e.ctrlCharactersRegex,"");return c.replace(e.htmlEntitiesRegex,function(h,u){return String.fromCharCode(u)})}l(i,"decodeHtmlCharacters");function a(o){return URL.canParse(o)}l(a,"isValidUrl");function n(o){try{return decodeURIComponent(o)}catch{return o}}l(n,"decodeURI");function s(o){if(!o)return e.BLANK_URL;var c,h=n(o.trim());do h=i(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=n(h),c=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(c&&c.length>0);var u=h;if(!u)return e.BLANK_URL;if(r(u))return u;var d=u.trimStart(),p=d.match(e.urlSchemeRegex);if(!p)return u;var f=p[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var g=d.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return g;if(f==="http:"||f==="https:"){if(!a(g))return e.BLANK_URL;var y=new URL(g);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return g}l(s,"sanitizeUrl"),t.sanitizeUrl=s}),A3=typeof global=="object"&&global&&global.Object===Object&&global,t2=A3,L3=typeof self=="object"&&self&&self.Object===Object&&self,F3=t2||L3||Function("return this")(),Re=F3,E3=Re.Symbol,Qo=E3,e2=Object.prototype,D3=e2.hasOwnProperty,O3=e2.toString,ma=Qo?Qo.toStringTag:void 0;function r2(t){var e=D3.call(t,ma),r=t[ma];try{t[ma]=void 0;var i=!0}catch{}var a=O3.call(t);return i&&(e?t[ma]=r:delete t[ma]),a}l(r2,"getRawTag");var I3=r2,P3=Object.prototype,R3=P3.toString;function i2(t){return R3.call(t)}l(i2,"objectToString");var N3=i2,z3="[object Null]",q3="[object Undefined]",pp=Qo?Qo.toStringTag:void 0;function a2(t){return t==null?t===void 0?q3:z3:pp&&pp in Object(t)?I3(t):N3(t)}l(a2,"baseGetTag");var ia=a2;function n2(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}l(n2,"isObject");var Hr=n2,W3="[object AsyncFunction]",j3="[object Function]",H3="[object GeneratorFunction]",U3="[object Proxy]";function o2(t){if(!Hr(t))return!1;var e=ia(t);return e==j3||e==H3||e==W3||e==U3}l(o2,"isFunction");var Iu=o2,Y3=Re["__core-js_shared__"],kl=Y3,fp=(function(){var t=/[^.]+$/.exec(kl&&kl.keys&&kl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function s2(t){return!!fp&&fp in t}l(s2,"isMasked");var V3=s2,G3=Function.prototype,X3=G3.toString;function l2(t){if(t!=null){try{return X3.call(t)}catch{}try{return t+""}catch{}}return""}l(l2,"toSource");var Ur=l2,Z3=/[\\^$.*+?()[\]{}|]/g,Q3=/^\[object .+?Constructor\]$/,J3=Function.prototype,K3=Object.prototype,tM=J3.toString,eM=K3.hasOwnProperty,rM=RegExp("^"+tM.call(eM).replace(Z3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h2(t){if(!Hr(t)||V3(t))return!1;var e=Iu(t)?rM:Q3;return e.test(Ur(t))}l(h2,"baseIsNative");var iM=h2;function c2(t,e){return t?.[e]}l(c2,"getValue");var aM=c2;function u2(t,e){var r=aM(t,e);return iM(r)?r:void 0}l(u2,"getNative");var Yr=u2,nM=Yr(Object,"create"),un=nM;function d2(){this.__data__=un?un(null):{},this.size=0}l(d2,"hashClear");var oM=d2;function p2(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}l(p2,"hashDelete");var sM=p2,lM="__lodash_hash_undefined__",hM=Object.prototype,cM=hM.hasOwnProperty;function f2(t){var e=this.__data__;if(un){var r=e[t];return r===lM?void 0:r}return cM.call(e,t)?e[t]:void 0}l(f2,"hashGet");var uM=f2,dM=Object.prototype,pM=dM.hasOwnProperty;function g2(t){var e=this.__data__;return un?e[t]!==void 0:pM.call(e,t)}l(g2,"hashHas");var fM=g2,gM="__lodash_hash_undefined__";function y2(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=un&&e===void 0?gM:e,this}l(y2,"hashSet");var yM=y2;function Vr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}l($2,"listCacheHas");var $M=$2;function w2(t,e){var r=this.__data__,i=Is(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}l(w2,"listCacheSet");var wM=w2;function Gr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=o5}l(K2,"isLength");var tk=K2;function ek(t){return t!=null&&tk(t.length)&&!Iu(t)}l(ek,"isArrayLike");var qs=ek;function rk(t){return Ln(t)&&qs(t)}l(rk,"isArrayLikeObject");var s5=rk;function ik(){return!1}l(ik,"stubFalse");var l5=ik,ak=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$p=ak&&typeof module=="object"&&module&&!module.nodeType&&module,h5=$p&&$p.exports===ak,wp=h5?Re.Buffer:void 0,c5=wp?wp.isBuffer:void 0,u5=c5||l5,zu=u5,d5="[object Object]",p5=Function.prototype,f5=Object.prototype,nk=p5.toString,g5=f5.hasOwnProperty,y5=nk.call(Object);function ok(t){if(!Ln(t)||ia(t)!=d5)return!1;var e=V2(t);if(e===null)return!0;var r=g5.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&nk.call(r)==y5}l(ok,"isPlainObject");var m5=ok,x5="[object Arguments]",b5="[object Array]",k5="[object Boolean]",C5="[object Date]",$5="[object Error]",w5="[object Function]",v5="[object Map]",_5="[object Number]",S5="[object Object]",T5="[object RegExp]",M5="[object Set]",B5="[object String]",A5="[object WeakMap]",L5="[object ArrayBuffer]",F5="[object DataView]",E5="[object Float32Array]",D5="[object Float64Array]",O5="[object Int8Array]",I5="[object Int16Array]",P5="[object Int32Array]",R5="[object Uint8Array]",N5="[object Uint8ClampedArray]",z5="[object Uint16Array]",q5="[object Uint32Array]",vt={};vt[E5]=vt[D5]=vt[O5]=vt[I5]=vt[P5]=vt[R5]=vt[N5]=vt[z5]=vt[q5]=!0;vt[x5]=vt[b5]=vt[L5]=vt[k5]=vt[F5]=vt[C5]=vt[$5]=vt[w5]=vt[v5]=vt[_5]=vt[S5]=vt[T5]=vt[M5]=vt[B5]=vt[A5]=!1;function sk(t){return Ln(t)&&tk(t.length)&&!!vt[ia(t)]}l(sk,"baseIsTypedArray");var W5=sk;function lk(t){return function(e){return t(e)}}l(lk,"baseUnary");var j5=lk,hk=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pa=hk&&typeof module=="object"&&module&&!module.nodeType&&module,H5=Pa&&Pa.exports===hk,Cl=H5&&t2.process,U5=(function(){try{var t=Pa&&Pa.require&&Pa.require("util").types;return t||Cl&&Cl.binding&&Cl.binding("util")}catch{}})(),vp=U5,_p=vp&&vp.isTypedArray,Y5=_p?j5(_p):W5,qu=Y5;function ck(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}l(ck,"safeGet");var Fh=ck,V5=Object.prototype,G5=V5.hasOwnProperty;function uk(t,e,r){var i=t[e];(!(G5.call(t,e)&&Os(i,r))||r===void 0&&!(e in t))&&Nu(t,e,r)}l(uk,"assignValue");var X5=uk;function dk(t,e,r,i){var a=!r;r||(r={});for(var n=-1,s=e.length;++n-1&&t%1==0&&t0){if(++e>=fB)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}l(Tk,"shortOut");var mB=Tk,xB=mB(pB),bB=xB;function Mk(t,e){return bB(uB(t,e,vk),t+"")}l(Mk,"baseRest");var kB=Mk;function Bk(t,e,r){if(!Hr(r))return!1;var i=typeof e;return(i=="number"?qs(r)&&gk(e,r.length):i=="string"&&e in r)?Os(r[e],t):!1}l(Bk,"isIterateeCall");var CB=Bk;function Ak(t){return kB(function(e,r){var i=-1,a=r.length,n=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(a--,n):void 0,s&&CB(r[0],r[1],s)&&(n=a<3?void 0:n,a=1),e=Object(e);++io.args);zo(s),i=Dt(i,[...s])}else i=r.args;if(!i)return;let a=ku(t,e),n="config";return i[n]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[n],delete i[n]),i},"detectInit"),Lk=l(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${MB.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i,a=[];for(;(i=Ea.exec(t))!==null;)if(i.index===Ea.lastIndex&&Ea.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){let n=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:n,args:s})}return a.length===0?{type:t,args:null}:a.length===1?a[0]:a}catch(r){return P.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),AB=l(function(t){return t.replace(Ea,"")},"removeDirectives"),LB=l(function(t,e){for(let[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function ju(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return TB[r]??e}l(ju,"interpolateToCurve");function Fk(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,_B.sanitizeUrl)(r):r}l(Fk,"formatUrl");var FB=l((t,...e)=>{let r=t.split("."),i=r.length-1,a=r[i],n=window;for(let s=0;s{r+=Hu(a,e),e=a});let i=r/2;return Uu(t,i)}l(Ek,"traverseEdge");function Dk(t){return t.length===1?t[0]:Ek(t)}l(Dk,"calcLabelPosition");var Tp=l((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Uu=l((t,e)=>{let r,i=e;for(let a of t){if(r){let n=Hu(a,r);if(n===0)return r;if(n=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:Tp((1-s)*r.x+s*a.x,5),y:Tp((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),EB=l((t,e,r)=>{P.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=Uu(e,25),a=t?10:5,n=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(n)*a+(e[0].x+i.x)/2,s.y=-Math.cos(n)*a+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function Ok(t,e,r){let i=structuredClone(r);P.info("our points",i),e!=="start_left"&&e!=="start_right"&&i.reverse();let a=25+t,n=Uu(i,a),s=10+t*.5,o=Math.atan2(i[0].y-n.y,i[0].x-n.x),c={x:0,y:0};return e==="start_left"?(c.x=Math.sin(o+Math.PI)*s+(i[0].x+n.x)/2,c.y=-Math.cos(o+Math.PI)*s+(i[0].y+n.y)/2):e==="end_right"?(c.x=Math.sin(o-Math.PI)*s+(i[0].x+n.x)/2-5,c.y=-Math.cos(o-Math.PI)*s+(i[0].y+n.y)/2-5):e==="end_left"?(c.x=Math.sin(o)*s+(i[0].x+n.x)/2-5,c.y=-Math.cos(o)*s+(i[0].y+n.y)/2-5):(c.x=Math.sin(o)*s+(i[0].x+n.x)/2,c.y=-Math.cos(o)*s+(i[0].y+n.y)/2),c}l(Ok,"calcTerminalLabelPosition");function Ik(t){let e="",r="";for(let i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}l(Ik,"getStylesFromArray");var Mp=0,DB=l(()=>(Mp++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Mp),"generateId");function Pk(t){let e="",r="0123456789abcdef",i=r.length;for(let a=0;aPk(t.length),"random"),IB=l(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"),PB=l(function(t,e){let r=e.text.replace(Bn.lineBreakRegex," "),[,i]=Ws(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",i),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);let n=a.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),a},"drawSimpleText"),RB=Ru((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Bn.lineBreakRegex.test(t)))return t;let i=t.split(" ").filter(Boolean),a=[],n="";return i.forEach((s,o)=>{let c=Ke(`${s} `,r),h=Ke(n,r);if(c>e){let{hyphenatedStrings:u,remainingWord:d}=NB(s,e,"-",r);a.push(n,...u),n=d}else h+c>=e?(a.push(n),n=s):n=[n,s].filter(Boolean).join(" ");o+1===i.length&&a.push(n)}),a.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),NB=Ru((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let a=[...t],n=[],s="";return a.forEach((o,c)=>{let h=`${s}${o}`;if(Ke(h,i)>=e){let u=c+1,d=a.length===u,p=`${h}${r}`;n.push(d?h:p),s=""}else s=h}),{hyphenatedStrings:n,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Rk(t,e){return Yu(t,e).height}l(Rk,"calculateTextHeight");function Ke(t,e){return Yu(t,e).width}l(Ke,"calculateTextWidth");var Yu=Ru((t,e)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};let[,n]=Ws(r),s=["sans-serif",i],o=t.split(Bn.lineBreakRegex),c=[],h=ut("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let u=h.append("svg");for(let p of s){let f=0,g={width:0,height:0,lineHeight:0};for(let y of o){let m=IB();m.text=y||SB;let x=PB(u,m).style("font-size",n).style("font-weight",a).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}c.push(g)}u.remove();let d=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Fi,zB=(Fi=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},l(Fi,"InitIDGenerator"),Fi),Zn,qB=l(function(t){return Zn=Zn||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Zn.innerHTML=t,unescape(Zn.textContent)},"entityDecode");function Vu(t){return"str"in t}l(Vu,"isDetailedError");var WB=l((t,e,r,i)=>{if(!i)return;let a=t.node()?.getBBox();a&&t.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Ws=l(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Gu(t,e){return vB({},t,e)}l(Gu,"cleanAndMerge");var ve={assignWithDepth:Dt,wrapLabel:RB,calculateTextHeight:Rk,calculateTextWidth:Ke,calculateTextDimensions:Yu,cleanAndMerge:Gu,detectInit:BB,detectDirective:Lk,isSubstringInArray:LB,interpolateToCurve:ju,calcLabelPosition:Dk,calcCardinalityPosition:EB,calcTerminalLabelPosition:Ok,formatUrl:Fk,getStylesFromArray:Ik,generateId:DB,random:OB,runFunc:FB,entityDecode:qB,insertTitle:WB,isLabelCoordinateInPath:Nk,parseFontSize:Ws,InitIDGenerator:zB},jB=l(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},"encodeEntities"),aa=l(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),BE=l((t,e,{counter:r=0,prefix:i,suffix:a},n)=>n||`${i?`${i}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function Xt(t){return t??null}l(Xt,"handleUndefinedAttr");function Nk(t,e){let r=Math.round(t.x),i=Math.round(t.y),a=e.replace(/(\d+\.\d+)/g,n=>Math.round(parseFloat(n)).toString());return a.includes(r.toString())||a.includes(i.toString())}l(Nk,"isLabelCoordinateInPath");var Xu=l(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,i=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function zk(t,e){let r=t.getElementsByTagName("img");if(!r||r.length===0)return;let i=e.replace(/]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(n=>{function s(){if(a.style.display="flex",a.style.flexDirection="column",i){let o=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,c=5,[h=rx.fontSize]=Ws(o),u=h*c+"px";a.style.minWidth=u,a.style.maxWidth=u}else a.style.width="100%";n(a)}l(s,"setupImage"),setTimeout(()=>{a.complete&&s()}),a.addEventListener("error",s),a.addEventListener("load",s)})))}l(zk,"configureLabelImages");function ko(t,e,r){if(t&&t.length){let[i,a]=e,n=Math.PI/180*r,s=Math.cos(n),o=Math.sin(n);for(let c of t){let[h,u]=c;c[0]=(h-i)*s-(u-a)*o+i,c[1]=(h-i)*o+(u-a)*s+a}}}l(ko,"t");function qk(t,e){return t[0]===e[0]&&t[1]===e[1]}l(qk,"e");function Wk(t,e,r,i=1){let a=r,n=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(a)for(let h of s)ko(h,o,a);let c=(function(h,u,d){let p=[];for(let b of h){let k=[...b];qk(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}let f=[];u=Math.max(u,.1);let g=[];for(let b of p)for(let k=0;kb.ymink.ymin?1:b.xk.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return f;let y=[],m=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let k=0;km);k++)b=k;g.splice(0,b+1).forEach((k=>{y.push({s:m,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=m))),y.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||x%u==0)&&y.length>1)for(let b=0;b=y.length)break;let _=y[b].edge,w=y[k].edge;f.push([[Math.round(_.x),m],[Math.round(w.x),m]])}m+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return f})(s,n,i);if(a){for(let h of s)ko(h,o,-a);(function(h,u,d){let p=[];h.forEach((f=>p.push(...f))),ko(p,u,d)})(c,o,-a)}return c}l(Wk,"s");function na(t,e){var r;let i=e.hachureAngle+90,a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let n=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(n=a),Wk(t,a,i,n||1)}l(na,"n");var Ei,Zu=(Ei=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let i=na(e,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(e,r){let i=[];for(let a of e)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}},l(Ei,"o"),Ei);function Fn(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}l(Fn,"a");var Di,HB=(Di=class extends Zu{fillPolygons(e,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=na(e,Object.assign({},r,{hachureGap:i})),n=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(n),c=.5*i*Math.sin(n);for(let[h,u]of a)Fn([h,u])&&s.push([[h[0]-o,h[1]+c],[...u]],[[h[0]+o,h[1]-c],[...u]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},l(Di,"h"),Di),Oi,UB=(Oi=class extends Zu{fillPolygons(e,r){let i=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),n=this._fillPolygons(e,a);return i.ops=i.ops.concat(n.ops),i}},l(Oi,"r"),Oi),Ii,YB=(Ii=class{constructor(e){this.helper=e}fillPolygons(e,r){let i=na(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(e,r){let i=[],a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let n=r.fillWeight;n<0&&(n=r.strokeWidth/2);let s=a/4;for(let o of e){let c=Fn(o),h=c/a,u=Math.ceil(h)-1,d=c-u*a,p=(o[0][0]+o[1][0])/2-a/4,f=Math.min(o[0][1],o[1][1]);for(let g=0;g{let o=Fn(s),c=Math.floor(o/(i+a)),h=(o+a-c*(i+a))/2,u=s[0],d=s[1];u[0]>d[0]&&(u=s[1],d=s[0]);let p=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let f=0;f{let s=Fn(n),o=Math.round(s/(2*r)),c=n[0],h=n[1];c[0]>h[0]&&(c=n[1],h=n[0]);let u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let d=0;du%2?h+r:h+e));n.push({key:"C",data:c}),e=c[4],r=c[5];break}case"Q":n.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let c=o.map(((h,u)=>u%2?h+r:h+e));n.push({key:"Q",data:c}),e=c[2],r=c[3];break}case"A":n.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],n.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":n.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let c=o.map(((h,u)=>u%2?h+r:h+e));n.push({key:"S",data:c}),e=c[2],r=c[3];break}case"T":n.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=a}return n}l(Qu,"y");function Ju(t){let e=[],r="",i=0,a=0,n=0,s=0,o=0,c=0;for(let{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[i,a]=u,[n,s]=u;break;case"C":e.push({key:"C",data:[...u]}),i=u[4],a=u[5],o=u[2],c=u[3];break;case"L":e.push({key:"L",data:[...u]}),[i,a]=u;break;case"H":i=u[0],e.push({key:"L",data:[i,a]});break;case"V":a=u[0],e.push({key:"L",data:[i,a]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-o),p=a+(a-c)):(d=i,p=a),e.push({key:"C",data:[d,p,...u]}),o=u[0],c=u[1],i=u[2],a=u[3];break}case"T":{let[d,p]=u,f=0,g=0;r==="Q"||r==="T"?(f=i+(i-o),g=a+(a-c)):(f=i,g=a);let y=i+2*(f-i)/3,m=a+2*(g-a)/3,x=d+2*(f-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,m,x,b,d,p]}),o=f,c=g,i=d,a=p;break}case"Q":{let[d,p,f,g]=u,y=i+2*(d-i)/3,m=a+2*(p-a)/3,x=f+2*(d-f)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,m,x,b,f,g]}),o=d,c=p,i=f,a=g;break}case"A":{let d=Math.abs(u[0]),p=Math.abs(u[1]),f=u[2],g=u[3],y=u[4],m=u[5],x=u[6];d===0||p===0?(e.push({key:"C",data:[i,a,m,x,m,x]}),i=m,a=x):(i!==m||a!==x)&&(Ku(i,a,m,x,d,p,f,g,y).forEach((function(b){e.push({key:"C",data:b})})),i=m,a=x);break}case"Z":e.push({key:"Z",data:[]}),i=n,a=s}r=h}return e}l(Ju,"m");function hi(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}l(hi,"w");function Ku(t,e,r,i,a,n,s,o,c,h){let u=(d=s,Math.PI*d/180);var d;let p=[],f=0,g=0,y=0,m=0;if(h)[f,g,y,m]=h;else{[t,e]=hi(t,e,-u),[r,i]=hi(r,i,-u);let A=(t-r)/2,B=(e-i)/2,L=A*A/(a*a)+B*B/(n*n);L>1&&(L=Math.sqrt(L),a*=L,n*=L);let M=a*a,E=n*n,F=M*E-M*B*B-E*A*A,z=M*B*B+E*A*A,V=(o===c?-1:1)*Math.sqrt(Math.abs(F/z));y=V*a*B/n+(t+r)/2,m=V*-n*A/a+(e+i)/2,f=Math.asin(parseFloat(((e-m)/n).toFixed(9))),g=Math.asin(parseFloat(((i-m)/n).toFixed(9))),tg&&(f-=2*Math.PI),!c&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){let A=g,B=r,L=i;g=c&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=Ku(r=y+a*Math.cos(g),i=m+n*Math.sin(g),B,L,a,n,s,0,c,[g,A,y,m])}x=g-f;let b=Math.cos(f),k=Math.sin(f),_=Math.cos(g),w=Math.sin(g),$=Math.tan(x/4),T=4/3*a*$,O=4/3*n*$,R=[t,e],I=[t+T*k,e-O*b],S=[r+T*w,i-O*_],D=[r,i];if(I[0]=2*R[0]-I[0],I[1]=2*R[1]-I[1],h)return[I,S,D].concat(p);{p=[I,S,D].concat(p);let A=[];for(let B=0;B2){let a=[];for(let n=0;n2*Math.PI&&(f=0,g=2*Math.PI);let y=2*Math.PI/c.curveStepCount,m=Math.min(y/2,(g-f)/2),x=Rh(m,h,u,d,p,f,g,1,c);if(!c.disableMultiStroke){let b=Rh(m,h,u,d,p,f,g,1.5,c);x.push(...b)}return s&&(o?x.push(...tr(h,u,h+d*Math.cos(f),u+p*Math.sin(f),c),...tr(h,u,h+d*Math.cos(g),u+p*Math.sin(g),c)):x.push({op:"lineTo",data:[h,u]},{op:"lineTo",data:[h+d*Math.cos(f),u+p*Math.sin(f)]})),{type:"path",ops:x}}l(Dh,"A");function Oh(t,e){let r=Ju(Qu(js(t))),i=[],a=[0,0],n=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":n=[o[0],o[1]],a=[o[0],o[1]];break;case"L":i.push(...tr(n[0],n[1],o[0],o[1],e)),n=[o[0],o[1]];break;case"C":{let[c,h,u,d,p,f]=o;i.push(...Hk(c,h,u,d,p,f,n,e)),n=[p,f];break}case"Z":i.push(...tr(n[0],n[1],a[0],a[1],e)),n=[a[0],a[1]]}return{type:"path",ops:i}}l(Oh,"_");function $o(t,e){let r=[];for(let i of t)if(i.length){let a=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+nt(a,e),i[0][1]+nt(a,e)]});for(let s=1;s500?.4:-.0016668*c+1.233334;let u=a.maxRandomnessOffset||0;u*u*100>o&&(u=c/10);let d=u/2,p=.2+.2*rd(a),f=a.bowing*a.maxRandomnessOffset*(i-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-r)/200;f=nt(f,a,h),g=nt(g,a,h);let y=[],m=l(()=>nt(d,a,h),"M"),x=l(()=>nt(u,a,h),"k"),b=a.preserveVertices;return n&&(s?y.push({op:"move",data:[t+(b?0:m()),e+(b?0:m())]}):y.push({op:"move",data:[t+(b?0:nt(u,a,h)),e+(b?0:nt(u,a,h))]})),s?y.push({op:"bcurveTo",data:[f+t+(r-t)*p+m(),g+e+(i-e)*p+m(),f+t+2*(r-t)*p+m(),g+e+2*(i-e)*p+m(),r+(b?0:m()),i+(b?0:m())]}):y.push({op:"bcurveTo",data:[f+t+(r-t)*p+x(),g+e+(i-e)*p+x(),f+t+2*(r-t)*p+x(),g+e+2*(i-e)*p+x(),r+(b?0:x()),i+(b?0:x())]}),y}l(rs,"R");function Sa(t,e,r){if(!t.length)return[];let i=[];i.push([t[0][0]+nt(e,r),t[0][1]+nt(e,r)]),i.push([t[0][0]+nt(e,r),t[0][1]+nt(e,r)]);for(let a=1;a3){let n=[],s=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&a.push(o)):a.push(o),a.push(t[e+3])}else{let o=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],d=nr(o,c,.5),p=nr(c,h,.5),f=nr(h,u,.5),g=nr(d,p,.5),y=nr(p,f,.5),m=nr(g,y,.5);is([o,d,g,m],0,r,a),is([m,y,f,u],0,r,a)}var n,s;return a}l(is,"K");function Yk(t,e){return gn(t,0,t.length,e)}l(Yk,"U");function gn(t,e,r,i,a){let n=a||[],s=t[e],o=t[r-1],c=0,h=1;for(let u=e+1;uc&&(c=d,h=u)}return Math.sqrt(c)>i?(gn(t,e,h+1,i,n),gn(t,h,r,i,n)):(n.length||n.push(s),n.push(o)),n}l(gn,"X");function wo(t,e=.15,r){let i=[],a=(t.length-1)/3;for(let n=0;n0?gn(i,0,i.length,r):i}l(wo,"Y");var le="none",zi,as=(zi=class{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,i){return{shape:e,sets:r||[],options:i||this.defaultOptions}}line(e,r,i,a,n){let s=this._o(n);return this._d("line",[td(e,r,i,a,s)],s)}rectangle(e,r,i,a,n){let s=this._o(n),o=[],c=jk(e,r,i,a,s);if(s.fill){let h=[[e,r],[e+i,r],[e+i,r+a],[e,r+a]];s.fillStyle==="solid"?o.push($o([h],s)):o.push(Tr([h],s))}return s.stroke!==le&&o.push(c),this._d("rectangle",o,s)}ellipse(e,r,i,a,n){let s=this._o(n),o=[],c=ed(i,a,s),h=es(e,r,s,c);if(s.fill)if(s.fillStyle==="solid"){let u=es(e,r,s,c).opset;u.type="fillPath",o.push(u)}else o.push(Tr([h.estimatedPoints],s));return s.stroke!==le&&o.push(h.opset),this._d("ellipse",o,s)}circle(e,r,i,a){let n=this.ellipse(e,r,i,i,a);return n.shape="circle",n}linearPath(e,r){let i=this._o(r);return this._d("linearPath",[Ra(e,!1,i)],i)}arc(e,r,i,a,n,s,o=!1,c){let h=this._o(c),u=[],d=Dh(e,r,i,a,n,s,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){let p=Object.assign({},h);p.disableMultiStroke=!0;let f=Dh(e,r,i,a,n,s,!0,!1,p);f.type="fillPath",u.push(f)}else u.push((function(p,f,g,y,m,x,b){let k=p,_=f,w=Math.abs(g/2),$=Math.abs(y/2);w+=nt(.01*w,b),$+=nt(.01*$,b);let T=m,O=x;for(;T<0;)T+=2*Math.PI,O+=2*Math.PI;O-T>2*Math.PI&&(T=0,O=2*Math.PI);let R=(O-T)/b.curveStepCount,I=[];for(let S=T;S<=O;S+=R)I.push([k+w*Math.cos(S),_+$*Math.sin(S)]);return I.push([k+w*Math.cos(O),_+$*Math.sin(O)]),I.push([k,_]),Tr([I],b)})(e,r,i,a,n,s,h));return h.stroke!==le&&u.push(d),this._d("arc",u,h)}curve(e,r){let i=this._o(r),a=[],n=Eh(e,i);if(i.fill&&i.fill!==le)if(i.fillStyle==="solid"){let s=Eh(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let c=typeof o[0][0]=="number"?[o]:o;for(let h of c)h.length<3?s.push(...h):h.length===3?s.push(...wo(Nh([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):s.push(...wo(Nh(h),10,(1+i.roughness)/2))}s.length&&a.push(Tr([s],i))}return i.stroke!==le&&a.push(n),this._d("curve",a,i)}polygon(e,r){let i=this._o(r),a=[],n=Ra(e,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push($o([e],i)):a.push(Tr([e],i))),i.stroke!==le&&a.push(n),this._d("polygon",a,i)}path(e,r){let i=this._o(r),a=[];if(!e)return this._d("path",a,i);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=i.fill&&i.fill!=="transparent"&&i.fill!==le,s=i.stroke!==le,o=!!(i.simplification&&i.simplification<1),c=(function(u,d,p){let f=Ju(Qu(js(u))),g=[],y=[],m=[0,0],x=[],b=l(()=>{x.length>=4&&y.push(...wo(x,d)),x=[]},"i"),k=l(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:$}of f)switch(w){case"M":k(),m=[$[0],$[1]],y.push(m);break;case"L":b(),y.push([$[0],$[1]]);break;case"C":if(!x.length){let T=y.length?y[y.length-1]:m;x.push([T[0],T[1]])}x.push([$[0],$[1]]),x.push([$[2],$[3]]),x.push([$[4],$[5]]);break;case"Z":b(),y.push([m[0],m[1]])}if(k(),!p)return g;let _=[];for(let w of g){let $=Yk(w,p);$.length&&_.push($)}return _})(e,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=Oh(e,i);if(n)if(i.fillStyle==="solid")if(c.length===1){let u=Oh(e,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else a.push($o(c,i));else a.push(Tr(c,i));return s&&(o?c.forEach((u=>{a.push(Ra(u,!1,i))})):a.push(h)),this._d("path",a,i)}opsToPath(e,r){let i="";for(let a of e.ops){let n=typeof r=="number"&&r>=0?a.data.map((s=>+s.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":i+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":i+=`L${n[0]} ${n[1]} `}}return i.trim()}toPaths(e){let r=e.sets||[],i=e.options||this.defaultOptions,a=[];for(let n of r){let s=null;switch(n.type){case"path":s={d:this.opsToPath(n),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:le};break;case"fillPath":s={d:this.opsToPath(n),stroke:le,strokeWidth:0,fill:i.fill||le};break;case"fillSketch":s=this.fillSketch(n,i)}s&&a.push(s)}return a}fillSketch(e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||le,strokeWidth:i,fill:le}}_mergedShape(e){return e.filter(((r,i)=>i===0||r.op!=="move"))}},l(zi,"et"),zi),qi,JB=(qi=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new as(r)}draw(e){let r=e.sets||[],i=e.options||this.getDefaultOptions(),a=this.ctx,n=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,s,n),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,s,n,o),a.restore();break}case"fillSketch":this.fillSketch(a,s,i)}}fillSketch(e,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),e.save(),i.fillLineDash&&e.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(e.lineDashOffset=i.fillLineDashOffset),e.strokeStyle=i.fill||"",e.lineWidth=a,this._drawToContext(e,r,i.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,i,a="nonzero"){e.beginPath();for(let n of r.ops){let s=typeof i=="number"&&i>=0?n.data.map((o=>+o.toFixed(i))):n.data;switch(n.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,i,a,n){let s=this.gen.line(e,r,i,a,n);return this.draw(s),s}rectangle(e,r,i,a,n){let s=this.gen.rectangle(e,r,i,a,n);return this.draw(s),s}ellipse(e,r,i,a,n){let s=this.gen.ellipse(e,r,i,a,n);return this.draw(s),s}circle(e,r,i,a){let n=this.gen.circle(e,r,i,a);return this.draw(n),n}linearPath(e,r){let i=this.gen.linearPath(e,r);return this.draw(i),i}polygon(e,r){let i=this.gen.polygon(e,r);return this.draw(i),i}arc(e,r,i,a,n,s,o=!1,c){let h=this.gen.arc(e,r,i,a,n,s,o,c);return this.draw(h),h}curve(e,r){let i=this.gen.curve(e,r);return this.draw(i),i}path(e,r){let i=this.gen.path(e,r);return this.draw(i),i}},l(qi,"st"),qi),Jn="http://www.w3.org/2000/svg",Wi,KB=(Wi=class{constructor(e,r){this.svg=e,this.gen=new as(r)}draw(e){let r=e.sets||[],i=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,n=a.createElementNS(Jn,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let c=null;switch(o.type){case"path":c=a.createElementNS(Jn,"path"),c.setAttribute("d",this.opsToPath(o,s)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(Jn,"path"),c.setAttribute("d",this.opsToPath(o,s)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,o,i)}c&&n.appendChild(c)}return n}fillSketch(e,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);let n=e.createElementNS(Jn,"path");return n.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),n.setAttribute("stroke",i.fill||""),n.setAttribute("stroke-width",a+""),n.setAttribute("fill","none"),i.fillLineDash&&n.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,i,a,n){let s=this.gen.line(e,r,i,a,n);return this.draw(s)}rectangle(e,r,i,a,n){let s=this.gen.rectangle(e,r,i,a,n);return this.draw(s)}ellipse(e,r,i,a,n){let s=this.gen.ellipse(e,r,i,a,n);return this.draw(s)}circle(e,r,i,a){let n=this.gen.circle(e,r,i,a);return this.draw(n)}linearPath(e,r){let i=this.gen.linearPath(e,r);return this.draw(i)}polygon(e,r){let i=this.gen.polygon(e,r);return this.draw(i)}arc(e,r,i,a,n,s,o=!1,c){let h=this.gen.arc(e,r,i,a,n,s,o,c);return this.draw(h)}curve(e,r){let i=this.gen.curve(e,r);return this.draw(i)}path(e,r){let i=this.gen.path(e,r);return this.draw(i)}},l(Wi,"ot"),Wi),Q={canvas:l((t,e)=>new JB(t,e),"canvas"),svg:l((t,e)=>new KB(t,e),"svg"),generator:l(t=>new as(t),"generator"),newSeed:l(()=>as.newSeed(),"newSeed")},tA=l(t=>{let{handDrawnSeed:e}=xt();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),oa=l(t=>{let e=eA([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),eA=l(t=>{let e=new Map;return t.forEach(r=>{let[i,a]=r.split(":");e.set(i.trim(),a?.trim())}),e},"styles2Map"),Vk=l(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),K=l(t=>{let{stylesArray:e}=oa(t),r=[],i=[],a=[],n=[];return e.forEach(s=>{let o=s[0];Vk(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&a.push(s.join(":")+" !important"),o==="fill"&&n.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:n}},"styles2String"),J=l((t,e)=>{let{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:s}=oa(t);return Object.assign({roughness:.7,fill:s.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:rA(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),rA=l(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let a=isNaN(e[0])?0:e[0];return[a,a]}let r=isNaN(e[0])?0:e[0],i=isNaN(e[1])?0:e[1];return[r,i]},"getStrokeDashArray"),iA=Object.freeze({left:0,top:0,width:16,height:16}),ns=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Gk=Object.freeze({...iA,...ns}),aA=Object.freeze({...Gk,body:"",hidden:!1}),nA=Object.freeze({width:null,height:null}),oA=Object.freeze({...nA,...ns}),sA=l((t,e,r,i="")=>{let a=t.split(":");if(t.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){let o=a.pop(),c=a.pop(),h={provider:a.length>0?a[0]:i,prefix:c,name:o};return e&&!wl(h)?null:h}let n=a[0],s=n.split("-");if(s.length>1){let o={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!wl(o)?null:o}if(r&&i===""){let o={provider:i,prefix:"",name:n};return e&&!wl(o,r)?null:o}return null},"stringToIcon"),wl=l((t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,"validateIconName");function Xk(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}l(Xk,"mergeIconTransformations");function zh(t,e){let r=Xk(t,e);for(let i in aA)i in ns?i in t&&!(i in r)&&(r[i]=ns[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}l(zh,"mergeIconData");function Zk(t,e){let r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function n(s){if(r[s])return a[s]=[];if(!(s in a)){a[s]=null;let o=i[s]&&i[s].parent,c=o&&n(o);c&&(a[s]=[o].concat(c))}return a[s]}return l(n,"resolve"),(e||Object.keys(r).concat(Object.keys(i))).forEach(n),a}l(Zk,"getIconsTree");function qh(t,e,r){let i=t.icons,a=t.aliases||Object.create(null),n={};function s(o){n=zh(i[o]||a[o],n)}return l(s,"parse"),s(e),r.forEach(s),zh(t,n)}l(qh,"internalGetIconData");function Qk(t,e){if(t.icons[e])return qh(t,e,[]);let r=Zk(t,[e])[e];return r?qh(t,e,r):null}l(Qk,"getIconData");var lA=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hA=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Wh(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let i=t.split(lA);if(i===null||!i.length)return t;let a=[],n=i.shift(),s=hA.test(n);for(;;){if(s){let o=parseFloat(n);isNaN(o)?a.push(n):a.push(Math.ceil(o*e*r)/r)}else a.push(n);if(n=i.shift(),n===void 0)return a.join("");s=!s}}l(Wh,"calculateSize");function Jk(t,e="defs"){let r="",i=t.indexOf("<"+e);for(;i>=0;){let a=t.indexOf(">",i),n=t.indexOf("",n);if(s===-1)break;r+=t.slice(a+1,n).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}l(Jk,"splitSVGDefs");function Kk(t,e){return t?""+t+""+e:e}l(Kk,"mergeDefsAndContent");function tC(t,e,r){let i=Jk(t);return Kk(i.defs,e+i.content+r)}l(tC,"wrapSVGContent");var cA=l(t=>t==="unset"||t==="undefined"||t==="none","isUnsetKeyword");function eC(t,e){let r={...Gk,...t},i={...oA,...e},a={left:r.left,top:r.top,width:r.width,height:r.height},n=r.body;[r,i].forEach(y=>{let m=[],x=y.hFlip,b=y.vFlip,k=y.rotate;x?b?k+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):b&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=a.height/2+a.top,m.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:_=a.width/2+a.left,m.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(a.left!==a.top&&(_=a.left,a.left=a.top,a.top=_),a.width!==a.height&&(_=a.width,a.width=a.height,a.height=_)),m.length&&(n=tC(n,'',""))});let s=i.width,o=i.height,c=a.width,h=a.height,u,d;s===null?(d=o===null?"1em":o==="auto"?h:o,u=Wh(d,c/h)):(u=s==="auto"?c:s,d=o===null?Wh(u,h/c):o==="auto"?h:o);let p={},f=l((y,m)=>{cA(m)||(p[y]=m.toString())},"setAttr");f("width",u),f("height",d);let g=[a.left,a.top,c,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:n}}l(eC,"iconToSVG");var uA=/\sid="(\S+)"/g,dA="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),pA=0;function rC(t,e=dA){let r=[],i;for(;i=uA.exec(t);)r.push(i[1]);if(!r.length)return t;let a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(n=>{let s=typeof e=="function"?e(n):e+(pA++).toString(),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+a+"$3")}),t=t.replace(new RegExp(a,"g"),""),t}l(rC,"replaceIDs");function iC(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in e)r+=" "+i+'="'+e[i]+'"';return'"+t+""}l(iC,"iconToHTML");var fA={body:'?',height:80,width:80},jh=new Map,aC=new Map,gA=l(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(P.debug("Registering icon pack:",e.name),"loader"in e)aC.set(e.name,e.loader);else if("icons"in e)jh.set(e.name,e.icons);else throw P.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),nC=l(async(t,e)=>{let r=sA(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=jh.get(i);if(!a){let s=aC.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},jh.set(i,a)}catch(o){throw P.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let n=Qk(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n},"getRegisteredIconData"),yA=l(async t=>{try{return await nC(t),!0}catch{return!1}},"isIconAvailable"),En=l(async(t,e,r)=>{let i;try{i=await nC(t,e?.fallbackPrefix)}catch(s){P.error(s),i=fA}let a=eC(i,e),n=iC(rC(a.body),{...a.attributes,...r});return Me(n,Vt())},"getIconSVG");function id(t){for(var e=[],r=1;rnull,"exec")};function bt(t,e=""){let r=typeof t=="string"?t:t.source,i={replace:l((a,n)=>{let s=typeof n=="string"?n:n.source;return s=s.replace(re.caret,"$1"),r=r.replace(a,s),i},"replace"),getRegex:l(()=>new RegExp(r,e),"getRegex")};return i}l(bt,"h");var re={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:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,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:l(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},mA=/^(?:[ \t]*(?:\n|$))+/,xA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nd=/(?:[*+-]|\d{1,9}[.)])/,oC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sC=bt(oC).replace(/bull/g,nd).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(),CA=bt(oC).replace(/bull/g,nd).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(),od=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$A=/^[^\n]+/,sd=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wA=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vA=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nd).getRegex(),Us="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",ld=/|$))/,_A=bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ld).replace("tag",Us).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lC=bt(od).replace("hr",Dn).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Us).getRegex(),SA=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",lC).getRegex(),hd={blockquote:SA,code:xA,def:wA,fences:bA,heading:kA,hr:Dn,html:_A,lheading:sC,list:vA,newline:mA,paragraph:lC,table:za,text:$A},Ap=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dn).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",Us).getRegex(),TA={...hd,lheading:CA,table:Ap,paragraph:bt(od).replace("hr",Dn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ap).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Us).getRegex()},MA={...hd,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ld).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:za,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(od).replace("hr",Dn).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",sC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},BA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,AA=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hC=/^( {2,}|\\)\n(?!\s*$)/,LA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,dC=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,IA=bt(dC,"u").replace(/punct/g,Ys).getRegex(),PA=bt(dC,"u").replace(/punct/g,uC).getRegex(),pC="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",RA=bt(pC,"gu").replace(/notPunctSpace/g,cC).replace(/punctSpace/g,cd).replace(/punct/g,Ys).getRegex(),NA=bt(pC,"gu").replace(/notPunctSpace/g,DA).replace(/punctSpace/g,EA).replace(/punct/g,uC).getRegex(),zA=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cC).replace(/punctSpace/g,cd).replace(/punct/g,Ys).getRegex(),qA=bt(/\\(punct)/,"gu").replace(/punct/g,Ys).getRegex(),WA=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(),jA=bt(ld).replace("(?:-->|$)","-->").getRegex(),HA=bt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",jA).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),os=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,UA=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",os).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fC=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",os).replace("ref",sd).getRegex(),gC=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",sd).getRegex(),YA=bt("reflink|nolink(?!\\()","g").replace("reflink",fC).replace("nolink",gC).getRegex(),ud={_backpedal:za,anyPunctuation:qA,autolink:WA,blockSkip:OA,br:hC,code:AA,del:za,emStrongLDelim:IA,emStrongRDelimAst:RA,emStrongRDelimUnd:zA,escape:BA,link:UA,nolink:gC,punctuation:FA,reflink:fC,reflinkSearch:YA,tag:HA,text:LA,url:za},VA={...ud,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",os).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",os).getRegex()},Hh={...ud,emStrongRDelimAst:NA,emStrongLDelim:PA,url:bt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Lp=l(t=>XA[t],"ke");function $e(t,e){if(e){if(re.escapeTest.test(t))return t.replace(re.escapeReplace,Lp)}else if(re.escapeTestNoEncode.test(t))return t.replace(re.escapeReplaceNoEncode,Lp);return t}l($e,"w");function Uh(t){try{t=encodeURI(t).replace(re.percentDecode,"%")}catch{return null}return t}l(Uh,"J");function Yh(t,e){let r=t.replace(re.findPipe,(n,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(re.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length0?-2:-1}l(yC,"ge");function Vh(t,e,r,i,a){let n=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:n,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}l(Vh,"fe");function mC(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(i===null)return e;let a=i[1];return e.split(` `).map(n=>{let s=n.match(r.other.beginningSpace);if(s===null)return n;let[o]=s;return o.length>=a.length?n.slice(a.length):n}).join(` `)}l(mC,"Je");var ji,ss=(ji=class{options;rules;lexer;constructor(e){this.options=e||Qr}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ui(i,` `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let i=r[0],a=mC(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=ui(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:ui(r[0],` `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let i=ui(r[0],` `).split(` `),a="",n="",s=[];for(;i.length>0;){let o=!1,c=[],h;for(h=0;h1,n={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;e;){let h=!1,u="",d="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let p=r[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=e.split(` `,1)[0],g=!p.trim(),y=0;if(this.options.pedantic?(y=2,d=p.trimStart()):g?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=p.slice(y),y+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(u+=f+` `,e=e.substring(f.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),w=this.rules.other.headingBeginRegex(y),$=this.rules.other.htmlBeginRegex(y);for(;e;){let T=e.split(` `,1)[0],O;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),O=f):O=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||w.test(f)||$.test(f)||b.test(f)||k.test(f))break;if(O.search(this.rules.other.nonSpaceChar)>=y||!f.trim())d+=` `+O.slice(y);else{if(g||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(p)||w.test(p)||k.test(p))break;d+=` `+f}!g&&!f.trim()&&(g=!0),u+=T+` `,e=e.substring(T.length+1),p=O.slice(y)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let m=null,x;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(x=m[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:u,task:!!m,checked:x,loose:!1,text:d,tokens:[]}),n.raw+=u}let c=n.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let h=0;hp.type==="space"),d=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));n.loose=d}if(n.loose)for(let h=0;h({text:c,tokens:this.lexer.inline(c),header:!1,align:s.align[h]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);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(e){let r=this.rules.block.paragraph.exec(e);if(r){let i=r[1].charAt(r[1].length-1)===` `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);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(e){let r=this.rules.inline.link.exec(e);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 s=ui(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=yC(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let a=r[2],n="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],n=s[3])}else n=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),Vh(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=r[a.toLowerCase()];if(!n){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Vh(i,n,i[0],this.lexer,this.rules)}}emStrong(e,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let n=[...a[0]].length-1,s,o,c=n,h=0,u=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*e.length+n);(a=u.exec(r))!=null;){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(o=[...s].length,a[3]||a[4]){c+=o;continue}else if((a[5]||a[6])&&n%3&&!((n+o)%3)){h+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+h);let d=[...a[0]][0].length,p=e.slice(0,n+a.index+d+o);if(Math.min(n,o)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),n=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&n&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let i,a;if(r[2]==="@")i=r[0],a="mailto:"+i;else{let n;do n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(n!==r[0]);i=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},l(ji,"y"),ji),ur,Ye=(ur=class{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qr,this.options.tokenizer=this.options.tokenizer||new ss,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:re,block:Kn.normal,inline:xa.normal};this.options.pedantic?(r.block=Kn.pedantic,r.inline=xa.pedantic):this.options.gfm&&(r.block=Kn.gfm,this.options.breaks?r.inline=xa.breaks:r.inline=xa.gfm),this.tokenizer.rules=r}static get rules(){return{block:Kn,inline:xa}}static lex(e,r){return new ur(r).lex(e)}static lexInline(e,r){return new ur(r).inlineTokens(e)}lex(e){e=e.replace(re.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let r=0;r(a=s.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let s=r.at(-1);a.raw.length===1&&s!==void 0?s.raw+=` `:r.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` `)?"":` `)+a.raw,s.text+=` `+a.text,this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` `)?"":` `)+a.raw,s.text+=` `+a.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),r.push(a);continue}let n=e;if(this.options.extensions?.startBlock){let s=1/0,o=e.slice(1),c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},o),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(n=e.substring(0,s+1))}if(this.state.top&&(a=this.tokenizer.paragraph(n))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` `)?"":` `)+a.raw,s.text+=` `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a),i=n.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(` `)?"":` `)+a.raw,s.text+=` `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let i=e,a=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)o.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,s="";for(;e;){n||(s=""),n=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let h=r.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,i,s)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let c=e;if(this.options.extensions?.startInline){let h=1/0,u=e.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},u),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(c=e.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),n=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):r.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},l(ur,"l"),ur),Hi,ls=(Hi=class{options;parser;constructor(e){this.options=e||Qr}space(e){return""}code({text:e,lang:r,escaped:i}){let a=(r||"").match(re.notSpaceStart)?.[0],n=e.replace(re.endingNewline,"")+` `;return a?'
'+(i?n:$e(n,!0))+`
`:"
"+(i?n:$e(n,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){let r=e.ordered,i=e.start,a="";for(let o=0;o `+a+" `}listitem(e){let r="";if(e.task){let i=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+$e(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`
  • ${r}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let r="",i="";for(let n=0;n${a}`),` `+r+` `+a+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){let r=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+r+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${$e(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:r,tokens:i}){let a=this.parser.parseInline(i),n=Uh(e);if(n===null)return a;e=n;let s='
    ",s}image({href:e,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let n=Uh(e);if(n===null)return $e(i);e=n;let s=`${i}{let o=n[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=r.renderers[n.name];s?r.renderers[n.name]=function(...o){let c=n.renderer.apply(this,o);return c===!1&&(c=s.apply(this,o)),c}:r.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[n.level];s?s.unshift(n.tokenizer):r[n.level]=[n.tokenizer],n.start&&(n.level==="block"?r.startBlock?r.startBlock.push(n.start):r.startBlock=[n.start]:n.level==="inline"&&(r.startInline?r.startInline.push(n.start):r.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(r.childTokens[n.name]=n.childTokens)}),a.extensions=r),i.renderer){let n=this.defaults.renderer||new ls(this.defaults);for(let s in i.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,c=i.renderer[o],h=n[o];n[o]=(...u)=>{let d=c.apply(n,u);return d===!1&&(d=h.apply(n,u)),d||""}}a.renderer=n}if(i.tokenizer){let n=this.defaults.tokenizer||new ss(this.defaults);for(let s in i.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,c=i.tokenizer[o],h=n[o];n[o]=(...u)=>{let d=c.apply(n,u);return d===!1&&(d=h.apply(n,u)),d}}a.tokenizer=n}if(i.hooks){let n=this.defaults.hooks||new Ta;for(let s in i.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,c=i.hooks[o],h=n[o];Ta.passThroughHooks.has(s)?n[o]=u=>{if(this.defaults.async&&Ta.passThroughHooksRespectAsync.has(s))return Promise.resolve(c.call(n,u)).then(p=>h.call(n,p));let d=c.call(n,u);return h.call(n,d)}:n[o]=(...u)=>{let d=c.apply(n,u);return d===!1&&(d=h.apply(n,u)),d}}a.hooks=n}if(i.walkTokens){let n=this.defaults.walkTokens,s=i.walkTokens;a.walkTokens=function(o){let c=[];return c.push(s.call(this,o)),n&&(c=c.concat(n.call(this,o))),c}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return Ye.lex(e,r??this.defaults)}parser(e,r){return Ve.parse(e,r??this.defaults)}parseMarkdown(e){return(r,i)=>{let a={...i},n={...this.defaults,...a},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));n.hooks&&(n.hooks.options=n,n.hooks.block=e);let o=n.hooks?n.hooks.provideLexer():e?Ye.lex:Ye.lexInline,c=n.hooks?n.hooks.provideParser():e?Ve.parse:Ve.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(r):r).then(h=>o(h,n)).then(h=>n.hooks?n.hooks.processAllTokens(h):h).then(h=>n.walkTokens?Promise.all(this.walkTokens(h,n.walkTokens)).then(()=>h):h).then(h=>c(h,n)).then(h=>n.hooks?n.hooks.postprocess(h):h).catch(s);try{n.hooks&&(r=n.hooks.preprocess(r));let h=o(r,n);n.hooks&&(h=n.hooks.processAllTokens(h)),n.walkTokens&&this.walkTokens(h,n.walkTokens);let u=c(h,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(h){return s(h)}}}onError(e,r){return i=>{if(i.message+=` Please report this to https://github.com/markedjs/marked.`,e){let a="

    An error occurred:

    "+$e(i.message+"",!0)+"
    ";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},l(Yi,"B"),Yi),qr=new ZA;function mt(t,e){return qr.parse(t,e)}l(mt,"d");mt.options=mt.setOptions=function(t){return qr.setOptions(t),mt.defaults=qr.defaults,ad(mt.defaults),mt};mt.getDefaults=Hs;mt.defaults=Qr;mt.use=function(...t){return qr.use(...t),mt.defaults=qr.defaults,ad(mt.defaults),mt};mt.walkTokens=function(t,e){return qr.walkTokens(t,e)};mt.parseInline=qr.parseInline;mt.Parser=Ve;mt.parser=Ve.parse;mt.Renderer=ls;mt.TextRenderer=dd;mt.Lexer=Ye;mt.lexer=Ye.lex;mt.Tokenizer=ss;mt.Hooks=Ta;mt.parse=mt;mt.options;mt.setOptions;mt.use;mt.walkTokens;mt.parseInline;Ve.parse;Ye.lex;function xC(t,{markdownAutoWrap:e}){let r=t.replace(//g,` `).replace(/\n{2,}/g,` `);return id(r)}l(xC,"preprocessMarkdown");function bC(t){return t.split(/\\n|\n|/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}l(bC,"nonMarkdownToLines");function kC(t,e={}){let r=xC(t,e),i=mt.lexer(r),a=[[]],n=0;function s(o,c="normal"){o.type==="text"?o.text.split(` `).forEach((h,u)=>{u!==0&&(n++,a.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&a[n].push({content:d,type:c})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{s(h,o.type)}):o.type==="html"&&a[n].push({content:o.text,type:"normal"})}return l(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(c=>{s(c)}):o.type==="html"?a[n].push({content:o.text,type:"normal"}):a[n].push({content:o.raw,type:"normal"})}),a}l(kC,"markdownToLines");function CC(t){return t?`

    ${t.replace(/\\n|\n/g,"
    ")}

    `:""}l(CC,"nonMarkdownToHTML");function $C(t,{markdownAutoWrap:e}={}){let r=mt.lexer(t);function i(a){return a.type==="text"?e===!1?a.text.replace(/\n */g,"
    ").replace(/ /g," "):a.text.replace(/\n */g,"
    "):a.type==="strong"?`${a.tokens?.map(i).join("")}`:a.type==="em"?`${a.tokens?.map(i).join("")}`:a.type==="paragraph"?`

    ${a.tokens?.map(i).join("")}

    `:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(P.warn(`Unsupported markdown: ${a.type}`),a.raw)}return l(i,"output"),r.map(i).join("")}l($C,"markdownToHTML");function wC(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}l(wC,"splitTextToChars");function vC(t,e){let r=wC(e.content);return pd(t,[],r,e.type)}l(vC,"splitWordToFitWidth");function pd(t,e,r,i){if(r.length===0)return[{content:e.join(""),type:i},{content:"",type:i}];let[a,...n]=r,s=[...e,a];return t([{content:s.join(""),type:i}])?pd(t,s,n,i):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}l(pd,"splitWordToFitWidthRecursion");function _C(t,e){if(t.some(({content:r})=>r.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return hs(t,e)}l(_C,"splitLineToFitWidth");function hs(t,e,r=[],i=[]){if(t.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";t[0].content===" "&&(a=" ",t.shift());let n=t.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(n),e(s))return hs(t,e,r,s);if(i.length>0)r.push(i),t.unshift(n);else if(n.content){let[o,c]=vC(e,n);r.push([o]),c.content&&t.unshift(c)}return hs(t,e,r)}l(hs,"splitLineToFitWidthRecursion");function Gh(t,e){e&&t.attr("style",e)}l(Gh,"applyStyle");var Fp=16384;async function SC(t,e,r,i,a=!1,n=Vt()){let s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,Fp)}px`),s.attr("height",`${Math.min(10*r,Fp)}px`);let o=s.append("xhtml:div"),c=on(e.label)?await yx(e.label.replace(Bn.lineBreakRegex,` `),n):Me(e.label,n),h=e.isNode?"nodeLabel":"edgeLabel",u=o.append("span");u.html(c),Gh(u,e.labelStyle),u.attr("class",`${h} ${i}`),Gh(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&o.attr("class","labelBkg");let d=o.node().getBoundingClientRect();return d.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),d=o.node().getBoundingClientRect()),s.node()}l(SC,"addHtmlSpan");function Vs(t,e,r,i=!1){let a=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}l(Vs,"createTspan");function TC(t,e,r){let i=t.append("text"),a=Vs(i,1,e);Gs(a,r);let n=a.node().getComputedTextLength();return i.remove(),n}l(TC,"computeWidthOfText");function QA(t,e,r){let i=t.append("text"),a=Vs(i,1,e);Gs(a,[{content:r,type:"normal"}]);let n=a.node()?.getBoundingClientRect();return n&&i.remove(),n}l(QA,"computeDimensionOfText");function MC(t,e,r,i=!1,a=!1){let n=e.append("g"),s=n.insert("rect").attr("class","background").attr("style","stroke: none"),o=n.append("text").attr("y","-10.1");a&&o.attr("text-anchor","middle");let c=0;for(let h of r){let u=l(p=>TC(n,1.1,p)<=t,"checkWidth"),d=u(h)?[h]:_C(h,u);for(let p of d){let f=Vs(o,c,1.1,a);Gs(f,p),c++}}if(i){let h=o.node().getBBox(),u=2;return s.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),n.node()}else return o.node()}l(MC,"createFormattedText");function Gs(t,e){t.text(""),e.forEach((r,i)=>{let a=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}l(Gs,"updateTextContentAndStyles");async function BC(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,n,s)=>(r.push((async()=>{let o=`${n}:${s}`;return await yA(o)?await En(o,void 0,{class:"label-icon"}):``})()),a));let i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}l(BC,"replaceIconSubstring");var rr=l(async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:n=!0,markdown:s=!0,isNode:o=!0,width:c=200,addSvgBackground:h=!1}={},u)=>{if(P.debug("XYZ createText",e,r,i,a,n,o,"addSvgBackground: ",h),n){let d=s?$C(e,u):CC(e),p=await BC(aa(d),u),f=e.replace(/\\\\/g,"\\"),g={isNode:o,label:on(e)?f:p,labelStyle:r.replace("fill:","color:")};return await SC(t,g,c,a,h,u)}else{let d=e.replace(//g,"
    "),p=s?kC(d.replace("
    ","
    "),u):bC(d),f=MC(c,t,p,e?h:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(f).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ut(f).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ut(f).select("text").attr("style",y)}return i?ut(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ut(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText"),st=l(async(t,e,r)=>{let i,a=e.useHtmlLabels||kr(xt()?.htmlLabels);r?i=r:i="node default";let n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=n.insert("g").attr("class","label").attr("style",Xt(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let c=!!e.icon||!!e.img,h=e.labelType==="markdown",u=await rr(s,Me(aa(o),xt()),{useHtmlLabels:a,width:e.width||xt().flowchart?.wrappingWidth,cssClasses:h?"markdown-node-label":void 0,style:e.labelStyle,addSvgBackground:c,markdown:h},xt()),d=u.getBBox(),p=(e?.padding??0)/2;if(a){let f=u.children[0],g=ut(u);await zk(f,o),d=f.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return a?s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):s.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:n,bbox:d,halfPadding:p,label:s}},"labelHelper"),vl=l(async(t,e,r)=>{let i=r.useHtmlLabels??Zt(xt()),a=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),n=await rr(a,Me(aa(e),xt()),{useHtmlLabels:i,width:r.width||xt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=n.getBBox(),o=r.padding/2;if(Zt(xt())){let c=n.children[0],h=ut(n);s=c.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}return i?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:a}},"insertLabel"),tt=l((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),ot=l((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function pt(t){let e=t.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}l(pt,"createPathFromPoints");function yr(t,e,r,i,a,n){let s=[],o=r-t,c=i-e,h=o/n,u=2*Math.PI/h,d=e+c/2;for(let p=0;p<=50;p++){let f=p/50,g=t+f*o,y=d+a*Math.sin(u*(g-t));s.push({x:g,y})}return s}l(yr,"generateFullSineWavePoints");function yn(t,e,r,i,a,n){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;h{var r=t.x,i=t.y,a=e.x-r,n=e.y-i,s=t.width/2,o=t.height/2,c,h;return Math.abs(n)*s>Math.abs(a)*o?(n<0&&(o=-o),c=n===0?0:o*a/n,h=o):(a<0&&(s=-s),c=s,h=a===0?0:s*n/a),{x:r+c,y:i+h}},"intersectRect"),sa=JA,KA=l(async(t,e,r,i=!1,a=!1)=>{let n=e||"";typeof n=="object"&&(n=n[0]);let s=xt(),o=Zt(s);return await rr(t,n,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},s)},"createLabel"),lr=KA,Cr=l((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" "),"createRoundedRectPathD"),AC=l(async(t,e)=>{P.info("Creating subgraph rect for ",e.id,e);let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:u}=K(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=Zt(r),f=d.insert("g").attr("class","cluster-label "),g;e.labelType==="markdown"?g=await rr(f,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}):g=await lr(f,e.label,e.labelStyle||"",!1,!0);let y=g.getBBox();if(Zt(r)){let T=g.children[0],O=ut(g);y=T.getBoundingClientRect(),O.attr("width",y.width),O.attr("height",y.height)}let m=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-m/2,k=e.y-x/2;P.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let T=Q.svg(d),O=J(e,{roughness:.7,fill:n,stroke:s,fillWeight:3,seed:a}),R=T.path(Cr(b,k,m,x,0),O);_=d.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",u.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",x);let{subGraphTitleTopMargin:w}=Xu(r);if(f.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),o){let T=f.select("span");T&&T.attr("style",o)}let $=_.node().getBBox();return e.offsetX=0,e.width=$.width,e.height=$.height,e.offsetY=y.height-e.padding/2,e.intersect=function(T){return sa(e,T)},{cluster:d,labelBBox:y}},"rect"),tL=l((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),a=0*e.padding,n=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");let s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return sa(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),eL=l(async(t,e)=>{let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:n,compositeBackground:s,compositeTitleBackground:o,nodeBorder:c}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),u=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),f=await lr(d,e.label,e.labelStyle,void 0,!0),g=f.getBBox();if(Zt(r)){let R=f.children[0],I=ut(f);g=R.getBoundingClientRect(),I.attr("width",g.width),I.attr("height",g.height)}let y=0*e.padding,m=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,k=e.height+y-g.height-6,_=e.x-x/2,w=e.y-b/2;e.width=x;let $=e.y-e.height/2-m+g.height+2,T;if(e.look==="handDrawn"){let R=e.cssClasses.includes("statediagram-cluster-alt"),I=Q.svg(h),S=e.rx||e.ry?I.path(Cr(_,w,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:c,seed:a}):I.rectangle(_,w,x,b,{seed:a});T=h.insert(()=>S,":first-child");let D=I.rectangle(_,$,x,k,{fill:R?n:s,fillStyle:R?"hachure":"solid",stroke:c,seed:a});T=h.insert(()=>S,":first-child"),p=h.insert(()=>D)}else T=u.insert("rect",":first-child"),T.attr("class","outer").attr("x",_).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",_).attr("y",$).attr("width",x).attr("height",k);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(Zt(r)?0:3)})`);let O=T.node().getBBox();return e.height=O.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(R){return sa(e,R)},{cluster:h,labelBBox:g}},"roundedWithTitle"),rL=l(async(t,e)=>{P.info("Creating subgraph rect for ",e.id,e);let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:s}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:u}=K(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=Zt(r),f=d.insert("g").attr("class","cluster-label "),g=await rr(f,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(Zt(r)){let T=g.children[0],O=ut(g);y=T.getBoundingClientRect(),O.attr("width",y.width),O.attr("height",y.height)}let m=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-m/2,k=e.y-x/2;P.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let T=Q.svg(d),O=J(e,{roughness:.7,fill:n,stroke:s,fillWeight:4,seed:a}),R=T.path(Cr(b,k,m,x,e.rx),O);_=d.insert(()=>(P.debug("Rough node insert CXC",R),R),":first-child"),_.select("path:nth-child(2)").attr("style",h.join(";")),_.select("path").attr("style",u.join(";").replace("fill","stroke"))}else _=d.insert("rect",":first-child"),_.attr("style",c).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",x);let{subGraphTitleTopMargin:w}=Xu(r);if(f.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),o){let T=f.select("span");T&&T.attr("style",o)}let $=_.node().getBBox();return e.offsetX=0,e.width=$.width,e.height=$.height,e.offsetY=y.height-e.padding/2,e.intersect=function(T){return sa(e,T)},{cluster:d,labelBBox:y}},"kanbanSection"),iL=l((t,e)=>{let r=xt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:n}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),c=0*e.padding,h=e.width+c;e.diff=-e.padding;let u=e.height+c,d=e.x-h/2,p=e.y-u/2;e.width=h;let f;if(e.look==="handDrawn"){let y=Q.svg(s).rectangle(d,p,h,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:a});f=s.insert(()=>y,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",u).attr("data-look",e.look);let g=f.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return sa(e,y)},{cluster:s,labelBBox:{}}},"divider"),aL=AC,nL={rect:AC,squareRect:aL,roundedWithTitle:eL,noteGroup:tL,divider:iL,kanbanSection:rL},LC=new Map,oL=l(async(t,e)=>{let r=e.shape||"rect",i=await nL[r](t,e);return LC.set(e.id,i),i},"insertCluster"),AE=l(()=>{LC=new Map},"clear");function FC(t,e){return t.intersect(e)}l(FC,"intersectNode");var sL=FC;function EC(t,e,r,i){var a=t.x,n=t.y,s=a-i.x,o=n-i.y,c=Math.sqrt(e*e*o*o+r*r*s*s),h=Math.abs(e*r*s/c);i.x0}l(Xh,"sameSign");var hL=IC;function PC(t,e,r){let i=t.x,a=t.y,n=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(u){s=Math.min(s,u.x),o=Math.min(o,u.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let c=i-t.width/2-s,h=a-t.height/2-o;for(let u=0;u1&&n.sort(function(u,d){let p=u.x-r.x,f=u.y-r.y,g=Math.sqrt(p*p+f*f),y=d.x-r.x,m=d.y-r.y,x=Math.sqrt(y*y+m*m);return gu,":first-child");return d.attr("class","anchor").attr("style",Xt(o)),tt(e,d),e.intersect=function(p){return P.info("Circle intersect",e,s,p),H.circle(e,s,p)},n}l(RC,"anchor");function Zh(t,e,r,i,a,n,s){let o=(t+r)/2,c=(e+i)/2,h=Math.atan2(i-e,r-t),u=(r-t)/2,d=(i-e)/2,p=u/a,f=d/n,g=Math.sqrt(p**2+f**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");let y=Math.sqrt(1-g**2),m=o+y*n*Math.sin(h)*(s?-1:1),x=c-y*a*Math.cos(h)*(s?-1:1),b=Math.atan2((e-x)/n,(t-m)/a),k=Math.atan2((i-x)/n,(r-m)/a)-b;s&&k<0&&(k+=2*Math.PI),!s&&k>0&&(k-=2*Math.PI);let _=[];for(let w=0;w<20;w++){let $=w/19,T=b+$*k,O=m+a*Math.cos(T),R=x+n*Math.sin(T);_.push({x:O,y:R})}return _}l(Zh,"generateArcPoints");async function NC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.width+e.padding+20,o=n.height+e.padding,c=o/2,h=c/(2.5+o/50),{cssStyles:u}=e,d=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...Zh(-s/2,-o/2,-s/2,o/2,h,c,!1),{x:s/2,y:o/2},...Zh(s/2,o/2,s/2,-o/2,h,c,!0)],p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=pt(d),y=p.path(g,f),m=a.insert(()=>y,":first-child");return m.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${h/2}, 0)`),tt(e,m),e.intersect=function(x){return H.polygon(e,d,x)},a}l(NC,"bowTieRect");function ir(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}l(ir,"insertPolygonShape");async function zC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.height+e.padding,o=12,c=n.width+e.padding+o,h=0,u=c,d=-s,p=0,f=[{x:h+o,y:d},{x:u,y:d},{x:u,y:p},{x:h,y:p},{x:h,y:d+o},{x:h+o,y:d}],g,{cssStyles:y}=e;if(e.look==="handDrawn"){let m=Q.svg(a),x=J(e,{}),b=pt(f),k=m.path(b,x);g=a.insert(()=>k,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),y&&g.attr("style",y)}else g=ir(a,c,s,f);return i&&g.attr("style",i),tt(e,g),e.intersect=function(m){return H.polygon(e,f,m)},a}l(zC,"card");function qC(t,e){let{nodeStyles:r}=K(e);e.label="";let i=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],o=Q.svg(i),c=J(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let h=pt(s),u=o.path(h,c),d=i.insert(()=>u,":first-child");return a&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(p){return H.polygon(e,s,p)},i}l(qC,"choice");async function fd(t,e,r){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i;let{shapeSvg:n,bbox:s,halfPadding:o}=await st(t,e,ot(e)),c=r?.padding??o,h=s.width/2+c,u,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Q.svg(n),f=J(e,{}),g=p.circle(0,0,h*2,f);u=n.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",Xt(d))}else u=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",h).attr("cx",0).attr("cy",0);return tt(e,u),e.calcIntersect=function(p,f){let g=p.width/2;return H.circle(p,g,f)},e.intersect=function(p){return P.info("Circle intersect",e,h,p),H.circle(e,h,p)},n}l(fd,"circle");function WC(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=t*2,a={x:i/2*e,y:i/2*r},n={x:-(i/2)*e,y:i/2*r},s={x:-(i/2)*e,y:-(i/2)*r},o={x:i/2*e,y:-(i/2)*r};return`M ${n.x},${n.y} L ${o.x},${o.y} M ${a.x},${a.y} L ${s.x},${s.y}`}l(WC,"createLine");function jC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r,e.label="";let a=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=Q.svg(a),c=J(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let h=o.circle(0,0,n*2,c),u=WC(n),d=o.path(u,c),p=a.insert(()=>h,":first-child");return p.insert(()=>d),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),tt(e,p),e.intersect=function(f){return P.info("crossedCircle intersect",e,{radius:n,point:f}),H.circle(e,n,f)},a}l(jC,"crossedCircle");function He(t,e,r,i=100,a=0,n=180){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;hb,":first-child").attr("stroke-opacity",0),k.insert(()=>m,":first-child"),k.attr("class","text"),u&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${h}, 0)`),s.attr("transform",`translate(${-o/2+h-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,k),e.intersect=function(_){return H.polygon(e,p,_)},a}l(HC,"curlyBraceLeft");function Ue(t,e,r,i=100,a=0,n=180){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;hb,":first-child").attr("stroke-opacity",0),k.insert(()=>m,":first-child"),k.attr("class","text"),u&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-h}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,k),e.intersect=function(_){return H.polygon(e,p,_)},a}l(UC,"curlyBraceRight");function zt(t,e,r,i=100,a=0,n=180){let s=[],o=a*Math.PI/180,c=(n*Math.PI/180-o)/(i-1);for(let h=0;hw,":first-child").attr("stroke-opacity",0),$.insert(()=>x,":first-child"),$.insert(()=>k,":first-child"),$.attr("class","text"),u&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",u),i&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${h-h/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,$),e.intersect=function(T){return H.polygon(e,f,T)},a}l(YC,"curlyBraces");async function VC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=80,o=20,c=Math.max(s,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(o,n.height+(e.padding??0)*2,e?.height??0),u=h/2,{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=c,y=h,m=g-u,x=y/4,b=[{x:m,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:m,y},...yn(-m,-y/2,u,50,270,90)],k=pt(b),_=p.path(k,f),w=a.insert(()=>_,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-c/2}, ${-h/2})`),tt(e,w),e.intersect=function($){return H.polygon(e,b,$)},a}l(VC,"curvedTrapezoid");var uL=l((t,e,r,i,a,n)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),dL=l((t,e,r,i,a,n)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),pL=l((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function GC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+e.padding,e.width??0),c=o/2,h=c/(2.5+o/50),u=Math.max(n.height+h+e.padding,e.height??0),d,{cssStyles:p}=e;if(e.look==="handDrawn"){let f=Q.svg(a),g=dL(0,0,o,u,c,h),y=pL(0,h,o,u,c,h),m=f.path(g,J(e,{})),x=f.path(y,J(e,{fill:"none"}));d=a.insert(()=>x,":first-child"),d=a.insert(()=>m,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let f=uL(0,0,o,u,c,h);d=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Xt(p)).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-o/2}, ${-(u/2+h)})`),tt(e,d),s.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(e.padding??0)/1.5-(n.y-(n.top??0))})`),e.intersect=function(f){let g=H.rect(e,f),y=g.x-(e.x??0);if(c!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-h)){let m=h*h*(1-y*y/(c*c));m>0&&(m=Math.sqrt(m)),m=h-m,f.y-(e.y??0)>0&&(m=-m),g.y+=m}return g},a}l(GC,"cylinder");async function XC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+e.padding,c=n.height+e.padding,h=c*.2,u=-o/2,d=-c/2-h/2,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:u,y:d+h},{x:-u,y:d+h},{x:-u,y:-d},{x:u,y:-d},{x:u,y:d},{x:-u,y:d},{x:-u,y:d+h}],m=f.polygon(y.map(b=>[b.x,b.y]),g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${u+(e.padding??0)/2-(n.x-(n.left??0))}, ${d+h+(e.padding??0)/2-(n.y-(n.top??0))})`),tt(e,x),e.intersect=function(b){return H.rect(e,b)},a}l(XC,"dividedRectangle");async function ZC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s}=await st(t,e,ot(e)),o=n.width/2+s+5,c=n.width/2+s,h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{roughness:.2,strokeWidth:2.5}),f=J(e,{roughness:.2,strokeWidth:1.5}),g=d.circle(0,0,o*2,p),y=d.circle(0,0,c*2,f);h=a.insert("g",":first-child"),h.attr("class",Xt(e.cssClasses)).attr("style",Xt(u)),h.node()?.appendChild(g),h.node()?.appendChild(y)}else{h=a.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",o).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return tt(e,h),e.intersect=function(d){return P.info("DoubleCircle intersect",e,o,d),H.circle(e,o,d)},a}l(ZC,"doublecircle");function QC(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=K(e);e.label="",e.labelStyle=i;let n=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,c=Q.svg(n),{nodeBorder:h}=r,u=J(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(u.roughness=0);let d=c.circle(0,0,s*2,u),p=n.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",a),tt(e,p),e.intersect=function(f){return P.info("filledCircle intersect",e,{radius:s,point:f}),H.circle(e,s,f)},n}l(QC,"filledCircle");async function JC(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=n.width+(e.padding??0),c=o+n.height,h=o+n.height,u=[{x:0,y:-c},{x:h,y:-c},{x:h/2,y:0}],{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=pt(u),y=p.path(g,f),m=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),e.width=o,e.height=c,tt(e,m),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(x){return P.info("Triangle intersect",e,u,x),H.polygon(e,u,x)},a}l(JC,"flippedTriangle");function KC(t,e,{dir:r,config:{state:i,themeVariables:a}}){let{nodeStyles:n}=K(e);e.label="";let s=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,c=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);r==="LR"&&(c=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));let u=-1*c/2,d=-1*h/2,p=Q.svg(s),f=J(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=p.rectangle(u,d,c,h,f),y=s.insert(()=>g,":first-child");o&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",o),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),tt(e,y);let m=i?.padding??0;return e.width&&e.height&&(e.width+=m/2||0,e.height+=m/2||0),e.intersect=function(x){return H.rect(e,x)},s}l(KC,"forkJoin");async function t$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let a=80,n=50,{shapeSvg:s,bbox:o}=await st(t,e,ot(e)),c=Math.max(a,o.width+(e.padding??0)*2,e?.width??0),h=Math.max(n,o.height+(e.padding??0)*2,e?.height??0),u=h/2,{cssStyles:d}=e,p=Q.svg(s),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=[{x:-c/2,y:-h/2},{x:c/2-u,y:-h/2},...yn(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},{x:-c/2,y:h/2}],y=pt(g),m=p.path(y,f),x=s.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),tt(e,x),e.intersect=function(b){return P.info("Pill intersect",e,{radius:u,point:b}),H.polygon(e,g,b)},s}l(t$,"halfRoundedRectangle");var fL=l((t,e,r,i,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-i/2}`,`L${t+r-a},${e-i}`,`L${t+a},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function e$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=4,o=n.height+e.padding,c=o/s,h=n.width+2*c+e.padding,u=[{x:c,y:0},{x:h-c,y:0},{x:h,y:-o/2},{x:h-c,y:-o},{x:c,y:-o},{x:0,y:-o/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let f=Q.svg(a),g=J(e,{}),y=fL(0,0,h,o,c),m=f.path(y,g);d=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),p&&d.attr("style",p)}else d=ir(a,h,o,u);return i&&d.attr("style",i),e.width=h,e.height=o,tt(e,d),e.intersect=function(f){return H.polygon(e,u,f)},a}l(e$,"hexagon");async function r$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.label="",e.labelStyle=r;let{shapeSvg:a}=await st(t,e,ot(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,c=Q.svg(a),h=J(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],d=pt(u),p=c.path(d,h),f=a.insert(()=>p,":first-child");return f.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-n/2}, ${-s/2})`),tt(e,f),e.intersect=function(g){return P.info("Pill intersect",e,{points:u}),H.polygon(e,u,g)},a}l(r$,"hourglass");async function i$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,label:d}=await st(t,e,"icon-shape default"),p=e.pos==="t",f=o,g=o,{nodeBorder:y}=r,{stylesMap:m}=oa(e),x=-g/2,b=-f/2,k=e.label?8:0,_=Q.svg(h),w=J(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let $=_.rectangle(x,b,g,f,w),T=Math.max(g,u.width),O=f+u.height+k,R=_.rectangle(-T/2,-O/2,T,O,{...w,fill:"transparent",stroke:"none"}),I=h.insert(()=>$,":first-child"),S=h.insert(()=>R);if(e.icon){let D=h.append("g");D.html(`${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let A=D.node().getBBox(),B=A.width,L=A.height,M=A.x,E=A.y;D.attr("transform",`translate(${-B/2-M},${p?u.height/2+k/2-L/2-E:-u.height/2-k/2-L/2-E})`),D.attr("style",`color: ${m.get("stroke")??y};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-O/2:O/2-u.height})`),I.attr("transform",`translate(0,${p?u.height/2+k/2:-u.height/2-k/2})`),tt(e,S),e.intersect=function(D){if(P.info("iconSquare intersect",e,D),!e.label)return H.rect(e,D);let A=e.x??0,B=e.y??0,L=e.height??0,M=[];return p?M=[{x:A-u.width/2,y:B-L/2},{x:A+u.width/2,y:B-L/2},{x:A+u.width/2,y:B-L/2+u.height+k},{x:A+g/2,y:B-L/2+u.height+k},{x:A+g/2,y:B+L/2},{x:A-g/2,y:B+L/2},{x:A-g/2,y:B-L/2+u.height+k},{x:A-u.width/2,y:B-L/2+u.height+k}]:M=[{x:A-g/2,y:B-L/2},{x:A+g/2,y:B-L/2},{x:A+g/2,y:B-L/2+f},{x:A+u.width/2,y:B-L/2+f},{x:A+u.width/2/2,y:B+L/2},{x:A-u.width/2,y:B+L/2},{x:A-u.width/2,y:B-L/2+f},{x:A-g/2,y:B-L/2+f}],H.polygon(e,M,D)},h}l(i$,"icon");async function a$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,label:d}=await st(t,e,"icon-shape default"),p=20,f=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=oa(e),b=Q.svg(h),k=J(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=x.get("fill");k.stroke=_??m;let w=h.append("g");e.icon&&w.html(`${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let $=w.node().getBBox(),T=$.width,O=$.height,R=$.x,I=$.y,S=Math.max(T,O)*Math.SQRT2+p*2,D=b.circle(0,0,S,k),A=Math.max(S,u.width),B=S+u.height+f,L=b.rectangle(-A/2,-B/2,A,B,{...k,fill:"transparent",stroke:"none"}),M=h.insert(()=>D,":first-child"),E=h.insert(()=>L);return w.attr("transform",`translate(${-T/2-R},${g?u.height/2+f/2-O/2-I:-u.height/2-f/2-O/2-I})`),w.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-B/2:B/2-u.height})`),M.attr("transform",`translate(0,${g?u.height/2+f/2:-u.height/2-f/2})`),tt(e,E),e.intersect=function(F){return P.info("iconSquare intersect",e,F),H.rect(e,F)},h}l(a$,"iconCircle");async function n$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,halfPadding:d,label:p}=await st(t,e,"icon-shape default"),f=e.pos==="t",g=o+d*2,y=o+d*2,{nodeBorder:m,mainBkg:x}=r,{stylesMap:b}=oa(e),k=-y/2,_=-g/2,w=e.label?8:0,$=Q.svg(h),T=J(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let O=b.get("fill");T.stroke=O??x;let R=$.path(Cr(k,_,y,g,5),T),I=Math.max(y,u.width),S=g+u.height+w,D=$.rectangle(-I/2,-S/2,I,S,{...T,fill:"transparent",stroke:"none"}),A=h.insert(()=>R,":first-child").attr("class","icon-shape2"),B=h.insert(()=>D);if(e.icon){let L=h.append("g");L.html(`${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let M=L.node().getBBox(),E=M.width,F=M.height,z=M.x,V=M.y;L.attr("transform",`translate(${-E/2-z},${f?u.height/2+w/2-F/2-V:-u.height/2-w/2-F/2-V})`),L.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-S/2:S/2-u.height})`),A.attr("transform",`translate(0,${f?u.height/2+w/2:-u.height/2-w/2})`),tt(e,B),e.intersect=function(L){if(P.info("iconSquare intersect",e,L),!e.label)return H.rect(e,L);let M=e.x??0,E=e.y??0,F=e.height??0,z=[];return f?z=[{x:M-u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2+u.height+w},{x:M+y/2,y:E-F/2+u.height+w},{x:M+y/2,y:E+F/2},{x:M-y/2,y:E+F/2},{x:M-y/2,y:E-F/2+u.height+w},{x:M-u.width/2,y:E-F/2+u.height+w}]:z=[{x:M-y/2,y:E-F/2},{x:M+y/2,y:E-F/2},{x:M+y/2,y:E-F/2+g},{x:M+u.width/2,y:E-F/2+g},{x:M+u.width/2/2,y:E+F/2},{x:M-u.width/2,y:E+F/2},{x:M-u.width/2,y:E-F/2+g},{x:M-y/2,y:E-F/2+g}],H.polygon(e,z,L)},h}l(n$,"iconRounded");async function o$(t,e,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=K(e);e.labelStyle=a;let n=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(n,s),c=i?.wrappingWidth;e.width=Math.max(o,c??0);let{shapeSvg:h,bbox:u,halfPadding:d,label:p}=await st(t,e,"icon-shape default"),f=e.pos==="t",g=o+d*2,y=o+d*2,{nodeBorder:m,mainBkg:x}=r,{stylesMap:b}=oa(e),k=-y/2,_=-g/2,w=e.label?8:0,$=Q.svg(h),T=J(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let O=b.get("fill");T.stroke=O??x;let R=$.path(Cr(k,_,y,g,.1),T),I=Math.max(y,u.width),S=g+u.height+w,D=$.rectangle(-I/2,-S/2,I,S,{...T,fill:"transparent",stroke:"none"}),A=h.insert(()=>R,":first-child"),B=h.insert(()=>D);if(e.icon){let L=h.append("g");L.html(`${await En(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let M=L.node().getBBox(),E=M.width,F=M.height,z=M.x,V=M.y;L.attr("transform",`translate(${-E/2-z},${f?u.height/2+w/2-F/2-V:-u.height/2-w/2-F/2-V})`),L.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-S/2:S/2-u.height})`),A.attr("transform",`translate(0,${f?u.height/2+w/2:-u.height/2-w/2})`),tt(e,B),e.intersect=function(L){if(P.info("iconSquare intersect",e,L),!e.label)return H.rect(e,L);let M=e.x??0,E=e.y??0,F=e.height??0,z=[];return f?z=[{x:M-u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2},{x:M+u.width/2,y:E-F/2+u.height+w},{x:M+y/2,y:E-F/2+u.height+w},{x:M+y/2,y:E+F/2},{x:M-y/2,y:E+F/2},{x:M-y/2,y:E-F/2+u.height+w},{x:M-u.width/2,y:E-F/2+u.height+w}]:z=[{x:M-y/2,y:E-F/2},{x:M+y/2,y:E-F/2},{x:M+y/2,y:E-F/2+g},{x:M+u.width/2,y:E-F/2+g},{x:M+u.width/2/2,y:E+F/2},{x:M-u.width/2,y:E+F/2},{x:M-u.width/2,y:E-F/2+g},{x:M-y/2,y:E-F/2+g}],H.polygon(e,z,L)},h}l(o$,"iconSquare");async function s$(t,e,{config:{flowchart:r}}){let i=new Image;i.src=e?.img??"",await i.decode();let a=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/n;let{labelStyles:s}=K(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let c=Math.max(e.label?o??0:0,e?.assetWidth??a),h=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,u=e.constraint==="on"?h/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(h,o??0);let{shapeSvg:d,bbox:p,label:f}=await st(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,m=-u/2,x=e.label?8:0,b=Q.svg(d),k=J(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=b.rectangle(y,m,h,u,k),w=Math.max(h,p.width),$=u+p.height+x,T=b.rectangle(-w/2,-$/2,w,$,{...k,fill:"none",stroke:"none"}),O=d.insert(()=>_,":first-child"),R=d.insert(()=>T);if(e.img){let I=d.append("image");I.attr("href",e.img),I.attr("width",h),I.attr("height",u),I.attr("preserveAspectRatio","none"),I.attr("transform",`translate(${-h/2},${g?$/2-u:-$/2})`)}return f.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-u/2-p.height/2-x/2:u/2-p.height/2+x/2})`),O.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),tt(e,R),e.intersect=function(I){if(P.info("iconSquare intersect",e,I),!e.label)return H.rect(e,I);let S=e.x??0,D=e.y??0,A=e.height??0,B=[];return g?B=[{x:S-p.width/2,y:D-A/2},{x:S+p.width/2,y:D-A/2},{x:S+p.width/2,y:D-A/2+p.height+x},{x:S+h/2,y:D-A/2+p.height+x},{x:S+h/2,y:D+A/2},{x:S-h/2,y:D+A/2},{x:S-h/2,y:D-A/2+p.height+x},{x:S-p.width/2,y:D-A/2+p.height+x}]:B=[{x:S-h/2,y:D-A/2},{x:S+h/2,y:D-A/2},{x:S+h/2,y:D-A/2+u},{x:S+p.width/2,y:D-A/2+u},{x:S+p.width/2/2,y:D+A/2},{x:S-p.width/2,y:D+A/2},{x:S-p.width/2,y:D-A/2+u},{x:S-h/2,y:D-A/2+u}],H.polygon(e,B,I)},d}l(s$,"imageSquare");async function l$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(l$,"inv_trapezoid");async function On(t,e,r){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i;let{shapeSvg:n,bbox:s}=await st(t,e,ot(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),c=Math.max(s.height+r.labelPaddingY*2,e?.height||0),h=-o/2,u=-c/2,d,{rx:p,ry:f}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,f=r.ry),e.look==="handDrawn"){let y=Q.svg(n),m=J(e,{}),x=p||f?y.path(Cr(h,u,o,c,p||0),m):y.rectangle(h,u,o,c,m);d=n.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Xt(g))}else d=n.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",Xt(p)).attr("ry",Xt(f)).attr("x",h).attr("y",u).attr("width",o).attr("height",c);return tt(e,d),e.calcIntersect=function(y,m){return H.rect(y,m)},e.intersect=function(y){return H.rect(e,y)},n}l(On,"drawRect");async function h$(t,e){let{shapeSvg:r,bbox:i,label:a}=await st(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),tt(e,n),e.intersect=function(s){return H.rect(e,s)},r}l(h$,"labelRect");async function c$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(c$,"lean_left");async function u$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),c=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(u$,"lean_right");function d$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.label="",e.labelStyle=r;let a=t.insert("g").attr("class",ot(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=7,h=[{x:s,y:0},{x:0,y:o+c/2},{x:s-2*c,y:o+c/2},{x:0,y:2*o},{x:s,y:o-c/2},{x:2*c,y:o-c/2}],u=Q.svg(a),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=pt(h),f=u.path(p,d),g=a.insert(()=>f,":first-child");return n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),tt(e,g),e.intersect=function(y){return P.info("lightningBolt intersect",e,y),H.polygon(e,h,y)},a}l(d$,"lightningBolt");var gL=l((t,e,r,i,a,n,s)=>[`M${t},${e+n}`,`a${a},${n} 0,0,0 ${r},0`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+n+s}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),yL=l((t,e,r,i,a,n,s)=>[`M${t},${e+n}`,`M${t+r},${e+n}`,`a${a},${n} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${n} 0,0,0 ${r},0`,`l0,${-i}`,`M${t},${e+n+s}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),mL=l((t,e,r,i,a,n)=>[`M${t-r/2},${-i/2}`,`a${a},${n} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function p$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0),e.width??0),c=o/2,h=c/(2.5+o/50),u=Math.max(n.height+h+(e.padding??0),e.height??0),d=u*.1,p,{cssStyles:f}=e;if(e.look==="handDrawn"){let g=Q.svg(a),y=yL(0,0,o,u,c,h,d),m=mL(0,h,o,u,c,h),x=J(e,{}),b=g.path(y,x),k=g.path(m,x);a.insert(()=>k,":first-child").attr("class","line"),p=a.insert(()=>b,":first-child"),p.attr("class","basic label-container"),f&&p.attr("style",f)}else{let g=gL(0,0,o,u,c,h,d);p=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Xt(f)).attr("style",i)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-o/2}, ${-(u/2+h)})`),tt(e,p),s.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+h-(n.y-(n.top??0))})`),e.intersect=function(g){let y=H.rect(e,g),m=y.x-(e.x??0);if(c!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(y.y-(e.y??0))>(e.height??0)/2-h)){let x=h*h*(1-m*m/(c*c));x>0&&(x=Math.sqrt(x)),x=h-x,g.y-(e.y??0)>0&&(x=-x),y.y+=x}return y},a}l(p$,"linedCylinder");async function f$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/4,u=c+h,{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=[{x:-o/2-o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:u/2},...yr(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,h,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2},{x:-o/2,y:-u/2},{x:-o/2,y:u/2*1.1},{x:-o/2,y:-u/2}],y=p.polygon(g.map(x=>[x.x,x.y]),f),m=a.insert(()=>y,":first-child");return m.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),tt(e,m),e.intersect=function(x){return H.polygon(e,g,x)},a}l(f$,"linedWaveEdgedRect");async function g$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=5,u=-o/2,d=-c/2,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{}),y=[{x:u-h,y:d+h},{x:u-h,y:d+c+h},{x:u+o-h,y:d+c+h},{x:u+o-h,y:d+c},{x:u+o,y:d+c},{x:u+o,y:d+c-h},{x:u+o+h,y:d+c-h},{x:u+o+h,y:d-h},{x:u+h,y:d-h},{x:u+h,y:d},{x:u,y:d},{x:u,y:d+h}],m=[{x:u,y:d+h},{x:u+o-h,y:d+h},{x:u+o-h,y:d+c},{x:u+o,y:d+c},{x:u+o,y:d},{x:u,y:d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=pt(y),b=f.path(x,g),k=pt(m),_=f.path(k,{...g,fill:"none"}),w=a.insert(()=>_,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(n.width/2)-h-(n.x-(n.left??0))}, ${-(n.height/2)+h-(n.y-(n.top??0))})`),tt(e,w),e.intersect=function($){return H.polygon(e,y,$)},a}l(g$,"multiRect");async function y$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/4,u=c+h,d=-o/2,p=-u/2,f=5,{cssStyles:g}=e,y=yr(d-f,p+u+f,d+o-f,p+u+f,h,.8),m=y?.[y.length-1],x=[{x:d-f,y:p+f},{x:d-f,y:p+u+f},...y,{x:d+o-f,y:m.y-f},{x:d+o,y:m.y-f},{x:d+o,y:m.y-2*f},{x:d+o+f,y:m.y-2*f},{x:d+o+f,y:p-f},{x:d+f,y:p-f},{x:d+f,y:p},{x:d,y:p},{x:d,y:p+f}],b=[{x:d,y:p+f},{x:d+o-f,y:p+f},{x:d+o-f,y:m.y-f},{x:d+o,y:m.y-f},{x:d+o,y:p},{x:d,y:p}],k=Q.svg(a),_=J(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let w=pt(x),$=k.path(w,_),T=pt(b),O=k.path(T,_),R=a.insert(()=>$,":first-child");return R.insert(()=>O),R.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",g),i&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-(n.width/2)-f-(n.x-(n.left??0))}, ${-(n.height/2)+f-h/2-(n.y-(n.top??0))})`),tt(e,R),e.intersect=function(I){return H.polygon(e,x,I)},a}l(y$,"multiWaveEdgedRectangle");async function m$(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i,e.useHtmlLabels||Zt(Vt())||(e.centerLabel=!0);let{shapeSvg:n,bbox:s,label:o}=await st(t,e,ot(e)),c=Math.max(s.width+(e.padding??0)*2,e?.width??0),h=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-c/2,d=-h/2,{cssStyles:p}=e,f=Q.svg(n),g=J(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=f.rectangle(u,d,c,h,g),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",p),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),tt(e,m),e.intersect=function(x){return H.rect(e,x)},n}l(m$,"note");var xL=l((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function x$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.width+e.padding,o=n.height+e.padding,c=s+o,h=.5,u=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let f=Q.svg(a),g=J(e,{}),y=xL(0,0,c),m=f.path(y,g);d=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2+h}, ${c/2})`),p&&d.attr("style",p)}else d=ir(a,c,c,u),d.attr("transform",`translate(${-c/2+h}, ${c/2})`);return i&&d.attr("style",i),tt(e,d),e.calcIntersect=function(f,g){let y=f.width,m=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=H.polygon(f,m,g);return{x:x.x-.5,y:x.y-.5}},e.intersect=function(f){return this.calcIntersect(e,f)},a}l(x$,"question");async function b$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0),e?.width??0),c=Math.max(n.height+(e.padding??0),e?.height??0),h=-o/2,u=-c/2,d=u/2,p=[{x:h+d,y:u},{x:h,y:0},{x:h+d,y:-u},{x:-h,y:-u},{x:-h,y:u}],{cssStyles:f}=e,g=Q.svg(a),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=pt(p),x=g.path(m,y),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),tt(e,b),e.intersect=function(k){return H.polygon(e,p,k)},a}l(b$,"rect_left_inv_arrow");async function k$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";let n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=n.insert("g"),o=n.insert("g").attr("class","label").attr("style",i),c=e.description,h=e.label,u=await lr(o,h,e.labelStyle,!0,!0),d={width:0,height:0};if(Zt(xt())){let O=u.children[0],R=ut(u);d=O.getBoundingClientRect(),R.attr("width",d.width),R.attr("height",d.height)}P.info("Text 2",c);let p=c||[],f=u.getBBox(),g=await lr(o,Array.isArray(p)?p.join("
    "):p,e.labelStyle,!0,!0),y=g.children[0],m=ut(g);d=y.getBoundingClientRect(),m.attr("width",d.width),m.attr("height",d.height);let x=(e.padding||0)/2;ut(g).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+x+5)+")"),ut(u).attr("transform","translate( "+(d.width(P.debug("Rough node insert CXC",I),S),":first-child"),$=n.insert(()=>(P.debug("Rough node insert CXC",I),I),":first-child")}else $=s.insert("rect",":first-child"),T=s.insert("line"),$.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),T.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+f.height+x).attr("y2",-d.height/2-x+f.height+x);return tt(e,$),e.intersect=function(O){return H.rect(e,O)},n}l(k$,"rectWithTitle");async function C$(t,e){let r={rx:5,ry:5,labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return On(t,e,r)}l(C$,"roundedRect");async function $$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=e?.padding??0,c=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),u=-n.width/2-o,d=-n.height/2-o,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:u,y:d},{x:u+c+8,y:d},{x:u+c+8,y:d+h},{x:u-8,y:d+h},{x:u-8,y:d},{x:u,y:d},{x:u,y:d+h}],m=f.polygon(y.map(b=>[b.x,b.y]),g),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container").attr("style",Xt(p)),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-c/2+4+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-(n.y-(n.top??0))})`),tt(e,x),e.intersect=function(b){return H.rect(e,b)},a}l($$,"shadedProcess");async function w$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=-o/2,u=-c/2,{cssStyles:d}=e,p=Q.svg(a),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=[{x:h,y:u},{x:h,y:u+c},{x:h+o,y:u+c},{x:h+o,y:u-c/2}],y=pt(g),m=p.path(y,f),x=a.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))}, ${-c/4+(e.padding??0)-(n.y-(n.top??0))})`),tt(e,x),e.intersect=function(b){return H.polygon(e,g,b)},a}l(w$,"slopedRect");async function v$(t,e){let r={rx:0,ry:0,labelPaddingX:e.labelPaddingX??(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return On(t,e,r)}l(v$,"squareRect");async function _$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.height+e.padding,o=n.width+s/4+e.padding,c=s/2,{cssStyles:h}=e,u=Q.svg(a),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-o/2+c,y:-s/2},{x:o/2-c,y:-s/2},...yn(-o/2+c,0,c,50,90,270),{x:o/2-c,y:s/2},...yn(o/2-c,0,c,50,270,450)],f=pt(p),g=u.path(f,d),y=a.insert(()=>g,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),tt(e,y),e.intersect=function(m){return H.polygon(e,p,m)},a}l(_$,"stadium");async function S$(t,e){return On(t,e,{rx:5,ry:5})}l(S$,"state");function T$(t,e,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i;let{cssStyles:n}=e,{lineColor:s,stateBorder:o,nodeBorder:c}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),u=Q.svg(h),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=u.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),f=o??c,g=u.circle(0,0,5,{...d,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),n&&y.selectAll("path").attr("style",n),a&&y.selectAll("path").attr("style",a),tt(e,y),e.intersect=function(m){return H.circle(e,7,m)},h}l(T$,"stateEnd");function M$(t,e,{config:{themeVariables:r}}){let{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n;if(e.look==="handDrawn"){let s=Q.svg(a).circle(0,0,14,tA(i));n=a.insert(()=>s),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return tt(e,n),e.intersect=function(s){return H.circle(e,7,s)},a}l(M$,"stateStart");async function B$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=(e?.padding||0)/2,o=n.width+e.padding,c=n.height+e.padding,h=-n.width/2-s,u=-n.height/2-s,d=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Q.svg(a),f=J(e,{}),g=p.rectangle(h-8,u,o+16,c,f),y=p.line(h,u,h,u+c,f),m=p.line(h+o,u,h+o,u+c,f);a.insert(()=>y,":first-child"),a.insert(()=>m,":first-child");let x=a.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",Xt(b)),tt(e,x)}else{let p=ir(a,o,c,d);i&&p.attr("style",i),tt(e,p)}return e.intersect=function(p){return H.polygon(e,d,p)},a}l(B$,"subroutine");async function A$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),c=-s/2,h=-o/2,u=.2*o,d=.2*o,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{}),y=[{x:c-u/2,y:h},{x:c+s+u/2,y:h},{x:c+s+u/2,y:h+o},{x:c-u/2,y:h+o}],m=[{x:c+s-u/2,y:h+o},{x:c+s+u/2,y:h+o},{x:c+s+u/2,y:h+o-d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=pt(y),b=f.path(x,g),k=pt(m),_=f.path(k,{...g,fillStyle:"solid"}),w=a.insert(()=>_,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),tt(e,w),e.intersect=function($){return H.polygon(e,y,$)},a}l(A$,"taggedRect");async function L$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/4,u=.2*o,d=.2*c,p=c+h,{cssStyles:f}=e,g=Q.svg(a),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-o/2-o/2*.1,y:p/2},...yr(-o/2-o/2*.1,p/2,o/2+o/2*.1,p/2,h,.8),{x:o/2+o/2*.1,y:-p/2},{x:-o/2-o/2*.1,y:-p/2}],x=-o/2+o/2*.1,b=-p/2-d*.4,k=[{x:x+o-u,y:(b+c)*1.4},{x:x+o,y:b+c-d},{x:x+o,y:(b+c)*.9},...yr(x+o,(b+c)*1.3,x+o-u,(b+c)*1.5,-c*.03,.5)],_=pt(m),w=g.path(_,y),$=pt(k),T=g.path($,{...y,fillStyle:"solid"}),O=a.insert(()=>T,":first-child");return O.insert(()=>w,":first-child"),O.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))},${-c/2+(e.padding??0)-h/2-(n.y-(n.top??0))})`),tt(e,O),e.intersect=function(R){return H.polygon(e,m,R)},a}l(L$,"taggedWaveEdgedRectangle");async function F$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=Math.max(n.width+e.padding,e?.width||0),o=Math.max(n.height+e.padding,e?.height||0),c=-s/2,h=-o/2,u=a.insert("rect",":first-child");return u.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",s).attr("height",o),tt(e,u),e.intersect=function(d){return H.rect(e,d)},a}l(F$,"text");var bL=l((t,e,r,i,a,n)=>`M${t},${e} a${a},${n} 0,0,1 0,${-i} l${r},0 a${a},${n} 0,0,1 0,${i} M${r},${-i} a${a},${n} 0,0,0 0,${i} l${-r},0`,"createCylinderPathD"),kL=l((t,e,r,i,a,n)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${n} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${n} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),CL=l((t,e,r,i,a,n)=>[`M${t+r/2},${-i/2}`,`a${a},${n} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function E$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s,halfPadding:o}=await st(t,e,ot(e)),c=e.look==="neo"?o*2:o,h=n.height+c,u=h/2,d=u/(2.5+h/50),p=n.width+d+c,{cssStyles:f}=e,g;if(e.look==="handDrawn"){let y=Q.svg(a),m=kL(0,0,p,h,d,u),x=CL(0,0,p,h,d,u),b=y.path(m,J(e,{})),k=y.path(x,J(e,{fill:"none"}));g=a.insert(()=>k,":first-child"),g=a.insert(()=>b,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{let y=bL(0,0,p,h,d,u);g=a.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",Xt(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),s.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),tt(e,g),e.intersect=function(y){let m=H.rect(e,y),x=m.y-(e.y??0);if(u!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(m.x-(e.x??0))>(e.width??0)/2-d)){let b=d*d*(1-x*x/(u*u));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(e.x??0)>0&&(b=-b),m.x+=b}return m},a}l(E$,"tiltedCylinder");async function D$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=n.width+e.padding,o=n.height+e.padding,c=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],h,{cssStyles:u}=e;if(e.look==="handDrawn"){let d=Q.svg(a),p=J(e,{}),f=pt(c),g=d.path(f,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&h.attr("style",u)}else h=ir(a,s,o,c);return i&&h.attr("style",i),e.width=s,e.height=o,tt(e,h),e.intersect=function(d){return H.polygon(e,c,d)},a}l(D$,"trapezoid");async function O$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=60,o=20,c=Math.max(s,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(o,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,d=Q.svg(a),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let f=[{x:-c/2*.8,y:-h/2},{x:c/2*.8,y:-h/2},{x:c/2,y:-h/2*.6},{x:c/2,y:h/2},{x:-c/2,y:h/2},{x:-c/2,y:-h/2*.6}],g=pt(f),y=d.path(g,p),m=a.insert(()=>y,":first-child");return m.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",u),i&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),tt(e,m),e.intersect=function(x){return H.polygon(e,f,x)},a}l(O$,"trapezoidalPentagon");async function I$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=e.useHtmlLabels||Zt(xt()),c=n.width+(e.padding??0),h=c+n.height,u=c+n.height,d=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-h}],{cssStyles:p}=e,f=Q.svg(a),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=pt(d),m=f.path(y,g),x=a.insert(()=>m,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),i&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),e.width=c,e.height=h,tt(e,x),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${h/2-(n.height+(e.padding??0)/(o?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(b){return P.info("Triangle intersect",e,d,b),H.polygon(e,d,b)},a}l(I$,"triangle");async function P$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=c/8,u=c+h,{cssStyles:d}=e,p=70-o,f=p>0?p/2:0,g=Q.svg(a),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-o/2-f,y:u/2},...yr(-o/2-f,u/2,o/2+f,u/2,h,.8),{x:o/2+f,y:-u/2},{x:-o/2-f,y:-u/2}],x=pt(m),b=g.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))},${-c/2+(e.padding??0)-h-(n.y-(n.top??0))})`),tt(e,k),e.intersect=function(_){return H.polygon(e,m,_)},a}l(P$,"waveEdgedRectangle");async function R$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n}=await st(t,e,ot(e)),s=100,o=50,c=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),u=c/h,d=c,p=h;d>p*u?p=d/u:d=p*u,d=Math.max(d,s),p=Math.max(p,o);let f=Math.min(p*.2,p/4),g=p+f*2,{cssStyles:y}=e,m=Q.svg(a),x=J(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2,y:g/2},...yr(-d/2,g/2,d/2,g/2,f,1),{x:d/2,y:-g/2},...yr(d/2,-g/2,-d/2,-g/2,f,-1)],k=pt(b),_=m.path(k,x),w=a.insert(()=>_,":first-child");return w.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",i),tt(e,w),e.intersect=function($){return H.polygon(e,b,$)},a}l(R$,"waveRectangle");async function N$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,label:s}=await st(t,e,ot(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),h=5,u=-o/2,d=-c/2,{cssStyles:p}=e,f=Q.svg(a),g=J(e,{}),y=[{x:u-h,y:d-h},{x:u-h,y:d+c},{x:u+o,y:d+c},{x:u+o,y:d-h}],m=`M${u-h},${d-h} L${u+o},${d-h} L${u+o},${d+c} L${u-h},${d+c} L${u-h},${d-h} M${u-h},${d} L${u+o},${d} M${u},${d-h} L${u},${d+c}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=f.path(m,g),b=a.insert(()=>x,":first-child");return b.attr("transform",`translate(${h/2}, ${h/2})`),b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(n.width/2)+h/2-(n.x-(n.left??0))}, ${-(n.height/2)+h/2-(n.y-(n.top??0))})`),tt(e,b),e.intersect=function(k){return H.polygon(e,y,k)},a}l(N$,"windowPane");async function gd(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:Z}=Vt(),{background:U}=Z,ct={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${U}`]};await gd(t,ct)}let i=Vt();e.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,n=i.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:o,nodeStyles:c}=K(e);if(r.attributes.length===0&&e.label){let Z={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5};Ke(e.label,i)+Z.labelPaddingX*20){let Z=d.width+a*2-(y+m+x+b);y+=Z/w,m+=Z/w,x>0&&(x+=Z/w),b>0&&(b+=Z/w)}let T=y+m+x+b,O=Q.svg(u),R=J(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let I=0;g.length>0&&(I=g.reduce((Z,U)=>Z+(U?.rowHeight??0),0));let S=Math.max($.width+a*2,e?.width||0,T),D=Math.max((I??0)+d.height,e?.height||0),A=-S/2,B=-D/2;u.selectAll("g:not(:first-child)").each((Z,U,ct)=>{let et=ut(ct[U]),wt=et.attr("transform"),Ct=0,Tt=0;if(wt){let q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(wt);q&&(Ct=parseFloat(q[1]),Tt=parseFloat(q[2]),et.attr("class").includes("attribute-name")?Ct+=y:et.attr("class").includes("attribute-keys")?Ct+=y+m:et.attr("class").includes("attribute-comment")&&(Ct+=y+m+x))}et.attr("transform",`translate(${A+a/2+Ct}, ${Tt+B+d.height+n/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(B+n/2)+")");let L=O.rectangle(A,B,S,D,R),M=u.insert(()=>L,":first-child").attr("style",s.join("")),{themeVariables:E}=Vt(),{rowEven:F,rowOdd:z,nodeBorder:V}=E;f.push(0);for(let[Z,U]of g.entries()){let ct=(Z+1)%2===0&&U.yOffset!==0,et=O.rectangle(A,d.height+B+U?.yOffset,S,U?.rowHeight,{...R,fill:ct?F:z,stroke:V});u.insert(()=>et,"g.label").attr("style",s.join("")).attr("class",`row-rect-${ct?"even":"odd"}`)}let G=O.line(A,d.height+B,S+A,d.height+B,R);u.insert(()=>G).attr("class","divider"),G=O.line(y+A,d.height+B,y+A,D+B,R),u.insert(()=>G).attr("class","divider"),k&&(G=O.line(y+m+A,d.height+B,y+m+A,D+B,R),u.insert(()=>G).attr("class","divider")),_&&(G=O.line(y+m+x+A,d.height+B,y+m+x+A,D+B,R),u.insert(()=>G).attr("class","divider"));for(let Z of f)G=O.line(A,d.height+B+Z,S+A,d.height+B+Z,R),u.insert(()=>G).attr("class","divider");if(tt(e,M),c&&e.look!=="handDrawn"){let Z=c.split(";")?.filter(U=>U.includes("stroke"))?.map(U=>`${U}`).join("; ");u.selectAll("path").attr("style",Z??""),u.selectAll(".row-rect-even path").attr("style",c)}return e.intersect=function(Z){return H.rect(e,Z)},u}l(gd,"erBox");async function di(t,e,r,i=0,a=0,n=[],s=""){let o=t.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);e!==sp(e)&&(e=sp(e),e=e.replaceAll("<","<").replaceAll(">",">"));let c=o.node().appendChild(await rr(o,e,{width:Ke(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let u=c.children[0];for(u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">");u.childNodes[0];)u=u.childNodes[0],u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">")}let h=c.getBBox();if(kr(r.htmlLabels)){let u=c.children[0];u.style.textAlign="start";let d=ut(c);h=u.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}l(di,"addText");async function z$(t,e,r,i,a=r.class.padding??12){let n=i?0:3,s=t.insert("g").attr("class",ot(e)).attr("id",e.domId||e.id),o=null,c=null,h=null,u=null,d=0,p=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await Ma(o,{text:`«${b}»`},0),d=o.node().getBBox().height}c=s.insert("g").attr("class","label-group text"),await Ma(c,e,0,["font-weight: bolder"]);let g=c.node().getBBox();p=g.height,h=s.insert("g").attr("class","members-group text");let y=0;for(let b of e.members){let k=await Ma(h,b,y,[b.parseClassifier()]);y+=k+n}f=h.node().getBBox().height,f<=0&&(f=a/2),u=s.insert("g").attr("class","methods-group text");let m=0;for(let b of e.methods){let k=await Ma(u,b,m,[b.parseClassifier()]);m+=k+n}let x=s.node().getBBox();if(o!==null){let b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-g.width/2}, ${d})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+a*2})`),x=s.node().getBBox(),u.attr("transform",`translate(0, ${d+p+(f?f+a*4:a*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}l(z$,"textHelper");async function Ma(t,e,r,i=[]){let a=t.insert("g").attr("class","label").attr("style",i.join("; ")),n=Vt(),s="useHtmlLabels"in e?e.useHtmlLabels:kr(n.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),on(o)&&(s=!0);let c=await rr(a,Tu(aa(o)),{width:Ke(o,n)+50,classes:"markdown-node-label",useHtmlLabels:s},n),h,u=1;if(s){let d=c.children[0],p=ut(c);u=d.innerHTML.split("
    ").length,d.innerHTML.includes("")&&(u+=d.innerHTML.split("").length-1);let f=d.getElementsByTagName("img");if(f){let g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...f].map(y=>new Promise(m=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=n.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,k=parseInt(b,10)*5+"px";y.style.minWidth=k,y.style.maxWidth=k}else y.style.width="100%";m(y)}l(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&ut(c).selectAll("tspan").attr("font-weight",""),u=c.children.length;let d=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(d.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=c.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*u)+r)+")"),h.height}l(Ma,"addText");async function q$(t,e){let r=xt(),i=r.class.padding??12,a=i,n=e.useHtmlLabels??kr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:c}=await z$(t,e,r,n,a),{labelStyles:h,nodeStyles:u}=K(e);e.labelStyle=h,e.cssStyles=s.styles||"";let d=s.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=d.replaceAll("!important","").split(";"));let p=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,f=Q.svg(o),g=J(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=c.width,m=c.height;s.members.length===0&&s.methods.length===0?m+=a:s.members.length>0&&s.methods.length===0&&(m+=a*2);let x=-y/2,b=-m/2,k=f.rectangle(x-i,b-i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0),y+2*i,m+2*i+(p?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),_=o.insert(()=>k,":first-child");_.attr("class","basic label-container");let w=_.node().getBBox();o.selectAll(".text").each((R,I,S)=>{let D=ut(S[I]),A=D.attr("transform"),B=0;if(A){let E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);E&&(B=parseFloat(E[2]))}let L=B+b+i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0);n||(L-=4);let M=x;(D.attr("class").includes("label-group")||D.attr("class").includes("annotation-group"))&&(M=-D.node()?.getBBox().width/2||0,o.selectAll("text").each(function(E,F,z){window.getComputedStyle(z[F]).textAnchor==="middle"&&(M=0)})),D.attr("transform",`translate(${M}, ${L})`)});let $=o.select(".annotation-group").node().getBBox().height-(p?i/2:0)||0,T=o.select(".label-group").node().getBBox().height-(p?i/2:0)||0,O=o.select(".members-group").node().getBBox().height-(p?i/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let R=f.line(w.x,$+T+b+i,w.x+w.width,$+T+b+i,g);o.insert(()=>R).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let R=f.line(w.x,$+T+O+b+a*2+i,w.x+w.width,$+T+O+b+i+a*2,g);o.insert(()=>R).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",d),_.select(":nth-child(2)").attr("style",d),o.selectAll(".divider").select("path").attr("style",d),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",d),!n){let R=RegExp(/color\s*:\s*([^;]*)/),I=R.exec(d);if(I){let S=I[0].replace("color","fill");o.selectAll("tspan").attr("style",S)}else if(h){let S=R.exec(h);if(S){let D=S[0].replace("color","fill");o.selectAll("tspan").attr("style",D)}}}return tt(e,_),e.intersect=function(R){return H.rect(e,R)},o}l(q$,"classBox");async function W$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let a=e,n=e,s=20,o=20,c="verifyMethod"in e,h=ot(e),u=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d;c?d=await Ee(u,`<<${a.type}>>`,0,e.labelStyle):d=await Ee(u,"<<Element>>",0,e.labelStyle);let p=d,f=await Ee(u,a.name,p,e.labelStyle+"; font-weight: bold;");if(p+=f+o,c){let $=await Ee(u,`${a.requirementId?`ID: ${a.requirementId}`:""}`,p,e.labelStyle);p+=$;let T=await Ee(u,`${a.text?`Text: ${a.text}`:""}`,p,e.labelStyle);p+=T;let O=await Ee(u,`${a.risk?`Risk: ${a.risk}`:""}`,p,e.labelStyle);p+=O,await Ee(u,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,p,e.labelStyle)}else{let $=await Ee(u,`${n.type?`Type: ${n.type}`:""}`,p,e.labelStyle);p+=$,await Ee(u,`${n.docRef?`Doc Ref: ${n.docRef}`:""}`,p,e.labelStyle)}let g=(u.node()?.getBBox().width??200)+s,y=(u.node()?.getBBox().height??200)+s,m=-g/2,x=-y/2,b=Q.svg(u),k=J(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=b.rectangle(m,x,g,y,k),w=u.insert(()=>_,":first-child");if(w.attr("class","basic label-container").attr("style",i),u.selectAll(".label").each(($,T,O)=>{let R=ut(O[T]),I=R.attr("transform"),S=0,D=0;if(I){let L=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);L&&(S=parseFloat(L[1]),D=parseFloat(L[2]))}let A=D-y/2,B=m+s/2;(T===0||T===1)&&(B=S),R.attr("transform",`translate(${B}, ${A+s})`)}),p>d+f+o){let $=b.line(m,x+d+f+o,m+g,x+d+f+o,k);u.insert(()=>$).attr("style",i)}return tt(e,w),e.intersect=function($){return H.rect(e,$)},u}l(W$,"requirementBox");async function Ee(t,e,r,i=""){if(e==="")return 0;let a=t.insert("g").attr("class","label").attr("style",i),n=xt(),s=n.htmlLabels??!0,o=await rr(a,Tu(aa(e)),{width:Ke(e,n)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},n),c;if(s){let h=o.children[0],u=ut(o);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{let h=o.children[0];for(let u of h.children)u.textContent=u.textContent.replaceAll(">",">").replaceAll("<","<"),i&&u.setAttribute("style",i);c=o.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}l(Ee,"addText");var $L=l(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function j$(t,e,{config:r}){let{labelStyles:i,nodeStyles:a}=K(e);e.labelStyle=i||"";let n=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:c,label:h}=await st(t,e,ot(e)),u=e.padding||10,d="",p;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let f={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await vl(p,"ticket"in e&&e.ticket||"",f):{label:g,bbox:y}=await vl(o,"ticket"in e&&e.ticket||"",f);let{label:m,bbox:x}=await vl(o,"assigned"in e&&e.assigned||"",f);e.width=s;let b=10,k=e?.width||0,_=Math.max(y.height,x.height)/2,w=Math.max(c.height+b*2,e?.height||0)+_,$=-k/2,T=-w/2;h.attr("transform","translate("+(u-k/2)+", "+(-_-c.height/2)+")"),g.attr("transform","translate("+(u-k/2)+", "+(-_+c.height/2)+")"),m.attr("transform","translate("+(u+k/2-x.width-2*n)+", "+(-_+c.height/2)+")");let O,{rx:R,ry:I}=e,{cssStyles:S}=e;if(e.look==="handDrawn"){let D=Q.svg(o),A=J(e,{}),B=R||I?D.path(Cr($,T,k,w,R||0),A):D.rectangle($,T,k,w,A);O=o.insert(()=>B,":first-child"),O.attr("class","basic label-container").attr("style",S||null)}else{O=o.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",a).attr("rx",R??5).attr("ry",I??5).attr("x",$).attr("y",T).attr("width",k).attr("height",w);let D="priority"in e&&e.priority;if(D){let A=o.append("line"),B=$+2,L=T+Math.floor((R??0)/2),M=T+w-Math.floor((R??0)/2);A.attr("x1",B).attr("y1",L).attr("x2",B).attr("y2",M).attr("stroke-width","4").attr("stroke",$L(D))}}return tt(e,O),e.height=w,e.intersect=function(D){return H.rect(e,D)},o}l(j$,"kanbanItem");async function H$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s,label:o}=await st(t,e,ot(e)),c=n.width+10*s,h=n.height+8*s,u=.15*c,{cssStyles:d}=e,p=n.width+20,f=n.height+20,g=Math.max(c,p),y=Math.max(h,f);o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);let m,x=`M0 0 a${u},${u} 1 0,0 ${g*.25},${-1*y*.1} a${u},${u} 1 0,0 ${g*.25},0 a${u},${u} 1 0,0 ${g*.25},0 a${u},${u} 1 0,0 ${g*.25},${y*.1} a${u},${u} 1 0,0 ${g*.15},${y*.33} a${u*.8},${u*.8} 1 0,0 0,${y*.34} a${u},${u} 1 0,0 ${-1*g*.15},${y*.33} a${u},${u} 1 0,0 ${-1*g*.25},${y*.15} a${u},${u} 1 0,0 ${-1*g*.25},0 a${u},${u} 1 0,0 ${-1*g*.25},0 a${u},${u} 1 0,0 ${-1*g*.25},${-1*y*.15} a${u},${u} 1 0,0 ${-1*g*.1},${-1*y*.33} a${u*.8},${u*.8} 1 0,0 0,${-1*y*.34} a${u},${u} 1 0,0 ${g*.1},${-1*y*.33} H0 V0 Z`;if(e.look==="handDrawn"){let b=Q.svg(a),k=J(e,{}),_=b.path(x,k);m=a.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",Xt(d))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return m.attr("transform",`translate(${-g/2}, ${-y/2})`),tt(e,m),e.calcIntersect=function(b,k){return H.rect(b,k)},e.intersect=function(b){return P.info("Bang intersect",e,b),H.rect(e,b)},a}l(H$,"bang");async function U$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s,label:o}=await st(t,e,ot(e)),c=n.width+2*s,h=n.height+2*s,u=.15*c,d=.25*c,p=.35*c,f=.2*c,{cssStyles:g}=e,y,m=`M0 0 a${u},${u} 0 0,1 ${c*.25},${-1*c*.1} a${p},${p} 1 0,1 ${c*.4},${-1*c*.1} a${d},${d} 1 0,1 ${c*.35},${c*.2} a${u},${u} 1 0,1 ${c*.15},${h*.35} a${f},${f} 1 0,1 ${-1*c*.15},${h*.65} a${d},${u} 1 0,1 ${-1*c*.25},${c*.15} a${p},${p} 1 0,1 ${-1*c*.5},0 a${u},${u} 1 0,1 ${-1*c*.25},${-1*c*.15} a${u},${u} 1 0,1 ${-1*c*.1},${-1*h*.35} a${f},${f} 1 0,1 ${c*.1},${-1*h*.65} H0 V0 Z`;if(e.look==="handDrawn"){let x=Q.svg(a),b=J(e,{}),k=x.path(m,b);y=a.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",Xt(g))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),y.attr("transform",`translate(${-c/2}, ${-h/2})`),tt(e,y),e.calcIntersect=function(x,b){return H.rect(x,b)},e.intersect=function(x){return P.info("Cloud intersect",e,x),H.rect(e,x)},a}l(U$,"cloud");async function Y$(t,e){let{labelStyles:r,nodeStyles:i}=K(e);e.labelStyle=r;let{shapeSvg:a,bbox:n,halfPadding:s,label:o}=await st(t,e,ot(e)),c=n.width+8*s,h=n.height+2*s,u=5,d=` M${-c/2} ${h/2-u} v${-h+2*u} q0,-${u} ${u},-${u} h${c-2*u} q${u},0 ${u},${u} v${h-2*u} q0,${u} -${u},${u} h${-c+2*u} q-${u},0 -${u},-${u} Z `,p=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),o.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),a.append(()=>o.node()),tt(e,p),e.calcIntersect=function(f,g){return H.rect(f,g)},e.intersect=function(f){return H.rect(e,f)},a}l(Y$,"defaultMindmapNode");async function V$(t,e){let r={padding:e.padding??0};return fd(t,e,r)}l(V$,"mindmapCircle");var wL=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:v$},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:C$},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:_$},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:B$},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:GC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:fd},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:H$},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:U$},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:x$},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:e$},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:u$},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:c$},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:D$},{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:l$},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ZC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:F$},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zC},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:$$},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:M$},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:T$},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:KC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:r$},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:HC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:UC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:YC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:d$},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:P$},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:t$},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:E$},{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:VC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:XC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:I$},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:N$},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:QC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:O$},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:JC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:w$},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:y$},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:g$},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:NC},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:jC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:L$},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:A$},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:R$},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:b$},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:f$}],vL=l(()=>{let t=[...Object.entries({state:S$,choice:qC,note:m$,rectWithTitle:k$,labelRect:h$,iconSquare:o$,iconCircle:a$,icon:i$,iconRounded:n$,imageSquare:s$,anchor:RC,kanbanItem:j$,mindmapCircle:V$,defaultMindmapNode:Y$,classBox:q$,erBox:gd,requirementBox:W$}),...wL.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(r=>[r,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),G$=vL();function _L(t){return t in G$}l(_L,"isValidShape");var Xs=new Map;async function X$(t,e,r){let i,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let n=e.shape?G$[e.shape]:void 0;if(!n)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),a=await n(i,e,r)}else a=await n(t,e,r),i=a;return e.tooltip&&a.attr("title",e.tooltip),Xs.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}l(X$,"insertNode");var LE=l((t,e)=>{Xs.set(e.id,t)},"setNodeElem"),FE=l(()=>{Xs.clear()},"clear"),EE=l(t=>{let e=Xs.get(t.id);P.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},"positionNode"),SL=l((t,e,r,i,a,n)=>{e.arrowTypeStart&&Ep(t,"start",e.arrowTypeStart,r,i,a,n),e.arrowTypeEnd&&Ep(t,"end",e.arrowTypeEnd,r,i,a,n)},"addEdgeMarkers"),TL={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{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}},Ep=l((t,e,r,i,a,n,s)=>{let o=TL[r];if(!o){P.warn(`Unknown arrow type: ${r}`);return}let c=o.type,h=`${a}_${n}-${c}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let u=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let f=p.cloneNode(!0);f.id=d,f.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),o.fill&&g.setAttribute("fill",s)}),p.parentNode?.appendChild(f)}}t.attr(`marker-${e}`,`url(${i}#${d})`)}else t.attr(`marker-${e}`,`url(${i}#${h})`)},"addEdgeMarker"),ML=l(t=>typeof t=="string"?t:xt()?.flowchart?.curve,"resolveEdgeCurveType"),cs=new Map,qt=new Map,DE=l(()=>{cs.clear(),qt.clear()},"clear"),ba=l(t=>t?typeof t=="string"?t:t.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),BL=l(async(t,e)=>{let r=xt(),i=Zt(r),{labelStyles:a}=K(e);e.labelStyle=a;let n=t.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label").attr("data-id",e.id),o=e.labelType==="markdown",c=await rr(t,e.label,{style:ba(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:void 0},r);s.node().appendChild(c),P.info("abc82",e,e.labelType);let h=c.getBBox(),u=h;if(i){let p=c.children[0],f=ut(c);h=p.getBoundingClientRect(),u=h,f.attr("width",h.width),f.attr("height",h.height)}else{let p=ut(c).select("text").node();p&&typeof p.getBBox=="function"&&(u=p.getBBox())}s.attr("transform",ya(u,i)),cs.set(e.id,n),e.width=h.width,e.height=h.height;let d;if(e.startLabelLeft){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.startLabelLeft,ba(e.labelStyle)||"",!1,!1);d=g;let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).startLeft=p,Ba(d,e.startLabelLeft)}if(e.startLabelRight){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.startLabelRight,ba(e.labelStyle)||"",!1,!1);d=g,f.node().appendChild(g);let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).startRight=p,Ba(d,e.startLabelRight)}if(e.endLabelLeft){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.endLabelLeft,ba(e.labelStyle)||"",!1,!1);d=g;let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),p.node().appendChild(g),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).endLeft=p,Ba(d,e.endLabelLeft)}if(e.endLabelRight){let p=t.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await lr(f,e.endLabelRight,ba(e.labelStyle)||"",!1,!1);d=g;let y=g.getBBox();if(i){let m=g.children[0],x=ut(g);y=m.getBoundingClientRect(),x.attr("width",y.width),x.attr("height",y.height)}f.attr("transform",ya(y,i)),p.node().appendChild(g),qt.get(e.id)||qt.set(e.id,{}),qt.get(e.id).endRight=p,Ba(d,e.endLabelRight)}return c},"insertEdgeLabel");function Ba(t,e){Zt(xt())&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}l(Ba,"setTerminalWidth");var AL=l((t,e)=>{P.debug("Moving label abc88 ",t.id,t.label,cs.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,i=xt(),{subGraphTitleTotalMargin:a}=Xu(i);if(t.label){let n=cs.get(t.id),s=t.x,o=t.y;if(r){let c=ve.calcLabelPosition(r);P.debug("Moving label "+t.label+" from (",s,",",o,") to (",c.x,",",c.y,") abc88"),e.updatedPath&&(s=c.x,o=c.y)}n.attr("transform",`translate(${s}, ${o+a/2})`)}if(t.startLabelLeft){let n=qt.get(t.id).startLeft,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let n=qt.get(t.id).startRight,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let n=qt.get(t.id).endLeft,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let n=qt.get(t.id).endRight,s=t.x,o=t.y;if(r){let c=ve.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=c.x,o=c.y}n.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),LL=l((t,e)=>{let r=t.x,i=t.y,a=Math.abs(e.x-r),n=Math.abs(e.y-i),s=t.width/2,o=t.height/2;return a>=s||n>=o},"outsideNode"),FL=l((t,e,r)=>{P.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,a=t.y,n=Math.abs(i-r.x),s=t.width/2,o=r.xMath.abs(i-e.x)*c){let d=r.y{P.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach(n=>{if(P.info("abc88 checking point",n,e),!LL(e,n)&&!a){let s=FL(e,i,n);P.debug("abc88 inside",n,i,s),P.debug("abc88 intersection",s,e);let o=!1;r.forEach(c=>{o=o||c.x===s.x&&c.y===s.y}),r.some(c=>c.x===s.x&&c.y===s.y)?P.warn("abc88 no intersect",s,r):r.push(s),a=!0}else P.warn("abc88 outside",n,i),i=n,a||r.push(n)}),P.debug("returning points",r),r},"cutPathAtIntersect");function Z$(t){let e=[],r=[];for(let i=1;i5&&Math.abs(n.y-a.y)>5||a.y===n.y&&n.x===s.x&&Math.abs(n.x-a.x)>5&&Math.abs(n.y-s.y)>5)&&(e.push(n),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}l(Z$,"extractCornerPoints");var Op=l(function(t,e,r){let i=e.x-t.x,a=e.y-t.y,n=Math.sqrt(i*i+a*a),s=r/n;return{x:e.x-s*i,y:e.y-s*a}},"findAdjacentPoint"),EL=l(function(t){let{cornerPointPositions:e}=Z$(t),r=[];for(let i=0;i10&&Math.abs(n.y-a.y)>=10){P.debug("Corner point fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));let f=5;s.x===o.x?p={x:h<0?o.x-f+d:o.x+f-d,y:u<0?o.y-d:o.y+d}:p={x:h<0?o.x-d:o.x+d,y:u<0?o.y-f+d:o.y+f-d}}else P.debug("Corner point skipping fixing",Math.abs(n.x-a.x),Math.abs(n.y-a.y));r.push(p,c)}else r.push(t[i]);return r},"fixCorners"),DL=l((t,e,r)=>{let i=t-e-r,a=2,n=2,s=a+n,o=Math.floor(i/s),c=Array(o).fill(`${a} ${n}`).join(" ");return`0 ${e} ${c} ${r}`},"generateDashArray"),OL=l(function(t,e,r,i,a,n,s,o=!1){let{handDrawnSeed:c}=xt(),h=e.points,u=!1,d=a;var p=n;let f=[];for(let M in e.cssCompiledStyles)Vk(M)||f.push(e.cssCompiledStyles[M]);P.debug("UIO intersect check",e.points,p.x,d.x),p.intersect&&d.intersect&&!o&&(h=h.slice(1,e.points.length-1),h.unshift(d.intersect(h[0])),P.debug("Last point UIO",e.start,"-->",e.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));let g=btoa(JSON.stringify(h));e.toCluster&&(P.info("to cluster abc88",r.get(e.toCluster)),h=Dp(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(P.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=Dp(h.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let y=h.filter(M=>!Number.isNaN(M.y)),m=ML(e.curve);m!=="rounded"&&(y=EL(y));let x=bi;switch(m){case"linear":x=bi;break;case"basis":x=Io;break;case"cardinal":x=A0;break;case"bumpX":x=Qc;break;case"bumpY":x=Jc;break;case"catmullRom":x=L0;break;case"monotoneX":x=lu;break;case"monotoneY":x=hu;break;case"natural":x=uu;break;case"step":x=du;break;case"stepAfter":x=fu;break;case"stepBefore":x=pu;break;case"rounded":x=bi;break;default:x=Io}let{x:b,y:k}=T3(e),_=v0().x(b).y(k).curve(x),w;switch(e.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(e.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let $,T=m==="rounded"?Q$(J$(y,e),5):_(y),O=Array.isArray(e.style)?e.style:[e.style],R=O.find(M=>M?.startsWith("stroke:")),I="";e.animate&&(I="edge-animation-fast"),e.animation&&(I="edge-animation-"+e.animation);let S=!1;if(e.look==="handDrawn"){let M=Q.svg(t);Object.assign([],y);let E=M.path(T,{roughness:.3,seed:c});w+=" transition",$=ut(E).select("path").attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")+(I?" "+I:"")).attr("style",O?O.reduce((z,V)=>z+";"+V,""):"");let F=$.attr("d");$.attr("d",F),t.node().appendChild($.node())}else{let M=f.join(";"),E=O?O.reduce((U,ct)=>U+ct+";",""):"",F=(M?M+";"+E+";":E)+";"+(O?O.reduce((U,ct)=>U+";"+ct,""):"");$=t.append("path").attr("d",T).attr("id",e.id).attr("class"," "+w+(e.classes?" "+e.classes:"")+(I?" "+I:"")).attr("style",F),R=F.match(/stroke:([^;]+)/)?.[1],S=e.animate===!0||!!e.animation||M.includes("animation");let z=$.node(),V=typeof z.getTotalLength=="function"?z.getTotalLength():0,G=dp[e.arrowTypeStart]||0,Z=dp[e.arrowTypeEnd]||0;if(e.look==="neo"&&!S){let U=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?DL(V,G,Z):`0 ${G} ${V-G-Z} ${Z}`}; stroke-dashoffset: 0;`;$.attr("style",U+$.attr("style"))}}$.attr("data-edge",!0),$.attr("data-et","edge"),$.attr("data-id",e.id),$.attr("data-points",g),e.showPoints&&y.forEach(M=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",M.x).attr("cy",M.y)});let D="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(D=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,D=D.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",e.arrowTypeStart),P.info("arrowTypeEnd",e.arrowTypeEnd),SL($,e,D,s,i,R);let A=Math.floor(h.length/2),B=h[A];ve.isLabelCoordinateInPath(B,$.attr("d"))||(u=!0);let L={};return u&&(L.updatedPath=h),L.originalPath=e.points,L},"insertEdge");function Q$(t,e){if(t.length<2)return"";let r="",i=t.length,a=1e-5;for(let n=0;n({...a}));if(t.length>=2&&Yt[e.arrowTypeStart]){let a=Yt[e.arrowTypeStart],n=t[0],s=t[1],{angle:o}=Qh(n,s),c=a*Math.cos(o),h=a*Math.sin(o);r[0].x=n.x+c,r[0].y=n.y+h}let i=t.length;if(i>=2&&Yt[e.arrowTypeEnd]){let a=Yt[e.arrowTypeEnd],n=t[i-1],s=t[i-2],{angle:o}=Qh(s,n),c=a*Math.cos(o),h=a*Math.sin(o);r[i-1].x=n.x-c,r[i-1].y=n.y-h}return r}l(J$,"applyMarkerOffsetsToPoints");var IL=l((t,e,r,i)=>{e.forEach(a=>{JL[a](t,r,i)})},"insertMarkers"),PL=l((t,e,r)=>{P.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),RL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),NL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),zL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),qL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),WL=l((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),jL=l((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),HL=l((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),UL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),YL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),VL=l((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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");let a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),GL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),XL=l((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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");let a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ZL=l((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),QL=l((t,e,r)=>{let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),JL={extension:PL,composition:RL,aggregation:NL,dependency:zL,lollipop:qL,point:WL,circle:jL,cross:HL,barb:UL,only_one:YL,zero_or_one:VL,one_or_more:GL,zero_or_more:XL,requirement_arrow:ZL,requirement_contains:QL},KL=IL,tF={common:Bn,getConfig:Vt,insertCluster:oL,insertEdge:OL,insertEdgeLabel:BL,insertMarkers:KL,insertNode:X$,interpolateToCurve:ju,labelHelper:st,log:P,positionEdgeLabel:AL},mn={},K$=l(t=>{for(let e of t)mn[e.name]=e},"registerLayoutLoaders"),eF=l(()=>{K$([{name:"dagre",loader:l(async()=>await gt(()=>import("./dagre-GNUAUHNH-DXQ162y-.js"),__vite__mapDeps([2,3,4,5,1])),"loader")},{name:"cose-bilkent",loader:l(async()=>await gt(()=>import("./cose-bilkent-PNC4W37J-DyN6PpA4.js"),__vite__mapDeps([6,7,1])),"loader")}])},"registerDefaultLayoutLoaders");eF();var OE=l(async(t,e)=>{if(!(t.layoutAlgorithm in mn))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=mn[t.layoutAlgorithm];return(await r.loader()).render(t,e,tF,{algorithm:r.algorithm})},"render"),IE=l((t="",{fallback:e="dagre"}={})=>{if(t in mn)return t;if(e in mn)return P.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),rF=Y2(Object.keys,Object),iF=rF,aF=Object.prototype,nF=aF.hasOwnProperty;function tw(t){if(!zs(t))return iF(t);var e=[];for(var r in Object(t))nF.call(t,r)&&r!="constructor"&&e.push(r);return e}l(tw,"baseKeys");var oF=tw,sF=Yr(Re,"DataView"),Jh=sF,lF=Yr(Re,"Promise"),Kh=lF,hF=Yr(Re,"Set"),tc=hF,cF=Yr(Re,"WeakMap"),ec=cF,Ip="[object Map]",uF="[object Object]",Pp="[object Promise]",Rp="[object Set]",Np="[object WeakMap]",zp="[object DataView]",dF=Ur(Jh),pF=Ur(dn),fF=Ur(Kh),gF=Ur(tc),yF=Ur(ec),Mr=ia;(Jh&&Mr(new Jh(new ArrayBuffer(1)))!=zp||dn&&Mr(new dn)!=Ip||Kh&&Mr(Kh.resolve())!=Pp||tc&&Mr(new tc)!=Rp||ec&&Mr(new ec)!=Np)&&(Mr=l(function(t){var e=ia(t),r=e==uF?t.constructor:void 0,i=r?Ur(r):"";if(i)switch(i){case dF:return zp;case pF:return Ip;case fF:return Pp;case gF:return Rp;case yF:return Np}return e},"getTag"));var mF=Mr,xF="[object Map]",bF="[object Set]",kF=Object.prototype,CF=kF.hasOwnProperty;function ew(t){if(t==null)return!0;if(qs(t)&&(ts(t)||typeof t=="string"||typeof t.splice=="function"||zu(t)||qu(t)||Ko(t)))return!t.length;var e=mF(t);if(e==xF||e==bF)return!t.size;if(zs(t))return!oF(t).length;for(var r in t)if(CF.call(t,r))return!1;return!0}l(ew,"isEmpty");var qp=ew,$F=l(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),wF=l(async()=>{let{diagram:t}=await gt(()=>import("./c4Diagram-BBK6TRR6-FZk4-nd8.js"),__vite__mapDeps([8,9,1]));return{id:"c4",diagram:t}},"loader"),vF={id:"c4",detector:$F,loader:wF},_F=vF,rw="flowchart",SF=l((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),TF=l(async()=>{let{diagram:t}=await gt(()=>import("./flowDiagram-IIOBCMXN-CYRKx13h.js"),__vite__mapDeps([10,11,9,12,13,1]));return{id:rw,diagram:t}},"loader"),MF={id:rw,detector:SF,loader:TF},BF=MF,iw="flowchart-v2",AF=l((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),LF=l(async()=>{let{diagram:t}=await gt(()=>import("./flowDiagram-IIOBCMXN-CYRKx13h.js"),__vite__mapDeps([10,11,9,12,13,1]));return{id:iw,diagram:t}},"loader"),FF={id:iw,detector:AF,loader:LF},EF=FF,DF=l(t=>/^\s*erDiagram/.test(t),"detector"),OF=l(async()=>{let{diagram:t}=await gt(()=>import("./erDiagram-L2NYR2MQ--3oSmcc2.js"),__vite__mapDeps([14,12,13,1]));return{id:"er",diagram:t}},"loader"),IF={id:"er",detector:DF,loader:OF},PF=IF,aw="gitGraph",RF=l(t=>/^\s*gitGraph/.test(t),"detector"),NF=l(async()=>{let{diagram:t}=await gt(()=>import("./gitGraphDiagram-FCDOK2W6-DtwLq5NW.js"),__vite__mapDeps([15,16,17,1,5,18]));return{id:aw,diagram:t}},"loader"),zF={id:aw,detector:RF,loader:NF},qF=zF,nw="gantt",WF=l(t=>/^\s*gantt/.test(t),"detector"),jF=l(async()=>{let{diagram:t}=await gt(()=>import("./ganttDiagram-CBGYKTO2-V9ASDzMX.js"),__vite__mapDeps([19,1]));return{id:nw,diagram:t}},"loader"),HF={id:nw,detector:WF,loader:jF},UF=HF,ow="info",YF=l(t=>/^\s*info/.test(t),"detector"),VF=l(async()=>{let{diagram:t}=await gt(()=>import("./infoDiagram-JC2SMEGH-olRUjSou.js"),__vite__mapDeps([20,17,1,5]));return{id:ow,diagram:t}},"loader"),GF={id:ow,detector:YF,loader:VF},XF=l(t=>/^\s*pie/.test(t),"detector"),ZF=l(async()=>{let{diagram:t}=await gt(()=>import("./pieDiagram-O4VNXU6G-DrxXmGzS.js"),__vite__mapDeps([21,16,17,1,5]));return{id:"pie",diagram:t}},"loader"),QF={id:"pie",detector:XF,loader:ZF},sw="quadrantChart",JF=l(t=>/^\s*quadrantChart/.test(t),"detector"),KF=l(async()=>{let{diagram:t}=await gt(()=>import("./quadrantDiagram-DYU4IJOS-Bg6H8a2k.js"),__vite__mapDeps([22,1]));return{id:sw,diagram:t}},"loader"),t4={id:sw,detector:JF,loader:KF},e4=t4,lw="xychart",r4=l(t=>/^\s*xychart(-beta)?/.test(t),"detector"),i4=l(async()=>{let{diagram:t}=await gt(()=>import("./xychartDiagram-TMDUDL2A-CsQ9VQk_.js"),__vite__mapDeps([23,1]));return{id:lw,diagram:t}},"loader"),a4={id:lw,detector:r4,loader:i4},n4=a4,hw="requirement",o4=l(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),s4=l(async()=>{let{diagram:t}=await gt(()=>import("./requirementDiagram-N2XL27SN-D0ML_frX.js"),__vite__mapDeps([24,12,13,1]));return{id:hw,diagram:t}},"loader"),l4={id:hw,detector:o4,loader:s4},h4=l4,cw="sequence",c4=l(t=>/^\s*sequenceDiagram/.test(t),"detector"),u4=l(async()=>{let{diagram:t}=await gt(()=>import("./sequenceDiagram-PYXOKC54-CiRRnoB5.js"),__vite__mapDeps([25,18,9,1]));return{id:cw,diagram:t}},"loader"),d4={id:cw,detector:c4,loader:u4},p4=d4,uw="class",f4=l((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),g4=l(async()=>{let{diagram:t}=await gt(()=>import("./classDiagram-JG6F6YBT-B47N4DC6.js"),__vite__mapDeps([26,27,11,9,12,13,1]));return{id:uw,diagram:t}},"loader"),y4={id:uw,detector:f4,loader:g4},m4=y4,dw="classDiagram",x4=l((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),b4=l(async()=>{let{diagram:t}=await gt(()=>import("./classDiagram-v2-CFK7UN3Z-B47N4DC6.js"),__vite__mapDeps([28,27,11,9,12,13,1]));return{id:dw,diagram:t}},"loader"),k4={id:dw,detector:x4,loader:b4},C4=k4,pw="state",$4=l((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),w4=l(async()=>{let{diagram:t}=await gt(()=>import("./stateDiagram-UFOXNHOX-DF6iuymG.js"),__vite__mapDeps([29,30,12,13,3,4,5,1]));return{id:pw,diagram:t}},"loader"),v4={id:pw,detector:$4,loader:w4},_4=v4,fw="stateDiagram",S4=l((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),T4=l(async()=>{let{diagram:t}=await gt(()=>import("./stateDiagram-v2-C774GKM7-NXQNeIBp.js"),__vite__mapDeps([31,30,12,13,1]));return{id:fw,diagram:t}},"loader"),M4={id:fw,detector:S4,loader:T4},B4=M4,gw="journey",A4=l(t=>/^\s*journey/.test(t),"detector"),L4=l(async()=>{let{diagram:t}=await gt(()=>import("./journeyDiagram-FZRSWBTQ-DuIFoGQv.js"),__vite__mapDeps([32,11,9,1]));return{id:gw,diagram:t}},"loader"),F4={id:gw,detector:A4,loader:L4},E4=F4,D4=l((t,e,r)=>{P.debug(`rendering svg for syntax error `);let i=bT(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),mx(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),yw={draw:D4},O4=yw,I4={db:{},renderer:yw,parser:{parse:l(()=>{},"parse")}},P4=I4,mw="flowchart-elk",R4=l((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),N4=l(async()=>{let{diagram:t}=await gt(()=>import("./flowDiagram-IIOBCMXN-CYRKx13h.js"),__vite__mapDeps([10,11,9,12,13,1]));return{id:mw,diagram:t}},"loader"),z4={id:mw,detector:R4,loader:N4},q4=z4,xw="timeline",W4=l(t=>/^\s*timeline/.test(t),"detector"),j4=l(async()=>{let{diagram:t}=await gt(()=>import("./timeline-definition-GC5UGDFR-BsXHSaaA.js"),__vite__mapDeps([33,1]));return{id:xw,diagram:t}},"loader"),H4={id:xw,detector:W4,loader:j4},U4=H4,bw="mindmap",Y4=l(t=>/^\s*mindmap/.test(t),"detector"),V4=l(async()=>{let{diagram:t}=await gt(()=>import("./mindmap-definition-QTQOGDLH-GhXRjx3h.js"),__vite__mapDeps([34,12,13,1]));return{id:bw,diagram:t}},"loader"),G4={id:bw,detector:Y4,loader:V4},X4=G4,kw="kanban",Z4=l(t=>/^\s*kanban/.test(t),"detector"),Q4=l(async()=>{let{diagram:t}=await gt(()=>import("./kanban-definition-ETIEC4YN-Bx3CknX6.js"),__vite__mapDeps([35,11,1]));return{id:kw,diagram:t}},"loader"),J4={id:kw,detector:Z4,loader:Q4},K4=J4,Cw="sankey",t6=l(t=>/^\s*sankey(-beta)?/.test(t),"detector"),e6=l(async()=>{let{diagram:t}=await gt(()=>import("./sankeyDiagram-HWP7ZNIN-BUY3YMp8.js"),__vite__mapDeps([36,1]));return{id:Cw,diagram:t}},"loader"),r6={id:Cw,detector:t6,loader:e6},i6=r6,$w="packet",a6=l(t=>/^\s*packet(-beta)?/.test(t),"detector"),n6=l(async()=>{let{diagram:t}=await gt(()=>import("./diagram-SUXTHJMA-h0U9qop-.js"),__vite__mapDeps([37,16,17,1,5]));return{id:$w,diagram:t}},"loader"),o6={id:$w,detector:a6,loader:n6},ww="radar",s6=l(t=>/^\s*radar-beta/.test(t),"detector"),l6=l(async()=>{let{diagram:t}=await gt(()=>import("./diagram-G7E7SVAT-Cb6uMcqw.js"),__vite__mapDeps([38,16,17,1,5]));return{id:ww,diagram:t}},"loader"),h6={id:ww,detector:s6,loader:l6},vw="block",c6=l(t=>/^\s*block(-beta)?/.test(t),"detector"),u6=l(async()=>{let{diagram:t}=await gt(()=>import("./blockDiagram-HG7WUIX4-pYMouvi2.js"),__vite__mapDeps([39,4,5,11,1]));return{id:vw,diagram:t}},"loader"),d6={id:vw,detector:c6,loader:u6},p6=d6,_w="architecture",f6=l(t=>/^\s*architecture/.test(t),"detector"),g6=l(async()=>{let{diagram:t}=await gt(()=>import("./architectureDiagram-EJXTDGMB-BixUofLv.js"),__vite__mapDeps([40,16,17,1,5,7]));return{id:_w,diagram:t}},"loader"),y6={id:_w,detector:f6,loader:g6},m6=y6,Sw="ishikawa",x6=l(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),b6=l(async()=>{let{diagram:t}=await gt(()=>import("./ishikawaDiagram-LCPTV24A-dqzGV9xc.js"),__vite__mapDeps([41,1]));return{id:Sw,diagram:t}},"loader"),k6={id:Sw,detector:x6,loader:b6},Tw="venn",C6=l(t=>/^\s*venn-beta/.test(t),"detector"),$6=l(async()=>{let{diagram:t}=await gt(()=>import("./vennDiagram-R4MEU4WM-Dvbyfwqt.js"),__vite__mapDeps([42,1]));return{id:Tw,diagram:t}},"loader"),w6={id:Tw,detector:C6,loader:$6},v6=w6,Mw="treemap",_6=l(t=>/^\s*treemap/.test(t),"detector"),S6=l(async()=>{let{diagram:t}=await gt(()=>import("./diagram-HOHITQNR-RHmJhdrA.js"),__vite__mapDeps([43,16,17,1,5,13]));return{id:Mw,diagram:t}},"loader"),T6={id:Mw,detector:_6,loader:S6},Wp=!1,Zs=l(()=>{Wp||(Wp=!0,Ho("error",P4,t=>t.toLowerCase().trim()==="error"),Ho("---",{db:{clear:l(()=>{},"clear")},styles:{},renderer:{draw:l(()=>{},"draw")},parser:{parse:l(()=>{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:l(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),lh(q4,X4,m6),lh(_F,K4,C4,m4,PF,UF,GF,QF,h4,p4,EF,BF,U4,qF,B4,_4,E4,e4,i6,o6,n4,p6,h6,k6,T6,v6))},"addDiagrams"),M6=l(async()=>{P.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(Rr).map(async([e,{detector:r,loader:i}])=>{if(i)try{gh(e)}catch{try{let{diagram:a,id:n}=await i();Ho(n,a,r)}catch(a){throw P.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Rr[e],a}}}))).filter(e=>e.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(let e of t)P.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Bw="comm",Aw="rule",Lw="decl",B6="@import",A6="@namespace",L6="@keyframes",F6="@layer",Fw=Math.abs,yd=String.fromCharCode;function md(t){return t.trim()}l(md,"trim");function qa(t,e,r){return t.replace(e,r)}l(qa,"replace");function Ew(t,e,r){return t.indexOf(e,r)}l(Ew,"indexof");function Er(t,e){return t.charCodeAt(e)|0}l(Er,"charat");function Wr(t,e,r){return t.slice(e,r)}l(Wr,"substr");function we(t){return t.length}l(we,"strlen");function Dw(t){return t.length}l(Dw,"sizeof");function Aa(t,e){return e.push(t),t}l(Aa,"append");var Qs=1,ta=1,Ow=0,ge=0,Lt=0,la="";function Js(t,e,r,i,a,n,s,o){return{value:t,root:e,parent:r,type:i,props:a,children:n,line:Qs,column:ta,length:s,return:"",siblings:o}}l(Js,"node");function Iw(){return Lt}l(Iw,"char");function Pw(){return Lt=ge>0?Er(la,--ge):0,ta--,Lt===10&&(ta=1,Qs--),Lt}l(Pw,"prev");function pe(){return Lt=ge2||ea(Lt)>3?"":" "}l(zw,"whitespace");function qw(t,e){for(;--e&&pe()&&!(Lt<48||Lt>102||Lt>57&&Lt<65||Lt>70&&Lt<97););return In(t,Wa()+(e<6&&Ge()==32&&pe()==32))}l(qw,"escaping");function us(t){for(;pe();)switch(Lt){case t:return ge;case 34:case 39:t!==34&&t!==39&&us(Lt);break;case 40:t===41&&us(t);break;case 92:pe();break}return ge}l(us,"delimiter");function Ww(t,e){for(;pe()&&t+Lt!==57&&!(t+Lt===84&&Ge()===47););return"/*"+In(e,ge-1)+"*"+yd(t===47?t:pe())}l(Ww,"commenter");function jw(t){for(;!ea(Ge());)pe();return In(t,ge)}l(jw,"identifier");function Hw(t){return Nw(ja("",null,null,null,[""],t=Rw(t),0,[0],t))}l(Hw,"compile");function ja(t,e,r,i,a,n,s,o,c){for(var h=0,u=0,d=s,p=0,f=0,g=0,y=1,m=1,x=1,b=0,k="",_=a,w=n,$=i,T=k;m;)switch(g=b,b=pe()){case 40:if(g!=108&&Er(T,d-1)==58){Ew(T+=qa(vo(b),"&","&\f"),"&\f",Fw(h?o[h-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=vo(b);break;case 9:case 10:case 13:case 32:T+=zw(g);break;case 92:T+=qw(Wa()-1,7);continue;case 47:switch(Ge()){case 42:case 47:Aa(Uw(Ww(pe(),Wa()),e,r,c),c),(ea(g||1)==5||ea(Ge()||1)==5)&&we(T)&&Wr(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*y:o[h++]=we(T)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:x==-1&&(T=qa(T,/\f/g,"")),f>0&&(we(T)-d||y===0&&g===47)&&Aa(f>32?ic(T+";",i,r,d-1,c):ic(qa(T," ","")+";",i,r,d-2,c),c);break;case 59:T+=";";default:if(Aa($=rc(T,e,r,h,u,a,o,k,_=[],w=[],d,n),n),b===123)if(u===0)ja(T,e,$,$,_,n,d,o,w);else{switch(p){case 99:if(Er(T,3)===110)break;case 108:if(Er(T,2)===97)break;default:u=0;case 100:case 109:case 115:}u?ja(t,$,$,i&&Aa(rc(t,$,$,0,0,a,o,k,a,_=[],d,w),w),a,w,d,o,i?_:w):ja(T,$,$,$,[""],w,0,o,w)}}h=u=f=0,y=x=1,k=T="",d=s;break;case 58:d=1+we(T),f=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&Pw()==125)continue}switch(T+=yd(b),b*y){case 38:x=u>0?1:(T+="\f",-1);break;case 44:o[h++]=(we(T)-1)*x,x=1;break;case 64:Ge()===45&&(T+=vo(pe())),p=Ge(),u=d=we(k=T+=jw(Wa())),b++;break;case 45:g===45&&we(T)==2&&(y=0)}}return n}l(ja,"parse");function rc(t,e,r,i,a,n,s,o,c,h,u,d){for(var p=a-1,f=a===0?n:[""],g=Dw(f),y=0,m=0,x=0;y0?f[b]+" "+k:qa(k,/&\f/g,f[b])))&&(c[x++]=_);return Js(t,e,r,a===0?Aw:o,c,h,u,d)}l(rc,"ruleset");function Uw(t,e,r,i){return Js(t,e,r,Bw,yd(Iw()),Wr(t,2,-2),0,i)}l(Uw,"comment");function ic(t,e,r,i,a){return Js(t,e,r,Lw,Wr(t,0,i),Wr(t,i+1,-1),i,a)}l(ic,"declaration");function ds(t,e){for(var r="",i=0;i{jp.forEach(t=>{t()}),jp=[]},"attachFunctions"),O6=l(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Xw(t){let e=t.match(G1);if(!e)return{text:t,metadata:{}};let r=S3(e[1],{schema:_3})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}l(Xw,"extractFrontMatter");var I6=l(t=>t.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),P6=l(t=>{let{text:e,metadata:r}=Xw(t),{displayMode:i,title:a,config:n={}}=r;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:a,config:n,text:e}},"processFrontmatter"),R6=l(t=>{let e=ve.detectInit(t)??{},r=ve.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:AB(t),directive:e}},"processDirectives");function xd(t){let e=I6(t),r=P6(e),i=R6(r.text),a=Gu(r.config,i.directive);return t=O6(i.text),{code:t,title:r.title,config:a}}l(xd,"preprocessDiagram");function Zw(t){let e=new TextEncoder().encode(t),r=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(r)}l(Zw,"toBase64");var N6=5e4,z6="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",q6="sandbox",W6="loose",j6="http://www.w3.org/2000/svg",H6="http://www.w3.org/1999/xlink",U6="http://www.w3.org/1999/xhtml",Y6="100%",V6="100%",G6="border:0;margin:0;",X6="margin:0",Z6="allow-top-navigation-by-user-activation allow-popups",Q6='The "iframe" tag is not supported by your browser.',J6=["foreignobject"],K6=["dominant-baseline"];function bd(t){let e=xd(t);return Wo(),wS(e.config??{}),e}l(bd,"processAndSetConfigs");async function Qw(t,e){Zs();try{let{code:r,config:i}=bd(t);return{diagramType:(await Kw(r)).type,config:i}}catch(r){if(e?.suppressErrors)return!1;throw r}}l(Qw,"parse");var Hp=l((t,e,r=[])=>` .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),tE=l((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let i=Zt(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(a=>{qp(a.styles)||i.forEach(n=>{r+=Hp(a.id,n,a.styles)}),qp(a.textStyles)||(r+=Hp(a.id,"tspan",(a?.textStyles||[]).map(n=>n.replace("color","fill"))))})}return r},"createCssStyles"),eE=l((t,e,r,i)=>{let a=tE(t,r),n=sT(e,a,t.themeVariables);return ds(Hw(`${i}{${n}}`),Yw)},"createUserStyles"),rE=l((t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=aa(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),iE=l((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":V6,i=Zw(`${t}`);return``},"putIntoIFrame"),Up=l((t,e,r,i,a)=>{let n=t.append("div");n.attr("id",r),i&&n.attr("style",i);let s=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",j6);return a&&s.attr("xmlns:xlink",a),s.append("g"),t},"appendDivSvgG");function nc(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}l(nc,"sandboxedIframe");var aE=l((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),nE=l(async function(t,e,r){Zs();let i=bd(e);e=i.code;let a=Vt();P.debug(a),e.length>(a?.maxTextSize??N6)&&(e=z6);let n="#"+t,s="i"+t,o="#"+s,c="d"+t,h="#"+c,u=l(()=>{let D=ut(p?o:h).node();D&&"remove"in D&&D.remove()},"removeTempElements"),d=ut("body"),p=a.securityLevel===q6,f=a.securityLevel===W6,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let D=nc(ut(r),s);d=ut(D.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=ut(r);Up(d,t,c,`font-family: ${g}`,H6)}else{if(aE(document,t,c,s),p){let D=nc(ut("body"),s);d=ut(D.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=ut("body");Up(d,t,c)}let y,m;try{y=await ac.fromText(e,{title:i.title})}catch(D){if(a.suppressErrorRendering)throw u(),D;y=await ac.fromText("error"),m=D}let x=d.select(h).node(),b=y.type,k=x.firstChild,_=k.firstChild,w=y.renderer.getClasses?.(e,y),$=eE(a,b,w,n),T=document.createElement("style");T.innerHTML=$,k.insertBefore(T,_);try{await y.renderer.draw(e,t,"11.13.0",y)}catch(D){throw a.suppressErrorRendering?u():O4.draw(e,t,"11.13.0"),D}let O=d.select(`${h} svg`),R=y.db.getAccTitle?.(),I=y.db.getAccDescription?.();tv(b,O,R,I),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",U6);let S=d.select(h).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),S=rE(S,p,kr(a.arrowMarkerAbsolute)),p){let D=d.select(h+" svg").node();S=iE(S,D)}else f||(S=Qi.sanitize(S,{ADD_TAGS:J6,ADD_ATTR:K6,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(D6(),m)throw m;return u(),{diagramType:b,svg:S,bindFunctions:y.db.bindFunctions}},"render");function Jw(t={}){let e=Dt({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),CS(e),e?.theme&&e.theme in Xe?e.themeVariables=Xe[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Xe.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?kS(e):ix();lc(r.logLevel),Zs()}l(Jw,"initialize");var Kw=l((t,e={})=>{let{code:r}=xd(t);return ac.fromText(r,e)},"getDiagramFromText");function tv(t,e,r,i){Vw(e,t),Gw(e,r,i,e.attr("id"))}l(tv,"addA11yInfo");var jr=Object.freeze({render:nE,parse:Qw,getDiagramFromText:Kw,initialize:Jw,getConfig:Vt,setConfig:ax,getSiteConfig:ix,updateSiteConfig:$S,reset:l(()=>{Wo()},"reset"),globalReset:l(()=>{Wo(Zi)},"globalReset"),defaultConfig:Zi});lc(Vt().logLevel);Wo(Vt());var oE=l((t,e,r)=>{P.warn(t),Vu(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),ev=l(async function(t={querySelector:".mermaid"}){try{await sE(t)}catch(e){if(Vu(e)&&P.error(e.str),er.parseError&&er.parseError(e),!t.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),e}},"run"),sE=l(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let i=jr.getConfig();P.debug(`${t?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(P.debug("Start On Load: "+i?.startOnLoad),jr.updateSiteConfig({startOnLoad:i?.startOnLoad}));let n=new ve.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,o=[];for(let c of Array.from(a)){if(P.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");let h=`mermaid-${n.next()}`;s=c.innerHTML,s=id(ve.entityDecode(s)).trim().replace(//gi,"
    ");let u=ve.detectInit(s);u&&P.debug("Detected early reinit: ",u);try{let{svg:d,bindFunctions:p}=await nv(h,s,c);c.innerHTML=d,t&&await t(h),p&&p(c)}catch(d){oE(d,o,er.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),rv=l(function(t){jr.initialize(t)},"initialize"),lE=l(async function(t,e,r){P.warn("mermaid.init is deprecated. Please use run instead."),t&&rv(t);let i={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ev(i)},"init"),hE=l(async(t,{lazyLoad:e=!0}={})=>{Zs(),lh(...t),e===!1&&await M6()},"registerExternalDiagrams"),iv=l(function(){if(er.startOnLoad){let{startOnLoad:t}=jr.getConfig();t&&er.run().catch(e=>P.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",iv,!1);var cE=l(function(t){er.parseError=t},"setParseErrorHandler"),ps=[],_l=!1,av=l(async()=>{if(!_l){for(_l=!0;ps.length>0;){let t=ps.shift();if(t)try{await t()}catch(e){P.error("Error executing queue",e)}}_l=!1}},"executeQueue"),uE=l(async(t,e)=>new Promise((r,i)=>{let a=l(()=>new Promise((n,s)=>{jr.parse(t,e).then(o=>{n(o),r(o)},o=>{P.error("Error parsing",o),er.parseError?.(o),s(o),i(o)})}),"performCall");ps.push(a),av().catch(i)}),"parse"),nv=l((t,e,r)=>new Promise((i,a)=>{let n=l(()=>new Promise((s,o)=>{jr.render(t,e,r).then(c=>{s(c),i(c)},c=>{P.error("Error parsing",c),er.parseError?.(c),o(c),a(c)})}),"performCall");ps.push(n),av().catch(a)}),"render"),dE=l(()=>Object.keys(Rr).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),er={startOnLoad:!0,mermaidAPI:jr,parse:uE,render:nv,init:lE,run:ev,registerExternalDiagrams:hE,registerLayoutLoaders:K$,initialize:rv,parseError:void 0,contentLoaded:iv,setParseErrorHandler:cE,detectType:ku,registerIconPacks:gA,getRegisteredDiagramsMetadata:dE},pE=er;/*! Check if previously processed *//*! * Wait for document loaded before starting the execution */const PE=Object.freeze(Object.defineProperty({__proto__:null,default:pE},Symbol.toStringTag,{value:"Module"}));export{lT as $,S3 as A,mF as B,kB as C,Dt as D,zu as E,UM as F,wE as G,t5 as H,NM as I,BE as J,pT as K,Gu as L,Ke as M,ts as N,oF as O,vk as P,Oa as Q,ME as R,RB as S,kk as T,mx as U,cT as V,Rk as W,dT as X,uT as Y,fT as Z,Z5 as _,Bn as a,yx as a$,GM as a0,VM as a1,j5 as a2,vp as a3,$B as a4,V2 as a5,Qo as a6,Ln as a7,ia as a8,tk as a9,a_ as aA,i_ as aB,Vi as aC,r_ as aD,e_ as aE,Eo as aF,wn as aG,Ic as aH,Oc as aI,pi as aJ,Fo as aK,Fv as aL,wv as aM,oc as aN,bT as aO,Ws as aP,y_ as aQ,Fc as aR,m_ as aS,pS as aT,u0 as aU,QA as aV,v0 as aW,on as aX,SE as aY,SB as aZ,ZS as a_,gk as aa,Ko as ab,qu as ac,CB as ad,Os as ae,bp as af,Pu as ag,s5 as ah,Ru as ai,X5 as aj,tc as ak,zs as al,Re as am,Nu as an,jM as ao,bB as ap,uB as aq,p_ as ar,Sv as as,_v as at,im as au,bE as av,Ev as aw,o0 as ax,Nc as ay,ks as az,Mn as b,sp as b0,Io as b1,DB as b2,vB as b3,FM as b4,Iu as b5,qp as b6,aT as b7,Tn as b8,X as b9,FE as bA,DE as bB,AE as bC,tt as bD,LE as bE,BL as bF,OL as bG,AL as bH,xE as bI,yE as bJ,mE as bK,PE as bL,at as ba,xx as bb,_E as bc,oL as bd,X$ as be,EE as bf,$E as bg,T3 as bh,Zt as bi,rr as bj,ya as bk,Xu as bl,aa as bm,zk as bn,Ik as bo,En as bp,gA as bq,fA as br,Q as bs,vE as bt,xy as bu,Lc as bv,t_ as bw,K as bx,Vk as by,KL as bz,IE as c,OE as d,ve as e,B3 as f,_3 as g,_L as h,ut as i,hT as j,Qi as k,$v as l,l as m,rx as n,Vt as o,P as p,qs as q,Yp as r,Me as s,yT as t,rB as u,Hr as v,OB as w,xt as x,XM as y,TE as z};