Lines Matching defs:V

1 "use strict";var __esbuild_esm_mermaid=(()=>{var Pve=Object.create;var G1=Object.defineProperty;var Bve=Object.getOwnPropertyDescriptor;var Fve=Object.getOwnPropertyNames;var zve=Object.getPrototypeOf,Gve=Object.prototype.hasOwnProperty;var o=(t,e)=>G1(t,"name",{value:e,configurable:!0});var R=(t,e)=>()=>(t&&(e=t(t=0)),e);var gi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hr=(t,e)=>{for(var r in e)G1(t,r,{get:e[r],enumerable:!0})},Rb=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fve(e))!Gve.call(t,i)&&i!==r&&G1(t,i,{get:()=>e[i],enumerable:!(n=Bve(e,i))||n.enumerable});return t},dr=(t,e,r)=>(Rb(t,e,"default"),r&&Rb(r,e,"default")),Xi=(t,e,r)=>(r=t!=null?Pve(zve(t)):{},Rb(e||!t||!t.__esModule?G1(r,"default",{value:t,enumerable:!0}):r,t)),$ve=t=>Rb(G1({},"__esModule",{value:!0}),t);var Nb=gi((AC,_C)=>{"use strict";(function(t,e){typeof AC=="object"&&typeof _C<"u"?_C.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(AC,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",l="day",u="week",h="month",f="quarter",d="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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:o(function(k){var I=["th","st","nd","rd"],C=k%100;return"["+k+(I[(C-20)%10]||I[C]||I[0])+"]"},"ordinal")},x=o(function(k,I,C){var O=String(k);return!O||O.length>=I?k:""+Array(I+1-O.length).join(C)+k},"m"),b={s:x,z:o(function(k){var I=-k.utcOffset(),C=Math.abs(I),O=Math.floor(C/60),D=C%60;return(I<=0?"+":"-")+x(O,2,"0")+":"+x(D,2,"0")},"z"),m:o(function k(I,C){if(I.date()<C.date())return-k(C,I);var O=12*(C.year()-I.year())+(C.month()-I.month()),D=I.clone().add(O,h),P=C-D<0,F=I.clone().add(O+(P?-1:1),h);return+(-(O+(C-D)/(P?D-F:F-D))||0)},"t"),a:o(function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},"a"),p:o(function(k){return{M:h,y:d,w:u,d:l,D:p,h:s,m:a,s:i,ms:n,Q:f}[k]||String(k||"").toLowerCase().replace(/s$/,"")},"p"),u:o(function(k){return k===void 0},"u")},w="en",S={};S[w]=v;var T="$isDayjsObject",E=o(function(k){return k instanceof M||!(!k||!k[T])},"S"),_=o(function k(I,C,O){var D;if(!I)return w;if(typeof I=="string"){var P=I.toLowerCase();S[P]&&(D=P),C&&(S[P]=C,D=P);var F=I.split("-");if(!D&&F.length>1)return k(F[0])}else{var B=I.name;S[B]=I,D=B}return!O&&D&&(w=D),D||!O&&w},"t"),A=o(function(k,I){if(E(k))return k.clone();var C=typeof I=="object"?I:{};return C.date=k,C.args=arguments,new M(C)},"O"),L=b;L.l=_,L.i=E,L.w=function(k,I){return A(k,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var M=function(){function k(C){this.$L=_(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[T]=!0}o(k,"M");var I=k.prototype;return I.parse=function(C){this.$d=function(O){var D=O.date,P=O.utc;if(D===null)return new Date(NaN);if(L.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var F=D.match(g);if(F){var B=F[2]-1||0,$=(F[7]||"0").substring(0,3);return P?new Date(Date.UTC(F[1],B,F[3]||1,F[4]||0,F[5]||0,F[6]||0,$)):new Date(F[1],B,F[3]||1,F[4]||0,F[5]||0,F[6]||0,$)}}return new Date(D)}(C),this.init()},I.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},I.$utils=function(){return L},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(C,O){var D=A(C);return this.startOf(O)<=D&&D<=this.endOf(O)},I.isAfter=function(C,O){return A(C)<this.startOf(O)},I.isBefore=function(C,O){return this.endOf(O)<A(C)},I.$g=function(C,O,D){return L.u(C)?this[O]:this.set(D,C)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(C,O){var D=this,P=!!L.u(O)||O,F=L.p(C),B=o(function(J,Z){var H=L.w(D.$u?Date.UTC(D.$y,Z,J):new Date(D.$y,Z,J),D);return P?H:H.endOf(l)},"l"),$=o(function(J,Z){return L.w(D.toDate()[J].apply(D.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Z)),D)},"$"),z=this.$W,Y=this.$M,Q=this.$D,X="set"+(this.$u?"UTC":"");switch(F){case d:return P?B(1,0):B(31,11);case h:return P?B(1,Y):B(0,Y+1);case u:var ie=this.$locale().weekStart||0,j=(z<ie?z+7:z)-ie;return B(P?Q-j:Q+(6-j),Y);case l:case p:return $(X+"Hours",0);case s:return $(X+"Minutes",1);case a:return $(X+"Seconds",2);case i:return $(X+"Milliseconds",3);default:return this.clone()}},I.endOf=function(C){return this.startOf(C,!1)},I.$set=function(C,O){var D,P=L.p(C),F="set"+(this.$u?"UTC":""),B=(D={},D[l]=F+"Date",D[p]=F+"Date",D[h]=F+"Month",D[d]=F+"FullYear",D[s]=F+"Hours",D[a]=F+"Minutes",D[i]=F+"Seconds",D[n]=F+"Milliseconds",D)[P],$=P===l?this.$D+(O-this.$W):O;if(P===h||P===d){var z=this.clone().set(p,1);z.$d[B]($),z.init(),this.$d=z.set(p,Math.min(this.$D,z.daysInMonth())).$d}else B&&this.$d[B]($);return this.init(),this},I.set=function(C,O){return this.clone().$set(C,O)},I.get=function(C){return this[L.p(C)]()},I.add=function(C,O){var D,P=this;C=Number(C);var F=L.p(O),B=o(function(Y){var Q=A(P);return L.w(Q.date(Q.date()+Math.round(Y*C)),P)},"y");if(F===h)return this.set(h,this.$M+C);if(F===d)return this.set(d,this.$y+C);if(F===l)return B(1);if(F===u)return B(7);var $=(D={},D[a]=e,D[s]=r,D[i]=t,D)[F]||1,z=this.$d.getTime()+C*$;return L.w(z,this)},I.subtract=function(C,O){return this.add(-1*C,O)},I.format=function(C){var O=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var P=C||"YYYY-MM-DDTHH:mm:ssZ",F=L.z(this),B=this.$H,$=this.$m,z=this.$M,Y=D.weekdays,Q=D.months,X=D.meridiem,ie=o(function(Z,H,q,K){return Z&&(Z[H]||Z(O,P))||q[H].slice(0,K)},"h"),j=o(function(Z){return L.s(B%12||12,Z,"0")},"d"),J=X||function(Z,H,q){var K=Z<12?"AM":"PM";return q?K.toLowerCase():K};return P.replace(y,function(Z,H){return H||function(q){switch(q){case"YY":return String(O.$y).slice(-2);case"YYYY":return L.s(O.$y,4,"0");case"M":return z+1;case"MM":return L.s(z+1,2,"0");case"MMM":return ie(D.monthsShort,z,Q,3);case"MMMM":return ie(Q,z);case"D":return O.$D;case"DD":return L.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return ie(D.weekdaysMin,O.$W,Y,2);case"ddd":return ie(D.weekdaysShort,O.$W,Y,3);case"dddd":return Y[O.$W];case"H":return String(B);case"HH":return L.s(B,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return J(B,$,!0);case"A":return J(B,$,!1);case"m":return String($);case"mm":return L.s($,2,"0");case"s":return String(O.$s);case"ss":return L.s(O.$s,2,"0");case"SSS":return L.s(O.$ms,3,"0");case"Z":return F}return null}(Z)||F.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(C,O,D){var P,F=this,B=L.p(O),$=A(C),z=($.utcOffset()-this.utcOffset())*e,Y=this-$,Q=o(function(){return L.m(F,$)},"D");switch(B){case d:P=Q()/12;break;case h:P=Q();break;case f:P=Q()/3;break;case u:P=(Y-z)/6048e5;break;case l:P=(Y-z)/864e5;break;case s:P=Y/r;break;case a:P=Y/e;break;case i:P=Y/t;break;default:P=Y}return D?P:L.a(P)},I.daysInMonth=function(){return this.endOf(h).$D},I.$locale=function(){return S[this.$L]},I.locale=function(C,O){if(!C)return this.$L;var D=this.clone(),P=_(C,O,!0);return P&&(D.$L=P),D},I.clone=function(){return L.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},k}(),N=M.prototype;return A.prototype=N,[["$ms",n],["$s",i],["$m",a],["$H",s],["$W",l],["$M",h],["$y",d],["$D",p]].forEach(function(k){N[k[1]]=function(I){return this.$g(I,k[0],k[1])}}),A.extend=function(k,I){return k.$i||(k(I,M,A),k.$i=!0),A},A.locale=_,A.isDayjs=E,A.unix=function(k){return A(1e3*k)},A.en=S[w],A.Ls=S,A.p={},A})});var LF,Zc,V,$1,Eo,ut=R(()=>{"use strict";LF=Xi(Nb(),1),Zc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:o((...t)=>{},"trace"),debug:o((...t)=>{},"debug"),info:o((...t)=>{},"info"),warn:o((...t)=>{},"warn"),error:o((...t)=>{},"error"),fatal:o((...t)=>{},"fatal")},$1=o(function(t="fatal"){let e=Zc.fatal;typeof t=="string"?t.toLowerCase()in Zc&&(e=Zc[t]):typeof t=="number"&&(e=t),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},e<=Zc.fatal&&(V.fatal=console.error?console.error.bind(console,Eo("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Eo("FATAL"))),e<=Zc.error&&(V.error=console.error?console.error.bind(console,Eo("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Eo("ERROR"))),e<=Zc.warn&&(V.warn=console.warn?console.warn.bind(console,Eo("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Eo("WARN"))),e<=Zc.info&&(V.info=console.info?console.info.bind(console,Eo("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Eo("INFO"))),e<=Zc.debug&&(V.debug=console.debug?console.debug.bind(console,Eo("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Eo("DEBUG"))),e<=Zc.trace&&(V.trace=console.debug?console.debug.bind(console,Eo("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Eo("TRACE")))},"setLogLevel"),Eo=o(t=>`%c${(0,LF.default)().format("ss.SSS")} : ${t} : `,"format")});var Vve,np,LC,DF,Mb=R(()=>{"use strict";Vve=Object.freeze({left:0,top:0,width:16,height:16}),np=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),LC=Object.freeze({...Vve,...np}),DF=Object.freeze({...LC,body:"",hidden:!1})});var Uve,RF,NF=R(()=>{"use strict";Mb();Uve=Object.freeze({width:null,height:null}),RF=Object.freeze({...Uve,...np})});var Ib,DC,Ob,MF=R(()=>{"use strict";Ib=/^[a-z0-9]+(-[a-z0-9]+)*$/,DC=o((t,e,r,n="")=>{let i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return e&&!Ob(h)?null:h}let a=i[0],s=a.split("-");if(s.length>1){let l={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!Ob(l)?null:l}if(r&&n===""){let l={provider:n,prefix:"",name:a};return e&&!Ob(l,r)?null:l}return null},"stringToIcon"),Ob=o((t,e)=>t?!!((t.provider===""||t.provider.match(Ib))&&(e&&t.prefix===""||t.prefix.match(Ib))&&t.name.match(Ib)):!1,"validateIconName")});function IF(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}var OF=R(()=>{"use strict";o(IF,"mergeIconTransformations")});function RC(t,e){let r=IF(t,e);for(let n in DF)n in np?n in t&&!(n in r)&&(r[n]=np[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}var PF=R(()=>{"use strict";Mb();OF();o(RC,"mergeIconData")});function BF(t,e){let r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let l=n[s]&&n[s].parent,u=l&&a(l);u&&(i[s]=[l].concat(u))}return i[s]}return o(a,"resolve"),(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var FF=R(()=>{"use strict";o(BF,"getIconsTree")});function zF(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(l){a=RC(n[l]||i[l],a)}return o(s,"parse"),s(e),r.forEach(s),RC(t,a)}function NC(t,e){if(t.icons[e])return zF(t,e,[]);let r=BF(t,[e])[e];return r?zF(t,e,r):null}var GF=R(()=>{"use strict";PF();FF();o(zF,"internalGetIconData");o(NC,"getIconData")});function MC(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 n=t.split(Hve);if(n===null||!n.length)return t;let i=[],a=n.shift(),s=Yve.test(a);for(;;){if(s){let l=parseFloat(a);isNaN(l)?i.push(a):i.push(Math.ceil(l*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}var Hve,Yve,$F=R(()=>{"use strict";Hve=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Yve=/^-?[0-9.]*[0-9]+[0-9.]*$/g;o(MC,"calculateSize")});function Wve(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let i=t.indexOf(">",n),a=t.indexOf("</"+e);if(i===-1||a===-1)break;let s=t.indexOf(">",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function qve(t,e){return t?"<defs>"+t+"</defs>"+e:e}function VF(t,e,r){let n=Wve(t);return qve(n.defs,e+n.content+r)}var UF=R(()=>{"use strict";o(Wve,"splitSVGDefs");o(qve,"mergeDefsAndContent");o(VF,"wrapSVGContent")});function IC(t,e){let r={...LC,...t},n={...RF,...e},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(y=>{let v=[],x=y.hFlip,b=y.vFlip,w=y.rotate;x?b?w+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):b&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=i.height/2+i.top,v.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:S=i.width/2+i.left,v.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(i.left!==i.top&&(S=i.left,i.left=i.top,i.top=S),i.width!==i.height&&(S=i.width,i.width=i.height,i.height=S)),v.length&&(a=VF(a,'<g transform="'+v.join(" ")+'">',"</g>"))});let s=n.width,l=n.height,u=i.width,h=i.height,f,d;s===null?(d=l===null?"1em":l==="auto"?h:l,f=MC(d,u/h)):(f=s==="auto"?u:s,d=l===null?MC(f,h/u):l==="auto"?h:l);let p={},m=o((y,v)=>{Xve(v)||(p[y]=v.toString())},"setAttr");m("width",f),m("height",d);let g=[i.left,i.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a}}var Xve,HF=R(()=>{"use strict";Mb();NF();$F();UF();Xve=o(t=>t==="unset"||t==="undefined"||t==="none","isUnsetKeyword");o(IC,"iconToSVG")});function OC(t,e=Kve){let r=[],n;for(;n=jve.exec(t);)r.push(n[1]);if(!r.length)return t;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof e=="function"?e(a):e+(Qve++).toString(),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}var jve,Kve,Qve,YF=R(()=>{"use strict";jve=/\sid="(\S+)"/g,Kve="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),Qve=0;o(OC,"replaceIDs")});function PC(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}var WF=R(()=>{"use strict";o(PC,"iconToHTML")});var XF=gi((ait,qF)=>{"use strict";var ip=1e3,ap=ip*60,sp=ap*60,$f=sp*24,Zve=$f*7,Jve=$f*365.25;qF.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return e2e(t);if(r==="number"&&isFinite(t))return e.long?r2e(t):t2e(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function e2e(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Jve;case"weeks":case"week":case"w":return r*Zve;case"days":case"day":case"d":return r*$f;case"hours":case"hour":case"hrs":case"hr":case"h":return r*sp;case"minutes":case"minute":case"mins":case"min":case"m":return r*ap;case"seconds":case"second":case"secs":case"sec":case"s":return r*ip;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}o(e2e,"parse");function t2e(t){var e=Math.abs(t);return e>=$f?Math.round(t/$f)+"d":e>=sp?Math.round(t/sp)+"h":e>=ap?Math.round(t/ap)+"m":e>=ip?Math.round(t/ip)+"s":t+"ms"}o(t2e,"fmtShort");function r2e(t){var e=Math.abs(t);return e>=$f?Pb(t,e,$f,"day"):e>=sp?Pb(t,e,sp,"hour"):e>=ap?Pb(t,e,ap,"minute"):e>=ip?Pb(t,e,ip,"second"):t+" ms"}o(r2e,"fmtLong");function Pb(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}o(Pb,"plural")});var KF=gi((oit,jF)=>{"use strict";function n2e(t){r.debug=r,r.default=r,r.coerce=u,r.disable=a,r.enable=i,r.enabled=s,r.humanize=XF(),r.destroy=h,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let d=0;for(let p=0;p<f.length;p++)d=(d<<5)-d+f.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}o(e,"selectColor"),r.selectColor=e;function r(f){let d,p=null,m,g;function y(...v){if(!y.enabled)return;let x=y,b=Number(new Date),w=b-(d||b);x.diff=w,x.prev=d,x.curr=b,d=b,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let S=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(E,_)=>{if(E==="%%")return"%";S++;let A=r.formatters[_];if(typeof A=="function"){let L=v[S];E=A.call(x,L),v.splice(S,1),S--}return E}),r.formatArgs.call(x,v),(x.log||r.log).apply(x,v)}return o(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:o(()=>p!==null?p:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),"get"),set:o(v=>{p=v},"set")}),typeof r.init=="function"&&r.init(y),y}o(r,"createDebug");function n(f,d){let p=r(this.namespace+(typeof d>"u"?":":d)+f);return p.log=this.log,p}o(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d,p=(typeof f=="string"?f:"").split(/[\s,]+/),m=p.length;for(d=0;d<m;d++)p[d]&&(f=p[d].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}o(i,"enable");function a(){let f=[...r.names.map(l),...r.skips.map(l).map(d=>"-"+d)].join(",");return r.enable(""),f}o(a,"disable");function s(f){if(f[f.length-1]==="*")return!0;let d,p;for(d=0,p=r.skips.length;d<p;d++)if(r.skips[d].test(f))return!1;for(d=0,p=r.names.length;d<p;d++)if(r.names[d].test(f))return!0;return!1}o(s,"enabled");function l(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}o(l,"toNamespace");function u(f){return f instanceof Error?f.stack||f.message:f}o(u,"coerce");function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(h,"destroy"),r.enable(r.load()),r}o(n2e,"setup");jF.exports=n2e});var QF=gi((Ys,Bb)=>{"use strict";Ys.formatArgs=a2e;Ys.save=s2e;Ys.load=o2e;Ys.useColors=i2e;Ys.storage=l2e();Ys.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ys.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function i2e(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(i2e,"useColors");function a2e(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Bb.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}o(a2e,"formatArgs");Ys.log=console.debug||console.log||(()=>{});function s2e(t){try{t?Ys.storage.setItem("debug",t):Ys.storage.removeItem("debug")}catch{}}o(s2e,"save");function o2e(){let t;try{t=Ys.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(o2e,"load");function l2e(){try{return localStorage}catch{}}o(l2e,"localstorage");Bb.exports=KF()(Ys);var{formatters:c2e}=Bb.exports;c2e.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var uit,ZF=R(()=>{"use strict";MF();GF();HF();YF();WF();uit=Xi(QF(),1)});var FC,BC,JF,Fb,u2e,zb,V1=R(()=>{"use strict";ut();ZF();FC={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},BC=new Map,JF=new Map,Fb=o(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(V.debug("Registering icon pack:",e.name),"loader"in e)JF.set(e.name,e.loader);else if("icons"in e)BC.set(e.name,e.icons);else throw V.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),u2e=o(async(t,e)=>{let r=DC(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=BC.get(n);if(!i){let s=JF.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},BC.set(n,i)}catch(l){throw V.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=NC(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),zb=o(async(t,e)=>{let r;try{r=await u2e(t,e?.fallbackPrefix)}catch(a){V.error(a),r=FC}let n=IC(r,e);return PC(OC(n.body),n.attributes)},"getIconSVG")});function Gb(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(l,u){var h=u.match(/\n([\t ]+|(?!\s).)/g);return h?l.concat(h.map(function(f){var d,p;return(p=(d=f.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):l},[]);if(i.length){var a=new RegExp(`
7 `);for(let[r,{detector:n}]of Object.entries(Uf))if(n(t,e))return r;throw new op(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Ub=o((...t)=>{for(let{id:e,detector:r,loader:n}of t)$C(e,r,n)},"registerLazyLoadedDiagrams"),$C=o((t,e,r)=>{Uf[t]&&V.warn(`Detector with key ${t} already exists. Overwriting.`),Uf[t]={detector:e,loader:r},V.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),tz=o(t=>Uf[t].loader,"getDiagramLoader")});var U1,rz,VC=R(()=>{"use strict";U1=function(){var t=o(function(_e,me,W,fe){for(W=W||{},fe=_e.length;fe--;W[_e[fe]]=me);return W},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],l=[1,64],u=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],S=[1,36],T=[1,37],E=[1,38],_=[1,39],A=[1,40],L=[1,41],M=[1,42],N=[1,43],k=[1,44],I=[1,45],C=[1,46],O=[1,47],D=[1,48],P=[1,50],F=[1,51],B=[1,52],$=[1,53],z=[1,54],Y=[1,55],Q=[1,56],X=[1,57],ie=[1,58],j=[1,59],J=[1,60],Z=[14,42],H=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],se=[1,83],ce=[1,84],ue=[1,85],te=[12,14,42],De=[12,14,33,42],oe=[12,14,33,42,76,77,79,80],ke=[12,33],Ie=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Se={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:o(function(me,W,fe,ge,re,he,ne){var ae=he.length-1;switch(re){case 3:ge.setDirection("TB");break;case 4:ge.setDirection("BT");break;case 5:ge.setDirection("RL");break;case 6:ge.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ge.setC4Type(he[ae-3]);break;case 19:ge.setTitle(he[ae].substring(6)),this.$=he[ae].substring(6);break;case 20:ge.setAccDescription(he[ae].substring(15)),this.$=he[ae].substring(15);break;case 21:this.$=he[ae].trim(),ge.setTitle(this.$);break;case 22:case 23:this.$=he[ae].trim(),ge.setAccDescription(this.$);break;case 28:he[ae].splice(2,0,"ENTERPRISE"),ge.addPersonOrSystemBoundary(...he[ae]),this.$=he[ae];break;case 29:he[ae].splice(2,0,"SYSTEM"),ge.addPersonOrSystemBoundary(...he[ae]),this.$=he[ae];break;case 30:ge.addPersonOrSystemBoundary(...he[ae]),this.$=he[ae];break;case 31:he[ae].splice(2,0,"CONTAINER"),ge.addContainerBoundary(...he[ae]),this.$=he[ae];break;case 32:ge.addDeploymentNode("node",...he[ae]),this.$=he[ae];break;case 33:ge.addDeploymentNode("nodeL",...he[ae]),this.$=he[ae];break;case 34:ge.addDeploymentNode("nodeR",...he[ae]),this.$=he[ae];break;case 35:ge.popBoundaryParseStack();break;case 39:ge.addPersonOrSystem("person",...he[ae]),this.$=he[ae];break;case 40:ge.addPersonOrSystem("external_person",...he[ae]),this.$=he[ae];break;case 41:ge.addPersonOrSystem("system",...he[ae]),this.$=he[ae];break;case 42:ge.addPersonOrSystem("system_db",...he[ae]),this.$=he[ae];break;case 43:ge.addPersonOrSystem("system_queue",...he[ae]),this.$=he[ae];break;case 44:ge.addPersonOrSystem("external_system",...he[ae]),this.$=he[ae];break;case 45:ge.addPersonOrSystem("external_system_db",...he[ae]),this.$=he[ae];break;case 46:ge.addPersonOrSystem("external_system_queue",...he[ae]),this.$=he[ae];break;case 47:ge.addContainer("container",...he[ae]),this.$=he[ae];break;case 48:ge.addContainer("container_db",...he[ae]),this.$=he[ae];break;case 49:ge.addContainer("container_queue",...he[ae]),this.$=he[ae];break;case 50:ge.addContainer("external_container",...he[ae]),this.$=he[ae];break;case 51:ge.addContainer("external_container_db",...he[ae]),this.$=he[ae];break;case 52:ge.addContainer("external_container_queue",...he[ae]),this.$=he[ae];break;case 53:ge.addComponent("component",...he[ae]),this.$=he[ae];break;case 54:ge.addComponent("component_db",...he[ae]),this.$=he[ae];break;case 55:ge.addComponent("component_queue",...he[ae]),this.$=he[ae];break;case 56:ge.addComponent("external_component",...he[ae]),this.$=he[ae];break;case 57:ge.addComponent("external_component_db",...he[ae]),this.$=he[ae];break;case 58:ge.addComponent("external_component_queue",...he[ae]),this.$=he[ae];break;case 60:ge.addRel("rel",...he[ae]),this.$=he[ae];break;case 61:ge.addRel("birel",...he[ae]),this.$=he[ae];break;case 62:ge.addRel("rel_u",...he[ae]),this.$=he[ae];break;case 63:ge.addRel("rel_d",...he[ae]),this.$=he[ae];break;case 64:ge.addRel("rel_l",...he[ae]),this.$=he[ae];break;case 65:ge.addRel("rel_r",...he[ae]),this.$=he[ae];break;case 66:ge.addRel("rel_b",...he[ae]),this.$=he[ae];break;case 67:he[ae].splice(0,1),ge.addRel("rel",...he[ae]),this.$=he[ae];break;case 68:ge.updateElStyle("update_el_style",...he[ae]),this.$=he[ae];break;case 69:ge.updateRelStyle("update_rel_style",...he[ae]),this.$=he[ae];break;case 70:ge.updateLayoutConfig("update_layout_config",...he[ae]),this.$=he[ae];break;case 71:this.$=[he[ae]];break;case 72:he[ae].unshift(he[ae-1]),this.$=he[ae];break;case 73:case 75:this.$=he[ae].trim();break;case 74:let we={};we[he[ae-1].trim()]=he[ae].trim(),this.$=we;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J},{14:[1,74]},t(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J}),t(Z,[2,14]),t(H,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(q,[2,19]),t(q,[2,20]),{25:[1,78]},{27:[1,79]},t(q,[2,23]),{35:80,75:81,76:K,77:se,79:ce,80:ue},{35:86,75:81,76:K,77:se,79:ce,80:ue},{35:87,75:81,76:K,77:se,79:ce,80:ue},{35:88,75:81,76:K,77:se,79:ce,80:ue},{35:89,75:81,76:K,77:se,79:ce,80:ue},{35:90,75:81,76:K,77:se,79:ce,80:ue},{35:91,75:81,76:K,77:se,79:ce,80:ue},{35:92,75:81,76:K,77:se,79:ce,80:ue},{35:93,75:81,76:K,77:se,79:ce,80:ue},{35:94,75:81,76:K,77:se,79:ce,80:ue},{35:95,75:81,76:K,77:se,79:ce,80:ue},{35:96,75:81,76:K,77:se,79:ce,80:ue},{35:97,75:81,76:K,77:se,79:ce,80:ue},{35:98,75:81,76:K,77:se,79:ce,80:ue},{35:99,75:81,76:K,77:se,79:ce,80:ue},{35:100,75:81,76:K,77:se,79:ce,80:ue},{35:101,75:81,76:K,77:se,79:ce,80:ue},{35:102,75:81,76:K,77:se,79:ce,80:ue},{35:103,75:81,76:K,77:se,79:ce,80:ue},{35:104,75:81,76:K,77:se,79:ce,80:ue},t(te,[2,59]),{35:105,75:81,76:K,77:se,79:ce,80:ue},{35:106,75:81,76:K,77:se,79:ce,80:ue},{35:107,75:81,76:K,77:se,79:ce,80:ue},{35:108,75:81,76:K,77:se,79:ce,80:ue},{35:109,75:81,76:K,77:se,79:ce,80:ue},{35:110,75:81,76:K,77:se,79:ce,80:ue},{35:111,75:81,76:K,77:se,79:ce,80:ue},{35:112,75:81,76:K,77:se,79:ce,80:ue},{35:113,75:81,76:K,77:se,79:ce,80:ue},{35:114,75:81,76:K,77:se,79:ce,80:ue},{35:115,75:81,76:K,77:se,79:ce,80:ue},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:se,79:ce,80:ue},{35:120,75:81,76:K,77:se,79:ce,80:ue},{35:121,75:81,76:K,77:se,79:ce,80:ue},{35:122,75:81,76:K,77:se,79:ce,80:ue},{35:123,75:81,76:K,77:se,79:ce,80:ue},{35:124,75:81,76:K,77:se,79:ce,80:ue},{35:125,75:81,76:K,77:se,79:ce,80:ue},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Z,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:w,51:S,52:T,53:E,54:_,55:A,56:L,57:M,58:N,59:k,60:I,61:C,62:O,63:D,64:P,65:F,66:B,67:$,68:z,69:Y,70:Q,71:X,72:ie,73:j,74:J}),t(q,[2,21]),t(q,[2,22]),t(te,[2,39]),t(De,[2,71],{75:81,35:132,76:K,77:se,79:ce,80:ue}),t(oe,[2,73]),{78:[1,133]},t(oe,[2,75]),t(oe,[2,76]),t(te,[2,40]),t(te,[2,41]),t(te,[2,42]),t(te,[2,43]),t(te,[2,44]),t(te,[2,45]),t(te,[2,46]),t(te,[2,47]),t(te,[2,48]),t(te,[2,49]),t(te,[2,50]),t(te,[2,51]),t(te,[2,52]),t(te,[2,53]),t(te,[2,54]),t(te,[2,55]),t(te,[2,56]),t(te,[2,57]),t(te,[2,58]),t(te,[2,60]),t(te,[2,61]),t(te,[2,62]),t(te,[2,63]),t(te,[2,64]),t(te,[2,65]),t(te,[2,66]),t(te,[2,67]),t(te,[2,68]),t(te,[2,69]),t(te,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ke,[2,28]),t(ke,[2,29]),t(ke,[2,30]),t(ke,[2,31]),t(ke,[2,32]),t(ke,[2,33]),t(ke,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t(Z,[2,38]),t(De,[2,72]),t(oe,[2,74]),t(te,[2,24]),t(te,[2,35]),t(Ie,[2,25]),t(Ie,[2,26],{12:[1,138]}),t(Ie,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:o(function(me,W){if(W.recoverable)this.trace(me);else{var fe=new Error(me);throw fe.hash=W,fe}},"parseError"),parse:o(function(me){var W=this,fe=[0],ge=[],re=[null],he=[],ne=this.table,ae="",we=0,Te=0,Ce=0,Ae=2,Ge=1,Me=he.slice.call(arguments,1),ye=Object.create(this.lexer),He={yy:{}};for(var ze in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ze)&&(He.yy[ze]=this.yy[ze]);ye.setInput(me,He.yy),He.yy.lexer=ye,He.yy.parser=this,typeof ye.yylloc>"u"&&(ye.yylloc={});var Ze=ye.yylloc;he.push(Ze);var gt=ye.options&&ye.options.ranges;typeof He.yy.parseError=="function"?this.parseError=He.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(St){fe.length=fe.length-2*St,re.length=re.length-St,he.length=he.length-St}o(yt,"popStack");function tt(){var St;return St=ge.pop()||ye.lex()||Ge,typeof St!="number"&&(St instanceof Array&&(ge=St,St=ge.pop()),St=W.symbols_[St]||St),St}o(tt,"lex");for(var Ye,Je,Ve,je,kt,at,xt={},it,dt,lt,It;;){if(Ve=fe[fe.length-1],this.defaultActions[Ve]?je=this.defaultActions[Ve]:((Ye===null||typeof Ye>"u")&&(Ye=tt()),je=ne[Ve]&&ne[Ve][Ye]),typeof je>"u"||!je.length||!je[0]){var mt="";It=[];for(it in ne[Ve])this.terminals_[it]&&it>Ae&&It.push("'"+this.terminals_[it]+"'");ye.showPosition?mt="Parse error on line "+(we+1)+`:
12 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var W=this.next();return W||this.lex()},"lex"),begin:o(function(W){this.conditionStack.push(W)},"begin"),popState:o(function(){var W=this.conditionStack.length-1;return W>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(W){return W=this.conditionStack.length-1-Math.abs(W||0),W>=0?this.conditionStack[W]:"INITIAL"},"topState"),pushState:o(function(W){this.begin(W)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(W,fe,ge,re){var he=re;switch(ge){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _e}();Se.lexer=Ue;function Pe(){this.yy={}}return o(Pe,"Parser"),Pe.prototype=Se,Se.Parser=Pe,new Pe}();U1.parser=U1;rz=U1});var UC,On,cp=R(()=>{"use strict";UC=o((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>UC(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),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(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=UC(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),On=UC});var Hb,nz,iz=R(()=>{"use strict";Hb={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:o(t=>t>=255?255:t<0?0:t,"r"),g:o(t=>t>=255?255:t<0?0:t,"g"),b:o(t=>t>=255?255:t<0?0:t,"b"),h:o(t=>t%360,"h"),s:o(t=>t>=100?100:t<0?0:t,"s"),l:o(t=>t>=100?100:t<0?0:t,"l"),a:o(t=>t>=1?1:t<0?0:t,"a")},toLinear:o(t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:o((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:o(({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Hb.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return Hb.hue2rgb(a,i,t)*255;case"b":return Hb.hue2rgb(a,i,t-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:o(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let l=i-a,u=s>.5?l/(2-i-a):l/(i+a);if(n==="s")return u*100;switch(i){case t:return((e-r)/l+(e<r?6:0))*60;case e:return((r-t)/l+2)*60;case r:return((t-e)/l+4)*60;default:return-1}},"rgb2hsl")},nz=Hb});var h2e,az,sz=R(()=>{"use strict";h2e={clamp:o((t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:o(t=>Math.round(t*1e10)/1e10,"round")},az=h2e});var f2e,oz,lz=R(()=>{"use strict";f2e={dec2hex:o(t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`},"dec2hex")},oz=f2e});var d2e,Bt,jl=R(()=>{"use strict";iz();sz();lz();d2e={channel:nz,lang:az,unit:oz},Bt=d2e});var Jc,Li,H1=R(()=>{"use strict";jl();Jc={};for(let t=0;t<=255;t++)Jc[t]=Bt.unit.dec2hex(t);Li={ALL:0,RGB:1,HSL:2}});var HC,cz,uz=R(()=>{"use strict";H1();HC=class{static{o(this,"Type")}constructor(){this.type=Li.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=Li.ALL}is(e){return this.type===e}},cz=HC});var YC,hz,fz=R(()=>{"use strict";jl();uz();H1();YC=class{static{o(this,"Channels")}constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new cz}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Li.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Bt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Bt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Bt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Bt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Bt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Bt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(Li.HSL)&&r!==void 0?r:(this._ensureHSL(),Bt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(Li.HSL)&&r!==void 0?r:(this._ensureHSL(),Bt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(Li.HSL)&&r!==void 0?r:(this._ensureHSL(),Bt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(Li.RGB)&&r!==void 0?r:(this._ensureRGB(),Bt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(Li.RGB)&&r!==void 0?r:(this._ensureRGB(),Bt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(Li.RGB)&&r!==void 0?r:(this._ensureRGB(),Bt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Li.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Li.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Li.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Li.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Li.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Li.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},hz=YC});var p2e,oh,Y1=R(()=>{"use strict";fz();p2e=new hz({r:0,g:0,b:0,a:0},"transparent"),oh=p2e});var dz,Yf,WC=R(()=>{"use strict";Y1();H1();dz={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:o(t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(dz.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,l=s?1:17,u=s?8:4,h=a?0:-1,f=s?255:15;return oh.set({r:(n>>u*(h+3)&f)*l,g:(n>>u*(h+2)&f)*l,b:(n>>u*(h+1)&f)*l,a:a?(n&f)*l/255:1},t)},"parse"),stringify:o(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${Jc[Math.round(e)]}${Jc[Math.round(r)]}${Jc[Math.round(n)]}${Jc[Math.round(i*255)]}`:`#${Jc[Math.round(e)]}${Jc[Math.round(r)]}${Jc[Math.round(n)]}`},"stringify")},Yf=dz});var Yb,W1,pz=R(()=>{"use strict";jl();Y1();Yb={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:o(t=>{let e=t.match(Yb.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return Bt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Bt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Bt.channel.clamp.h(parseFloat(r)*360)}}return Bt.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:o(t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Yb.re);if(!r)return;let[,n,i,a,s,l]=r;return oh.set({h:Yb._hue2deg(n),s:Bt.channel.clamp.s(parseFloat(i)),l:Bt.channel.clamp.l(parseFloat(a)),a:s?Bt.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:o(t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Bt.lang.round(e)}, ${Bt.lang.round(r)}%, ${Bt.lang.round(n)}%, ${i})`:`hsl(${Bt.lang.round(e)}, ${Bt.lang.round(r)}%, ${Bt.lang.round(n)}%)`},"stringify")},W1=Yb});var Wb,qC,mz=R(()=>{"use strict";WC();Wb={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:o(t=>{t=t.toLowerCase();let e=Wb.colors[t];if(e)return Yf.parse(e)},"parse"),stringify:o(t=>{let e=Yf.stringify(t);for(let r in Wb.colors)if(Wb.colors[r]===e)return r},"stringify")},qC=Wb});var gz,q1,yz=R(()=>{"use strict";jl();Y1();gz={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:o(t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(gz.re);if(!r)return;let[,n,i,a,s,l,u,h,f]=r;return oh.set({r:Bt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Bt.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:Bt.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?Bt.channel.clamp.a(f?parseFloat(h)/100:parseFloat(h)):1},t)},"parse"),stringify:o(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Bt.lang.round(e)}, ${Bt.lang.round(r)}, ${Bt.lang.round(n)}, ${Bt.lang.round(i)})`:`rgb(${Bt.lang.round(e)}, ${Bt.lang.round(r)}, ${Bt.lang.round(n)})`},"stringify")},q1=gz});var m2e,Di,eu=R(()=>{"use strict";WC();pz();mz();yz();H1();m2e={format:{keyword:qC,hex:Yf,rgb:q1,rgba:q1,hsl:W1,hsla:W1},parse:o(t=>{if(typeof t!="string")return t;let e=Yf.parse(t)||q1.parse(t)||W1.parse(t)||qC.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:o(t=>!t.changed&&t.color?t.color:t.type.is(Li.HSL)||t.data.r===void 0?W1.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?q1.stringify(t):Yf.stringify(t),"stringify")},Di=m2e});var g2e,qb,XC=R(()=>{"use strict";jl();eu();g2e=o((t,e)=>{let r=Di.parse(t);for(let n in e)r[n]=Bt.channel.clamp[n](e[n]);return Di.stringify(r)},"change"),qb=g2e});var y2e,Ws,jC=R(()=>{"use strict";jl();Y1();eu();XC();y2e=o((t,e,r=0,n=1)=>{if(typeof t!="number")return qb(t,{a:e});let i=oh.set({r:Bt.channel.clamp.r(t),g:Bt.channel.clamp.g(e),b:Bt.channel.clamp.b(r),a:Bt.channel.clamp.a(n)});return Di.stringify(i)},"rgba"),Ws=y2e});var v2e,X1,vz=R(()=>{"use strict";jl();eu();v2e=o((t,e)=>Bt.lang.round(Di.parse(t)[e]),"channel"),X1=v2e});var x2e,xz,bz=R(()=>{"use strict";jl();eu();x2e=o(t=>{let{r:e,g:r,b:n}=Di.parse(t),i=.2126*Bt.channel.toLinear(e)+.7152*Bt.channel.toLinear(r)+.0722*Bt.channel.toLinear(n);return Bt.lang.round(i)},"luminance"),xz=x2e});var b2e,wz,Tz=R(()=>{"use strict";bz();b2e=o(t=>xz(t)>=.5,"isLight"),wz=b2e});var w2e,Wa,kz=R(()=>{"use strict";Tz();w2e=o(t=>!wz(t),"isDark"),Wa=w2e});var T2e,Xb,KC=R(()=>{"use strict";jl();eu();T2e=o((t,e,r)=>{let n=Di.parse(t),i=n[e],a=Bt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),Di.stringify(n)},"adjustChannel"),Xb=T2e});var k2e,Et,Ez=R(()=>{"use strict";KC();k2e=o((t,e)=>Xb(t,"l",e),"lighten"),Et=k2e});var E2e,Dt,Cz=R(()=>{"use strict";KC();E2e=o((t,e)=>Xb(t,"l",-e),"darken"),Dt=E2e});var C2e,Oe,Sz=R(()=>{"use strict";eu();XC();C2e=o((t,e)=>{let r=Di.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return qb(t,n)},"adjust"),Oe=C2e});var S2e,Az,_z=R(()=>{"use strict";eu();jC();S2e=o((t,e,r=50)=>{let{r:n,g:i,b:a,a:s}=Di.parse(t),{r:l,g:u,b:h,a:f}=Di.parse(e),d=r/100,p=d*2-1,m=s-f,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,v=1-y,x=n*y+l*v,b=i*y+u*v,w=a*y+h*v,S=s*d+f*(1-d);return Ws(x,b,w,S)},"mix"),Az=S2e});var A2e,ot,Lz=R(()=>{"use strict";eu();_z();A2e=o((t,e=100)=>{let r=Di.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Az(r,t,e)},"invert"),ot=A2e});var Dz=R(()=>{"use strict";jC();vz();kz();Ez();Cz();Sz();Lz()});var al=R(()=>{"use strict";Dz()});var lh,ch,j1=R(()=>{"use strict";lh="#ffffff",ch="#f2f2f2"});var yi,up=R(()=>{"use strict";al();yi=o((t,e)=>e?Oe(t,{s:-40,l:10}):Oe(t,{s:-40,l:-10}),"mkBorder")});var QC,Nz,Mz=R(()=>{"use strict";al();j1();up();QC=class{static{o(this,"Theme")}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||Oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||yi(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||yi(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||yi(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||yi(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||ot(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||ot(this.tertiaryColor),this.lineColor=this.lineColor||ot(this.background),this.arrowheadColor=this.arrowheadColor||ot(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?Dt(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||Dt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||ot(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||Et(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Dt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=Dt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||ot(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||Et(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||Dt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||Oe(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||Oe(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Oe(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Oe(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Oe(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Oe(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Oe(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Oe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Oe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Oe(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Oe(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Oe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Oe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Oe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Oe(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Oe(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Oe(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Oe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Oe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Oe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Oe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Oe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Oe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Wa(this.quadrant1Fill)?Et(this.quadrant1Fill):Dt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Dt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Oe(this.primaryColor,{h:-30}),this.git4=this.git4||Oe(this.primaryColor,{h:-60}),this.git5=this.git5||Oe(this.primaryColor,{h:-90}),this.git6=this.git6||Oe(this.primaryColor,{h:60}),this.git7=this.git7||Oe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Et(this.git0,25),this.git1=Et(this.git1,25),this.git2=Et(this.git2,25),this.git3=Et(this.git3,25),this.git4=Et(this.git4,25),this.git5=Et(this.git5,25),this.git6=Et(this.git6,25),this.git7=Et(this.git7,25)):(this.git0=Dt(this.git0,25),this.git1=Dt(this.git1,25),this.git2=Dt(this.git2,25),this.git3=Dt(this.git3,25),this.git4=Dt(this.git4,25),this.git5=Dt(this.git5,25),this.git6=Dt(this.git6,25),this.git7=Dt(this.git7,25)),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ch}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},Nz=o(t=>{let e=new QC;return e.calculate(t),e},"getThemeVariables")});var ZC,Iz,Oz=R(()=>{"use strict";al();up();ZC=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Et(this.primaryColor,16),this.tertiaryColor=Oe(this.primaryColor,{h:-160}),this.primaryBorderColor=ot(this.background),this.secondaryBorderColor=yi(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=yi(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.tertiaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Et(ot("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ws(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=Dt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Dt(this.sectionBkgColor,10),this.taskBorderColor=Ws(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ws(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Et(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=Et(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=Et(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Oe(this.primaryColor,{h:64}),this.fillType3=Oe(this.secondaryColor,{h:64}),this.fillType4=Oe(this.primaryColor,{h:-64}),this.fillType5=Oe(this.secondaryColor,{h:-64}),this.fillType6=Oe(this.primaryColor,{h:128}),this.fillType7=Oe(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||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ot(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||Et(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Oe(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Oe(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Oe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Oe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Oe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Oe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Oe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Oe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Wa(this.quadrant1Fill)?Et(this.quadrant1Fill):Dt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Dt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Et(this.secondaryColor,20),this.git1=Et(this.pie2||this.secondaryColor,20),this.git2=Et(this.pie3||this.tertiaryColor,20),this.git3=Et(this.pie4||Oe(this.primaryColor,{h:-30}),20),this.git4=Et(this.pie5||Oe(this.primaryColor,{h:-60}),20),this.git5=Et(this.pie6||Oe(this.primaryColor,{h:-90}),10),this.git6=Et(this.pie7||Oe(this.primaryColor,{h:60}),10),this.git7=Et(this.pie8||Oe(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ot(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ot(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Et(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Et(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},Iz=o(t=>{let e=new ZC;return e.calculate(t),e},"getThemeVariables")});var JC,hp,jb=R(()=>{"use strict";al();up();j1();JC=class{static{o(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Oe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Oe(this.primaryColor,{h:-160}),this.primaryBorderColor=yi(this.primaryColor,this.darkMode),this.secondaryBorderColor=yi(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=yi(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.tertiaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Ws(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Dt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Dt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Dt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Dt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Oe(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Oe(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Oe(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||ot(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||ot(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Et(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Oe(this.primaryColor,{h:64}),this.fillType3=Oe(this.secondaryColor,{h:64}),this.fillType4=Oe(this.primaryColor,{h:-64}),this.fillType5=Oe(this.secondaryColor,{h:-64}),this.fillType6=Oe(this.primaryColor,{h:128}),this.fillType7=Oe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Oe(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Oe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Oe(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Oe(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Oe(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Oe(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Oe(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Oe(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Oe(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Oe(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Oe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Oe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Oe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Oe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Oe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Oe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Wa(this.quadrant1Fill)?Et(this.quadrant1Fill):Dt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Oe(this.primaryColor,{h:-30}),this.git4=this.git4||Oe(this.primaryColor,{h:-60}),this.git5=this.git5||Oe(this.primaryColor,{h:-90}),this.git6=this.git6||Oe(this.primaryColor,{h:60}),this.git7=this.git7||Oe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Et(this.git0,25),this.git1=Et(this.git1,25),this.git2=Et(this.git2,25),this.git3=Et(this.git3,25),this.git4=Et(this.git4,25),this.git5=Et(this.git5,25),this.git6=Et(this.git6,25),this.git7=Et(this.git7,25)):(this.git0=Dt(this.git0,25),this.git1=Dt(this.git1,25),this.git2=Dt(this.git2,25),this.git3=Dt(this.git3,25),this.git4=Dt(this.git4,25),this.git5=Dt(this.git5,25),this.git6=Dt(this.git6,25),this.git7=Dt(this.git7,25)),this.gitInv0=this.gitInv0||Dt(ot(this.git0),25),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ot(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ot(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ch}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},hp=o(t=>{let e=new JC;return e.calculate(t),e},"getThemeVariables")});var e7,Pz,Bz=R(()=>{"use strict";al();j1();up();e7=class{static{o(this,"Theme")}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=Et("#cde498",10),this.primaryBorderColor=yi(this.primaryColor,this.darkMode),this.secondaryBorderColor=yi(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=yi(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.primaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Dt(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||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Dt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Dt(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=Dt(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||Dt(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Oe(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Oe(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Oe(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Oe(this.primaryColor,{h:64}),this.fillType3=Oe(this.secondaryColor,{h:64}),this.fillType4=Oe(this.primaryColor,{h:-64}),this.fillType5=Oe(this.secondaryColor,{h:-64}),this.fillType6=Oe(this.primaryColor,{h:128}),this.fillType7=Oe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Oe(this.primaryColor,{l:-30}),this.pie5=this.pie5||Oe(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Oe(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Oe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Oe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Oe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Oe(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Oe(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Oe(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Oe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Oe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Oe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Oe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Oe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Oe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Wa(this.quadrant1Fill)?Et(this.quadrant1Fill):Dt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Oe(this.primaryColor,{h:-30}),this.git4=this.git4||Oe(this.primaryColor,{h:-60}),this.git5=this.git5||Oe(this.primaryColor,{h:-90}),this.git6=this.git6||Oe(this.primaryColor,{h:60}),this.git7=this.git7||Oe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Et(this.git0,25),this.git1=Et(this.git1,25),this.git2=Et(this.git2,25),this.git3=Et(this.git3,25),this.git4=Et(this.git4,25),this.git5=Et(this.git5,25),this.git6=Et(this.git6,25),this.git7=Et(this.git7,25)):(this.git0=Dt(this.git0,25),this.git1=Dt(this.git1,25),this.git2=Dt(this.git2,25),this.git3=Dt(this.git3,25),this.git4=Dt(this.git4,25),this.git5=Dt(this.git5,25),this.git6=Dt(this.git6,25),this.git7=Dt(this.git7,25)),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||ot(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||ot(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ch}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},Pz=o(t=>{let e=new e7;return e.calculate(t),e},"getThemeVariables")});var t7,Fz,zz=R(()=>{"use strict";al();up();j1();t7=class{static{o(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Et(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Oe(this.primaryColor,{h:-160}),this.primaryBorderColor=yi(this.primaryColor,this.darkMode),this.secondaryBorderColor=yi(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=yi(this.tertiaryColor,this.darkMode),this.primaryTextColor=ot(this.primaryColor),this.secondaryTextColor=ot(this.secondaryColor),this.tertiaryTextColor=ot(this.tertiaryColor),this.lineColor=ot(this.background),this.textColor=ot(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Et(this.contrast,55),this.border2=this.contrast,this.actorBorder=Et(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.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||ot(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||Et(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||Dt(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||Oe(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||Oe(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Et(this.contrast,30),this.sectionBkgColor2=Et(this.contrast,30),this.taskBorderColor=Dt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Et(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Dt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Oe(this.primaryColor,{h:64}),this.fillType3=Oe(this.secondaryColor,{h:64}),this.fillType4=Oe(this.primaryColor,{h:-64}),this.fillType5=Oe(this.secondaryColor,{h:-64}),this.fillType6=Oe(this.primaryColor,{h:128}),this.fillType7=Oe(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Oe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Oe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Oe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Oe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Oe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Oe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Wa(this.quadrant1Fill)?Et(this.quadrant1Fill):Dt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Dt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Oe(this.primaryColor,{h:-30}),this.git4=this.pie5||Oe(this.primaryColor,{h:-60}),this.git5=this.pie6||Oe(this.primaryColor,{h:-90}),this.git6=this.pie7||Oe(this.primaryColor,{h:60}),this.git7=this.pie8||Oe(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||ot(this.git0),this.gitInv1=this.gitInv1||ot(this.git1),this.gitInv2=this.gitInv2||ot(this.git2),this.gitInv3=this.gitInv3||ot(this.git3),this.gitInv4=this.gitInv4||ot(this.git4),this.gitInv5=this.gitInv5||ot(this.git5),this.gitInv6=this.gitInv6||ot(this.git6),this.gitInv7=this.gitInv7||ot(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||lh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ch}calculate(e){if(typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},Fz=o(t=>{let e=new t7;return e.calculate(t),e},"getThemeVariables")});var Co,Kb=R(()=>{"use strict";Mz();Oz();jb();Bz();zz();Co={base:{getThemeVariables:Nz},dark:{getThemeVariables:Iz},default:{getThemeVariables:hp},forest:{getThemeVariables:Pz},neutral:{getThemeVariables:Fz}}});var tu,Gz=R(()=>{"use strict";tu={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}});var $z,Vz,Uz,mr,sl=R(()=>{"use strict";Kb();Gz();$z={...tu,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:Co.default.getThemeVariables(),sequence:{...tu.sequence,messageFont:o(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:o(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:o(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...tu.gantt,tickInterval:void 0,useWidth:void 0},c4:{...tu.c4,useWidth:void 0,personFont:o(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:o(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:o(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:o(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:o(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:o(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:o(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:o(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:o(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:o(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:o(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:o(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:o(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:o(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:o(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:o(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:o(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:o(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:o(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:o(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:o(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:o(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...tu.pie,useWidth:984},xyChart:{...tu.xyChart,useWidth:void 0},requirement:{...tu.requirement,useWidth:void 0},packet:{...tu.packet}},Vz=o((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...Vz(t[n],"")]:[...r,e+n],[]),"keyify"),Uz=new Set(Vz($z,"")),mr=$z});var fp,_2e,r7=R(()=>{"use strict";sl();ut();fp=o(t=>{if(V.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>fp(e));return}for(let e of Object.keys(t)){if(V.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Uz.has(e)||t[e]==null){V.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){V.debug("sanitizing object",e),fp(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(V.debug("sanitizing css option",e),t[e]=_2e(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]="")}V.debug("After sanitization",t)}},"sanitizeDirective"),_2e=o(t=>{let e=0,r=0;for(let n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss")});var uh,fs,Yz,dp,K1,Qb,n7,Wz,qz,i7,Zb,Or,Xz,jz,Q1,L2e,Hz,D2e,Kz,qs=R(()=>{"use strict";cp();ut();Kb();sl();r7();uh=Object.freeze(mr),fs=On({},uh),dp=[],K1=On({},uh),Qb=o((t,e)=>{let r=On({},t),n={};for(let i of e)Xz(i),n=On(n,i);if(r=On(r,n),n.theme&&n.theme in Co){let i=On({},Yz),a=On(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Co&&(r.themeVariables=Co[r.theme].getThemeVariables(a))}return K1=r,Kz(K1),K1},"updateCurrentConfig"),n7=o(t=>(fs=On({},uh),fs=On(fs,t),t.theme&&Co[t.theme]&&(fs.themeVariables=Co[t.theme].getThemeVariables(t.themeVariables)),Qb(fs,dp),fs),"setSiteConfig"),Wz=o(t=>{Yz=On({},t)},"saveConfigFromInitialize"),qz=o(t=>(fs=On(fs,t),Qb(fs,dp),fs),"updateSiteConfig"),i7=o(()=>On({},fs),"getSiteConfig"),Zb=o(t=>(Kz(t),On(K1,t),Or()),"setConfig"),Or=o(()=>On({},K1),"getConfig"),Xz=o(t=>{t&&(["secure",...fs.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(V.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"&&Xz(t[e])}))},"sanitize"),jz=o(t=>{fp(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),dp.push(t),Qb(fs,dp)},"addDirective"),Q1=o((t=fs)=>{dp=[],Qb(t,dp)},"reset"),L2e={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Hz={},D2e=o(t=>{Hz[t]||(V.warn(L2e[t]),Hz[t]=!0)},"issueWarning"),Kz=o(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&D2e("LAZY_LOAD_DEPRECATED")},"checkConfig")});var o7=gi((a7,s7)=>{"use strict";(function(t,e){typeof a7=="object"&&typeof s7<"u"?s7.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.DOMPurify=e())})(a7,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:n,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:s,create:l}=Object,{apply:u,construct:h}=typeof Reflect<"u"&&Reflect;a||(a=o(function(Se){return Se},"freeze")),s||(s=o(function(Se){return Se},"seal")),u||(u=o(function(Se,Ue,Pe){return Se.apply(Ue,Pe)},"apply")),h||(h=o(function(Se,Ue){return new Se(...Ue)},"construct"));let f=E(Array.prototype.forEach),d=E(Array.prototype.pop),p=E(Array.prototype.push),m=E(String.prototype.toLowerCase),g=E(String.prototype.toString),y=E(String.prototype.match),v=E(String.prototype.replace),x=E(String.prototype.indexOf),b=E(String.prototype.trim),w=E(Object.prototype.hasOwnProperty),S=E(RegExp.prototype.test),T=_(TypeError);function E(Ie){return function(Se){for(var Ue=arguments.length,Pe=new Array(Ue>1?Ue-1:0),_e=1;_e<Ue;_e++)Pe[_e-1]=arguments[_e];return u(Ie,Se,Pe)}}o(E,"unapply");function _(Ie){return function(){for(var Se=arguments.length,Ue=new Array(Se),Pe=0;Pe<Se;Pe++)Ue[Pe]=arguments[Pe];return h(Ie,Ue)}}o(_,"unconstruct");function A(Ie,Se){let Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Ie,null);let Pe=Se.length;for(;Pe--;){let _e=Se[Pe];if(typeof _e=="string"){let me=Ue(_e);me!==_e&&(r(Se)||(Se[Pe]=me),_e=me)}Ie[_e]=!0}return Ie}o(A,"addToSet");function L(Ie){for(let Se=0;Se<Ie.length;Se++)w(Ie,Se)||(Ie[Se]=null);return Ie}o(L,"cleanArray");function M(Ie){let Se=l(null);for(let[Ue,Pe]of t(Ie))w(Ie,Ue)&&(Array.isArray(Pe)?Se[Ue]=L(Pe):Pe&&typeof Pe=="object"&&Pe.constructor===Object?Se[Ue]=M(Pe):Se[Ue]=Pe);return Se}o(M,"clone");function N(Ie,Se){for(;Ie!==null;){let Pe=i(Ie,Se);if(Pe){if(Pe.get)return E(Pe.get);if(typeof Pe.value=="function")return E(Pe.value)}Ie=n(Ie)}function Ue(){return null}return o(Ue,"fallbackValue"),Ue}o(N,"lookupGetter");let k=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),I=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),P=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=a(["#text"]),B=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Y=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),X=s(/<%[\w\W]*|[\w\W]*%>/gm),ie=s(/\${[\w\W]*}/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]/),J=s(/^aria-[\-\w]+$/),Z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),q=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=s(/^html$/i),se=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var ce=Object.freeze({__proto__:null,MUSTACHE_EXPR:Q,ERB_EXPR:X,TMPLIT_EXPR:ie,DATA_ATTR:j,ARIA_ATTR:J,IS_ALLOWED_URI:Z,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:q,DOCTYPE_NAME:K,CUSTOM_ELEMENT:se});let ue={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},te=o(function(){return typeof window>"u"?null:window},"getGlobal"),De=o(function(Se,Ue){if(typeof Se!="object"||typeof Se.createPolicy!="function")return null;let Pe=null,_e="data-tt-policy-suffix";Ue&&Ue.hasAttribute(_e)&&(Pe=Ue.getAttribute(_e));let me="dompurify"+(Pe?"#"+Pe:"");try{return Se.createPolicy(me,{createHTML(W){return W},createScriptURL(W){return W}})}catch{return console.warn("TrustedTypes policy "+me+" could not be created."),null}},"_createTrustedTypesPolicy");function oe(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:te(),Se=o(Ft=>oe(Ft),"DOMPurify");if(Se.version="3.1.6",Se.removed=[],!Ie||!Ie.document||Ie.document.nodeType!==ue.document)return Se.isSupported=!1,Se;let{document:Ue}=Ie,Pe=Ue,_e=Pe.currentScript,{DocumentFragment:me,HTMLTemplateElement:W,Node:fe,Element:ge,NodeFilter:re,NamedNodeMap:he=Ie.NamedNodeMap||Ie.MozNamedAttrMap,HTMLFormElement:ne,DOMParser:ae,trustedTypes:we}=Ie,Te=ge.prototype,Ce=N(Te,"cloneNode"),Ae=N(Te,"remove"),Ge=N(Te,"nextSibling"),Me=N(Te,"childNodes"),ye=N(Te,"parentNode");if(typeof W=="function"){let Ft=Ue.createElement("template");Ft.content&&Ft.content.ownerDocument&&(Ue=Ft.content.ownerDocument)}let He,ze="",{implementation:Ze,createNodeIterator:gt,createDocumentFragment:yt,getElementsByTagName:tt}=Ue,{importNode:Ye}=Pe,Je={};Se.isSupported=typeof t=="function"&&typeof ye=="function"&&Ze&&Ze.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ve,ERB_EXPR:je,TMPLIT_EXPR:kt,DATA_ATTR:at,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:it,ATTR_WHITESPACE:dt,CUSTOM_ELEMENT:lt}=ce,{IS_ALLOWED_URI:It}=ce,mt=null,St=A({},[...k,...I,...C,...D,...F]),gr=null,xn=A({},[...B,...$,...z,...Y]),jt=Object.seal(l(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}})),rn=null,Er=null,Kn=!0,hn=!0,Qn=!1,on=!0,Rn=!1,Ha=!0,_a=!1,To=!1,qi=!1,ht=!1,At=!1,$t=!1,rt=!0,Ot=!1,pe="user-content-",ur=!0,be=!1,Ir={},Xc=null,M1=A({},["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"]),_b=null,I1=A({},["audio","video","img","source","image","track"]),O1=null,ci=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ko="http://www.w3.org/1998/Math/MathML",ih="http://www.w3.org/2000/svg",Us="http://www.w3.org/1999/xhtml",ah=Us,Lb=!1,P1=null,sa=A({},[ko,ih,Us],g),jc=null,Kc=["application/xhtml+xml","text/html"],us="text/html",_i=null,Wl=null,sh=Ue.createElement("form"),zf=o(function(Re){return Re instanceof RegExp||Re instanceof Function},"isRegexOrFunction"),Hs=o(function(){let Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Wl&&Wl===Re)){if((!Re||typeof Re!="object")&&(Re={}),Re=M(Re),jc=Kc.indexOf(Re.PARSER_MEDIA_TYPE)===-1?us:Re.PARSER_MEDIA_TYPE,_i=jc==="application/xhtml+xml"?g:m,mt=w(Re,"ALLOWED_TAGS")?A({},Re.ALLOWED_TAGS,_i):St,gr=w(Re,"ALLOWED_ATTR")?A({},Re.ALLOWED_ATTR,_i):xn,P1=w(Re,"ALLOWED_NAMESPACES")?A({},Re.ALLOWED_NAMESPACES,g):sa,O1=w(Re,"ADD_URI_SAFE_ATTR")?A(M(ci),Re.ADD_URI_SAFE_ATTR,_i):ci,_b=w(Re,"ADD_DATA_URI_TAGS")?A(M(I1),Re.ADD_DATA_URI_TAGS,_i):I1,Xc=w(Re,"FORBID_CONTENTS")?A({},Re.FORBID_CONTENTS,_i):M1,rn=w(Re,"FORBID_TAGS")?A({},Re.FORBID_TAGS,_i):{},Er=w(Re,"FORBID_ATTR")?A({},Re.FORBID_ATTR,_i):{},Ir=w(Re,"USE_PROFILES")?Re.USE_PROFILES:!1,Kn=Re.ALLOW_ARIA_ATTR!==!1,hn=Re.ALLOW_DATA_ATTR!==!1,Qn=Re.ALLOW_UNKNOWN_PROTOCOLS||!1,on=Re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rn=Re.SAFE_FOR_TEMPLATES||!1,Ha=Re.SAFE_FOR_XML!==!1,_a=Re.WHOLE_DOCUMENT||!1,ht=Re.RETURN_DOM||!1,At=Re.RETURN_DOM_FRAGMENT||!1,$t=Re.RETURN_TRUSTED_TYPE||!1,qi=Re.FORCE_BODY||!1,rt=Re.SANITIZE_DOM!==!1,Ot=Re.SANITIZE_NAMED_PROPS||!1,ur=Re.KEEP_CONTENT!==!1,be=Re.IN_PLACE||!1,It=Re.ALLOWED_URI_REGEXP||Z,ah=Re.NAMESPACE||Us,jt=Re.CUSTOM_ELEMENT_HANDLING||{},Re.CUSTOM_ELEMENT_HANDLING&&zf(Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(jt.tagNameCheck=Re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&zf(Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(jt.attributeNameCheck=Re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Re.CUSTOM_ELEMENT_HANDLING&&typeof Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(jt.allowCustomizedBuiltInElements=Re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Rn&&(hn=!1),At&&(ht=!0),Ir&&(mt=A({},F),gr=[],Ir.html===!0&&(A(mt,k),A(gr,B)),Ir.svg===!0&&(A(mt,I),A(gr,$),A(gr,Y)),Ir.svgFilters===!0&&(A(mt,C),A(gr,$),A(gr,Y)),Ir.mathMl===!0&&(A(mt,D),A(gr,z),A(gr,Y))),Re.ADD_TAGS&&(mt===St&&(mt=M(mt)),A(mt,Re.ADD_TAGS,_i)),Re.ADD_ATTR&&(gr===xn&&(gr=M(gr)),A(gr,Re.ADD_ATTR,_i)),Re.ADD_URI_SAFE_ATTR&&A(O1,Re.ADD_URI_SAFE_ATTR,_i),Re.FORBID_CONTENTS&&(Xc===M1&&(Xc=M(Xc)),A(Xc,Re.FORBID_CONTENTS,_i)),ur&&(mt["#text"]=!0),_a&&A(mt,["html","head","body"]),mt.table&&(A(mt,["tbody"]),delete rn.tbody),Re.TRUSTED_TYPES_POLICY){if(typeof Re.TRUSTED_TYPES_POLICY.createHTML!="function")throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');He=Re.TRUSTED_TYPES_POLICY,ze=He.createHTML("")}else He===void 0&&(He=De(we,_e)),He!==null&&typeof ze=="string"&&(ze=He.createHTML(""));a&&a(Re),Wl=Re}},"_parseConfig"),B1=A({},["mi","mo","mn","ms","mtext"]),Gf=A({},["foreignobject","annotation-xml"]),F1=A({},["title","style","font","a","script"]),La=A({},[...I,...C,...O]),vF=A({},[...D,...P]),Ive=o(function(Re){let st=ye(Re);(!st||!st.tagName)&&(st={namespaceURI:ah,tagName:"template"});let Rt=m(Re.tagName),bn=m(st.tagName);return P1[Re.namespaceURI]?Re.namespaceURI===ih?st.namespaceURI===Us?Rt==="svg":st.namespaceURI===ko?Rt==="svg"&&(bn==="annotation-xml"||B1[bn]):!!La[Rt]:Re.namespaceURI===ko?st.namespaceURI===Us?Rt==="math":st.namespaceURI===ih?Rt==="math"&&Gf[bn]:!!vF[Rt]:Re.namespaceURI===Us?st.namespaceURI===ih&&!Gf[bn]||st.namespaceURI===ko&&!B1[bn]?!1:!vF[Rt]&&(F1[Rt]||!La[Rt]):!!(jc==="application/xhtml+xml"&&P1[Re.namespaceURI]):!1},"_checkValidNamespace"),ql=o(function(Re){p(Se.removed,{element:Re});try{ye(Re).removeChild(Re)}catch{Ae(Re)}},"_forceRemove"),Db=o(function(Re,st){try{p(Se.removed,{attribute:st.getAttributeNode(Re),from:st})}catch{p(Se.removed,{attribute:null,from:st})}if(st.removeAttribute(Re),Re==="is"&&!gr[Re])if(ht||At)try{ql(st)}catch{}else try{st.setAttribute(Re,"")}catch{}},"_removeAttribute"),xF=o(function(Re){let st=null,Rt=null;if(qi)Re="<remove></remove>"+Re;else{let oa=y(Re,/^[\r\n\t ]+/);Rt=oa&&oa[0]}jc==="application/xhtml+xml"&&ah===Us&&(Re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Re+"</body></html>");let bn=He?He.createHTML(Re):Re;if(ah===Us)try{st=new ae().parseFromString(bn,jc)}catch{}if(!st||!st.documentElement){st=Ze.createDocument(ah,"template",null);try{st.documentElement.innerHTML=Lb?ze:bn}catch{}}let Da=st.body||st.documentElement;return Re&&Rt&&Da.insertBefore(Ue.createTextNode(Rt),Da.childNodes[0]||null),ah===Us?tt.call(st,_a?"html":"body")[0]:_a?st.documentElement:Da},"_initDocument"),bF=o(function(Re){return gt.call(Re.ownerDocument||Re,Re,re.SHOW_ELEMENT|re.SHOW_COMMENT|re.SHOW_TEXT|re.SHOW_PROCESSING_INSTRUCTION|re.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),wF=o(function(Re){return Re instanceof ne&&(typeof Re.nodeName!="string"||typeof Re.textContent!="string"||typeof Re.removeChild!="function"||!(Re.attributes instanceof he)||typeof Re.removeAttribute!="function"||typeof Re.setAttribute!="function"||typeof Re.namespaceURI!="string"||typeof Re.insertBefore!="function"||typeof Re.hasChildNodes!="function")},"_isClobbered"),TF=o(function(Re){return typeof fe=="function"&&Re instanceof fe},"_isNode"),Qc=o(function(Re,st,Rt){Je[Re]&&f(Je[Re],bn=>{bn.call(Se,st,Rt,Wl)})},"_executeHook"),kF=o(function(Re){let st=null;if(Qc("beforeSanitizeElements",Re,null),wF(Re))return ql(Re),!0;let Rt=_i(Re.nodeName);if(Qc("uponSanitizeElement",Re,{tagName:Rt,allowedTags:mt}),Re.hasChildNodes()&&!TF(Re.firstElementChild)&&S(/<[/\w]/g,Re.innerHTML)&&S(/<[/\w]/g,Re.textContent)||Re.nodeType===ue.progressingInstruction||Ha&&Re.nodeType===ue.comment&&S(/<[/\w]/g,Re.data))return ql(Re),!0;if(!mt[Rt]||rn[Rt]){if(!rn[Rt]&&CF(Rt)&&(jt.tagNameCheck instanceof RegExp&&S(jt.tagNameCheck,Rt)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Rt)))return!1;if(ur&&!Xc[Rt]){let bn=ye(Re)||Re.parentNode,Da=Me(Re)||Re.childNodes;if(Da&&bn){let oa=Da.length;for(let hs=oa-1;hs>=0;--hs){let Xl=Ce(Da[hs],!0);Xl.__removalCount=(Re.__removalCount||0)+1,bn.insertBefore(Xl,Ge(Re))}}}return ql(Re),!0}return Re instanceof ge&&!Ive(Re)||(Rt==="noscript"||Rt==="noembed"||Rt==="noframes")&&S(/<\/no(script|embed|frames)/i,Re.innerHTML)?(ql(Re),!0):(Rn&&Re.nodeType===ue.text&&(st=Re.textContent,f([Ve,je,kt],bn=>{st=v(st,bn," ")}),Re.textContent!==st&&(p(Se.removed,{element:Re.cloneNode()}),Re.textContent=st)),Qc("afterSanitizeElements",Re,null),!1)},"_sanitizeElements"),EF=o(function(Re,st,Rt){if(rt&&(st==="id"||st==="name")&&(Rt in Ue||Rt in sh))return!1;if(!(hn&&!Er[st]&&S(at,st))){if(!(Kn&&S(xt,st))){if(!gr[st]||Er[st]){if(!(CF(Re)&&(jt.tagNameCheck instanceof RegExp&&S(jt.tagNameCheck,Re)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Re))&&(jt.attributeNameCheck instanceof RegExp&&S(jt.attributeNameCheck,st)||jt.attributeNameCheck instanceof Function&&jt.attributeNameCheck(st))||st==="is"&&jt.allowCustomizedBuiltInElements&&(jt.tagNameCheck instanceof RegExp&&S(jt.tagNameCheck,Rt)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Rt))))return!1}else if(!O1[st]){if(!S(It,v(Rt,dt,""))){if(!((st==="src"||st==="xlink:href"||st==="href")&&Re!=="script"&&x(Rt,"data:")===0&&_b[Re])){if(!(Qn&&!S(it,v(Rt,dt,"")))){if(Rt)return!1}}}}}}return!0},"_isValidAttribute"),CF=o(function(Re){return Re!=="annotation-xml"&&y(Re,lt)},"_isBasicCustomElement"),SF=o(function(Re){Qc("beforeSanitizeAttributes",Re,null);let{attributes:st}=Re;if(!st)return;let Rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:gr},bn=st.length;for(;bn--;){let Da=st[bn],{name:oa,namespaceURI:hs,value:Xl}=Da,z1=_i(oa),Ya=oa==="value"?Xl:b(Xl);if(Rt.attrName=z1,Rt.attrValue=Ya,Rt.keepAttr=!0,Rt.forceKeepAttr=void 0,Qc("uponSanitizeAttribute",Re,Rt),Ya=Rt.attrValue,Ha&&S(/((--!?|])>)|<\/(style|title)/i,Ya)){Db(oa,Re);continue}if(Rt.forceKeepAttr||(Db(oa,Re),!Rt.keepAttr))continue;if(!on&&S(/\/>/i,Ya)){Db(oa,Re);continue}Rn&&f([Ve,je,kt],_F=>{Ya=v(Ya,_F," ")});let AF=_i(Re.nodeName);if(EF(AF,z1,Ya)){if(Ot&&(z1==="id"||z1==="name")&&(Db(oa,Re),Ya=pe+Ya),He&&typeof we=="object"&&typeof we.getAttributeType=="function"&&!hs)switch(we.getAttributeType(AF,z1)){case"TrustedHTML":{Ya=He.createHTML(Ya);break}case"TrustedScriptURL":{Ya=He.createScriptURL(Ya);break}}try{hs?Re.setAttributeNS(hs,oa,Ya):Re.setAttribute(oa,Ya),wF(Re)?ql(Re):d(Se.removed)}catch{}}}Qc("afterSanitizeAttributes",Re,null)},"_sanitizeAttributes"),Ove=o(function Ft(Re){let st=null,Rt=bF(Re);for(Qc("beforeSanitizeShadowDOM",Re,null);st=Rt.nextNode();)Qc("uponSanitizeShadowNode",st,null),!kF(st)&&(st.content instanceof me&&Ft(st.content),SF(st));Qc("afterSanitizeShadowDOM",Re,null)},"_sanitizeShadowDOM");return Se.sanitize=function(Ft){let Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},st=null,Rt=null,bn=null,Da=null;if(Lb=!Ft,Lb&&(Ft="<!-->"),typeof Ft!="string"&&!TF(Ft))if(typeof Ft.toString=="function"){if(Ft=Ft.toString(),typeof Ft!="string")throw T("dirty is not a string, aborting")}else throw T("toString is not a function");if(!Se.isSupported)return Ft;if(To||Hs(Re),Se.removed=[],typeof Ft=="string"&&(be=!1),be){if(Ft.nodeName){let Xl=_i(Ft.nodeName);if(!mt[Xl]||rn[Xl])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(Ft instanceof fe)st=xF("<!---->"),Rt=st.ownerDocument.importNode(Ft,!0),Rt.nodeType===ue.element&&Rt.nodeName==="BODY"||Rt.nodeName==="HTML"?st=Rt:st.appendChild(Rt);else{if(!ht&&!Rn&&!_a&&Ft.indexOf("<")===-1)return He&&$t?He.createHTML(Ft):Ft;if(st=xF(Ft),!st)return ht?null:$t?ze:""}st&&qi&&ql(st.firstChild);let oa=bF(be?Ft:st);for(;bn=oa.nextNode();)kF(bn)||(bn.content instanceof me&&Ove(bn.content),SF(bn));if(be)return Ft;if(ht){if(At)for(Da=yt.call(st.ownerDocument);st.firstChild;)Da.appendChild(st.firstChild);else Da=st;return(gr.shadowroot||gr.shadowrootmode)&&(Da=Ye.call(Pe,Da,!0)),Da}let hs=_a?st.outerHTML:st.innerHTML;return _a&&mt["!doctype"]&&st.ownerDocument&&st.ownerDocument.doctype&&st.ownerDocument.doctype.name&&S(K,st.ownerDocument.doctype.name)&&(hs="<!DOCTYPE "+st.ownerDocument.doctype.name+`>
64 219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},"sqrtTall"),rxe=o(function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=j2e(r,mp);break;case"sqrtSize1":i=K2e(r,mp);break;case"sqrtSize2":i=Q2e(r,mp);break;case"sqrtSize3":i=Z2e(r,mp);break;case"sqrtSize4":i=J2e(r,mp);break;case"sqrtTall":i=txe(r,mp,n)}return i},"sqrtPath"),nxe=o(function(e,r){switch(e){case"\u239C":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"\u2223":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"\u2225":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"\u239F":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"\u23A2":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"\u23A5":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"\u23AA":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"\u23D0":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"\u2016":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},"innerPath"),Qz={doubleleftarrow:`M262 157
268 `+_+" children.");for(var N=0;N<_;N++){var k=new Jl(w[N]),I=new ll([k],{width:"400em",height:ct(E),viewBox:"0 0 "+l+" "+T,preserveAspectRatio:L[N]+" slice"}),C=Be.makeSvgSpan([A[N]],[I],r);if(_===1)return{span:C,minWidth:S,height:E};C.style.height=ct(E),x.push(C)}return{span:Be.makeSpan(["stretchy"],x,r),minWidth:S,height:E}}}o(n,"buildSvgSpan_");var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=ct(s),a>0&&(i.style.minWidth=ct(a)),i},"svgSpan"),Gxe=o(function(e,r,n,i,a){var s,l=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=Be.makeSpan(["stretchy",r],[],a),r==="fbox"){var u=a.color&&a.getColor();u&&(s.style.borderColor=u)}}else{var h=[];/^[bx]cancel$/.test(r)&&h.push(new ay({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&h.push(new ay({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new ll(h,{width:"100%",height:ct(l)});s=Be.makeSvgSpan([],[f],a)}return s.height=l,s.style.height=ct(l),s},"encloseSpan"),ou={encloseSpan:Gxe,mathMLnode:Pxe,svgSpan:zxe};o(ir,"assertNodeType");o(B7,"assertSymbolNodeType");o(T4,"checkSymbolNodeType");F7=o((t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=ir(t.base,"accent"),r=n.base,t.base=r,i=uxe(Cr(t,e)),t.base=n):(n=ir(t,"accent"),r=n.base);var a=Cr(r,e.havingCrampedStyle()),s=n.isShifty&&Vt.isCharacterBox(r),l=0;if(s){var u=Vt.getBaseElem(r),h=Cr(u,e.havingCrampedStyle());l=tG(h).skew}var f=n.label==="\\c",d=f?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=ou.svgSpan(n,e),p=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+ct(2*l)+")",marginLeft:ct(2*l)}:void 0}]},e);else{var m,g;n.label==="\\vec"?(m=Be.staticSvg("vec",e),g=Be.svgData.vec[1]):(m=Be.makeOrd({mode:n.mode,text:n.label},e,"textord"),m=tG(m),m.italic=0,g=m.width,f&&(d+=m.depth)),p=Be.makeSpan(["accent-body"],[m]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),d=a.height);var v=l;y||(v-=g/2),p.style.left=ct(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:p}]},e)}var x=Be.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x},"htmlBuilder$a"),HG=o((t,e)=>{var r=t.isStretchy?ou.mathMLnode(t.label):new et.MathNode("mo",[_o(t.label,t.mode)]),n=new et.MathNode("mover",[fn(t.base,e),r]);return n.setAttribute("accent","true"),n},"mathmlBuilder$9"),$xe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));vt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:o((t,e)=>{var r=y4(e[0]),n=!$xe.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},"handler"),htmlBuilder:F7,mathmlBuilder:HG});vt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:o((t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},"handler"),htmlBuilder:F7,mathmlBuilder:HG});vt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},"handler"),htmlBuilder:o((t,e)=>{var r=Cr(t.base,e),n=ou.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=Be.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return Be.makeSpan(["mord","accentunder"],[a],e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=ou.mathMLnode(t.label),n=new et.MathNode("munder",[fn(t.base,e),r]);return n.setAttribute("accentunder","true"),n},"mathmlBuilder")});o4=o(t=>{var e=new et.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e},"paddedNode");vt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=Be.wrapFragment(Cr(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=Be.wrapFragment(Cr(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var l=ou.svgSpan(t,e),u=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(h-=i.depth);var f;if(s){var d=-e.fontMetrics().axisHeight+s.height+.5*l.height+.111;f=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u},{type:"elem",elem:s,shift:d}]},e)}else f=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u}]},e);return f.children[0].children[0].children[1].classes.push("svg-align"),Be.makeSpan(["mrel","x-arrow"],[f],e)},mathmlBuilder(t,e){var r=ou.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=o4(fn(t.body,e));if(t.below){var a=o4(fn(t.below,e));n=new et.MathNode("munderover",[r,a,i])}else n=new et.MathNode("mover",[r,i])}else if(t.below){var s=o4(fn(t.below,e));n=new et.MathNode("munder",[r,s])}else n=o4(),n=new et.MathNode("mover",[r,n]);return n}});Vxe=Be.makeSpan;o(YG,"htmlBuilder$9");o(WG,"mathmlBuilder$8");vt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:ui(i),isCharacterBox:Vt.isCharacterBox(i)}},htmlBuilder:YG,mathmlBuilder:WG});k4=o(t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"},"binrelClass");vt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:k4(e[0]),body:ui(e[1]),isCharacterBox:Vt.isCharacterBox(e[1])}}});vt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\stackrel"?s=k4(i):s="mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:ui(i)},u={type:"supsub",mode:a.mode,base:l,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[u],isCharacterBox:Vt.isCharacterBox(u)}},htmlBuilder:YG,mathmlBuilder:WG});vt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:k4(e[0]),body:ui(e[0])}},htmlBuilder(t,e){var r=Ri(t.body,e,!0),n=Be.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=gs(t.body,e),n=new et.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});Uxe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},oG=o(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),lG=o(t=>t.type==="textord"&&t.text==="@","isStartOfArrow"),Hxe=o((t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e,"isLabelEnd");o(Yxe,"cdArrow");o(Wxe,"parseCD");vt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Be.wrapFragment(Cr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=ct(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new et.MathNode("mrow",[fn(t.label,e)]);return r=new et.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new et.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});vt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=Be.wrapFragment(Cr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new et.MathNode("mrow",[fn(t.fragment,e)])}});vt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=ir(e[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var l=ir(i[s],"textord");a+=l.text}var u=parseInt(a),h;if(isNaN(u))throw new nt("\\@char has non-numeric argument "+a);if(u<0||u>=1114111)throw new nt("\\@char with invalid code point "+a);return u<=65535?h=String.fromCharCode(u):(u-=65536,h=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:h}}});qG=o((t,e)=>{var r=Ri(t.body,e.withColor(t.color),!1);return Be.makeFragment(r)},"htmlBuilder$8"),XG=o((t,e)=>{var r=gs(t.body,e.withColor(t.color)),n=new et.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n},"mathmlBuilder$7");vt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=ir(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:ui(i)}},htmlBuilder:qG,mathmlBuilder:XG});vt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=ir(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:qG,mathmlBuilder:XG});vt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&ir(i,"size").value}},htmlBuilder(t,e){var r=Be.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=ct(Hn(t.size,e)))),r},mathmlBuilder(t,e){var r=new et.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",ct(Hn(t.size,e)))),r}});A7={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jG=o(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new nt("Expected a control sequence",t);return e},"checkControlSequence"),qxe=o(t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},"getRHS"),KG=o((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"letCommand");vt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(A7[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=A7[n.text]),ir(e.parseFunction(),"internal");throw new nt("Invalid token after macro prefix",n)}});vt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new nt("Expected a control sequence",n);for(var a=0,s,l=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),l[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new nt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new nt('Argument number "'+n.text+'" out of order');a++,l.push([])}else{if(n.text==="EOF")throw new nt("Expected a macro definition");l[a].push(n.text)}var{tokens:u}=e.gullet.consumeArg();return s&&u.unshift(s),(r==="\\edef"||r==="\\xdef")&&(u=e.gullet.expandTokens(u),u.reverse()),e.gullet.macros.set(i,{tokens:u,numArgs:a,delimiters:l},r===A7[r]),{type:"internal",mode:e.mode}}});vt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=jG(e.gullet.popToken());e.gullet.consumeSpaces();var i=qxe(e);return KG(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});vt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=jG(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return KG(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});ey=o(function(e,r,n){var i=wn.math[e]&&wn.math[e].replace,a=M7(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},"getMetrics"),z7=o(function(e,r,n,i){var a=n.havingBaseStyle(r),s=Be.makeSpan(i.concat(a.sizingClasses(n)),[e],n),l=a.sizeMultiplier/n.sizeMultiplier;return s.height*=l,s.depth*=l,s.maxFontSize=a.sizeMultiplier,s},"styleWrap"),QG=o(function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ct(a),e.height-=a,e.depth+=a},"centerSpan"),Xxe=o(function(e,r,n,i,a,s){var l=Be.makeSymbol(e,"Main-Regular",a,i),u=z7(l,r,i,s);return n&&QG(u,i,r),u},"makeSmallDelim"),jxe=o(function(e,r,n,i){return Be.makeSymbol(e,"Size"+r+"-Regular",n,i)},"mathrmSize"),ZG=o(function(e,r,n,i,a,s){var l=jxe(e,r,a,i),u=z7(Be.makeSpan(["delimsizing","size"+r],[l],i),Ht.TEXT,i,s);return n&&QG(u,i,Ht.TEXT),u},"makeLargeDelim"),h7=o(function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Be.makeSpan(["delimsizinginner",i],[Be.makeSpan([],[Be.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},"makeGlyphSpan"),f7=o(function(e,r,n){var i=Zl["Size4-Regular"][e.charCodeAt(0)]?Zl["Size4-Regular"][e.charCodeAt(0)][4]:Zl["Size1-Regular"][e.charCodeAt(0)][4],a=new Jl("inner",nxe(e,Math.round(1e3*r))),s=new ll([a],{width:ct(i),height:ct(r),style:"width:"+ct(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=Be.makeSvgSpan([],[s],n);return l.height=r,l.style.height=ct(r),l.style.width=ct(i),{type:"elem",elem:l}},"makeInner"),_7=.008,l4={type:"kern",size:-1*_7},Kxe=["|","\\lvert","\\rvert","\\vert"],Qxe=["\\|","\\lVert","\\rVert","\\Vert"],JG=o(function(e,r,n,i,a,s){var l,u,h,f,d="",p=0;l=h=f=e,u=null;var m="Size1-Regular";e==="\\uparrow"?h=f="\u23D0":e==="\\Uparrow"?h=f="\u2016":e==="\\downarrow"?l=h="\u23D0":e==="\\Downarrow"?l=h="\u2016":e==="\\updownarrow"?(l="\\uparrow",h="\u23D0",f="\\downarrow"):e==="\\Updownarrow"?(l="\\Uparrow",h="\u2016",f="\\Downarrow"):Vt.contains(Kxe,e)?(h="\u2223",d="vert",p=333):Vt.contains(Qxe,e)?(h="\u2225",d="doublevert",p=556):e==="["||e==="\\lbrack"?(l="\u23A1",h="\u23A2",f="\u23A3",m="Size4-Regular",d="lbrack",p=667):e==="]"||e==="\\rbrack"?(l="\u23A4",h="\u23A5",f="\u23A6",m="Size4-Regular",d="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(h=l="\u23A2",f="\u23A3",m="Size4-Regular",d="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(l="\u23A1",h=f="\u23A2",m="Size4-Regular",d="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(h=l="\u23A5",f="\u23A6",m="Size4-Regular",d="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(l="\u23A4",h=f="\u23A5",m="Size4-Regular",d="rceil",p=667):e==="("||e==="\\lparen"?(l="\u239B",h="\u239C",f="\u239D",m="Size4-Regular",d="lparen",p=875):e===")"||e==="\\rparen"?(l="\u239E",h="\u239F",f="\u23A0",m="Size4-Regular",d="rparen",p=875):e==="\\{"||e==="\\lbrace"?(l="\u23A7",u="\u23A8",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(l="\u23AB",u="\u23AC",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(l="\u23A7",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(l="\u23AB",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(l="\u23A7",f="\u23AD",h="\u23AA",m="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(l="\u23AB",f="\u23A9",h="\u23AA",m="Size4-Regular");var g=ey(l,m,a),y=g.height+g.depth,v=ey(h,m,a),x=v.height+v.depth,b=ey(f,m,a),w=b.height+b.depth,S=0,T=1;if(u!==null){var E=ey(u,m,a);S=E.height+E.depth,T=2}var _=y+w+S,A=Math.max(0,Math.ceil((r-_)/(T*x))),L=_+A*T*x,M=i.fontMetrics().axisHeight;n&&(M*=i.sizeMultiplier);var N=L/2-M,k=[];if(d.length>0){var I=L-y-w,C=Math.round(L*1e3),O=ixe(d,Math.round(I*1e3)),D=new Jl(d,O),P=(p/1e3).toFixed(3)+"em",F=(C/1e3).toFixed(3)+"em",B=new ll([D],{width:P,height:F,viewBox:"0 0 "+p+" "+C}),$=Be.makeSvgSpan([],[B],i);$.height=C/1e3,$.style.width=P,$.style.height=F,k.push({type:"elem",elem:$})}else{if(k.push(h7(f,m,a)),k.push(l4),u===null){var z=L-y-w+2*_7;k.push(f7(h,z,i))}else{var Y=(L-y-w-S)/2+2*_7;k.push(f7(h,Y,i)),k.push(l4),k.push(h7(u,m,a)),k.push(l4),k.push(f7(h,Y,i))}k.push(l4),k.push(h7(l,m,a))}var Q=i.havingBaseStyle(Ht.TEXT),X=Be.makeVList({positionType:"bottom",positionData:N,children:k},Q);return z7(Be.makeSpan(["delimsizing","mult"],[X],Q),Ht.TEXT,i,s)},"makeStackedDelim"),d7=80,p7=.08,m7=o(function(e,r,n,i,a){var s=rxe(e,i,n),l=new Jl(e,s),u=new ll([l],{width:"400em",height:ct(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Be.makeSvgSpan(["hide-tail"],[u],a)},"sqrtSvg"),Zxe=o(function(e,r){var n=r.havingBaseSizing(),i=n$("\\surd",e*n.sizeMultiplier,r$,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,u=0,h=0,f=0,d;return i.type==="small"?(f=1e3+1e3*s+d7,e<1?a=1:e<1.4&&(a=.7),u=(1+s+p7)/a,h=(1+s)/a,l=m7("sqrtMain",u,f,s,r),l.style.minWidth="0.853em",d=.833/a):i.type==="large"?(f=(1e3+d7)*ty[i.size],h=(ty[i.size]+s)/a,u=(ty[i.size]+s+p7)/a,l=m7("sqrtSize"+i.size,u,f,s,r),l.style.minWidth="1.02em",d=1/a):(u=e+s+p7,h=e+s,f=Math.floor(1e3*e+s)+d7,l=m7("sqrtTall",u,f,s,r),l.style.minWidth="0.742em",d=1.056),l.height=h,l.style.height=ct(u),{span:l,advanceWidth:d,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},"makeSqrtImage"),e$=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Jxe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],t$=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ty=[0,1.2,1.8,2.4,3],ebe=o(function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Vt.contains(e$,e)||Vt.contains(t$,e))return ZG(e,r,!1,n,i,a);if(Vt.contains(Jxe,e))return JG(e,ty[r],!1,n,i,a);throw new nt("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),tbe=[{type:"small",style:Ht.SCRIPTSCRIPT},{type:"small",style:Ht.SCRIPT},{type:"small",style:Ht.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],rbe=[{type:"small",style:Ht.SCRIPTSCRIPT},{type:"small",style:Ht.SCRIPT},{type:"small",style:Ht.TEXT},{type:"stack"}],r$=[{type:"small",style:Ht.SCRIPTSCRIPT},{type:"small",style:Ht.SCRIPT},{type:"small",style:Ht.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],nbe=o(function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),n$=o(function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length&&n[s].type!=="stack";s++){var l=ey(e,nbe(n[s]),"math"),u=l.height+l.depth;if(n[s].type==="small"){var h=i.havingBaseStyle(n[s].style);u*=h.sizeMultiplier}if(u>r)return n[s]}return n[n.length-1]},"traverseSequence"),i$=o(function(e,r,n,i,a,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var l;Vt.contains(t$,e)?l=tbe:Vt.contains(e$,e)?l=r$:l=rbe;var u=n$(e,r,l,i);return u.type==="small"?Xxe(e,u.style,n,i,a,s):u.type==="large"?ZG(e,u.size,n,i,a,s):JG(e,r,n,i,a,s)},"makeCustomSizedDelim"),ibe=o(function(e,r,n,i,a,s){var l=i.fontMetrics().axisHeight*i.sizeMultiplier,u=901,h=5/i.fontMetrics().ptPerEm,f=Math.max(r-l,n+l),d=Math.max(f/500*u,2*f-h);return i$(e,d,!0,i,a,s)},"makeLeftRightDelim"),au={sqrtImage:Zxe,sizedDelim:ebe,sizeToMaxHeight:ty,customSizedDelim:i$,leftRightDelim:ibe},cG={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},abe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];o(E4,"checkDelimiter");vt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:o((t,e)=>{var r=E4(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:cG[t.funcName].size,mclass:cG[t.funcName].mclass,delim:r.text}},"handler"),htmlBuilder:o((t,e)=>t.delim==="."?Be.makeSpan([t.mclass]):au.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:o(t=>{var e=[];t.delim!=="."&&e.push(_o(t.delim,t.mode));var r=new et.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ct(au.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r},"mathmlBuilder")});o(uG,"assertParsed");vt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new nt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:E4(e[0],t).text,color:r}},"handler")});vt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var r=E4(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=ir(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},"handler"),htmlBuilder:o((t,e)=>{uG(t);for(var r=Ri(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=e.sizeMultiplier,i*=e.sizeMultiplier;var l;if(t.left==="."?l=sy(e,["mopen"]):l=au.leftRightDelim(t.left,n,i,e,t.mode,["mopen"]),r.unshift(l),a)for(var u=1;u<r.length;u++){var h=r[u],f=h.isMiddle;f&&(r[u]=au.leftRightDelim(f.delim,n,i,f.options,t.mode,[]))}var d;if(t.right===".")d=sy(e,["mclose"]);else{var p=t.rightColor?e.withColor(t.rightColor):e;d=au.leftRightDelim(t.right,n,i,p,t.mode,["mclose"])}return r.push(d),Be.makeSpan(["minner"],r,e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{uG(t);var r=gs(t.body,e);if(t.left!=="."){var n=new et.MathNode("mo",[_o(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new et.MathNode("mo",[_o(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return O7(r)},"mathmlBuilder")});vt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var r=E4(e[0],t);if(!t.parser.leftrightDepth)throw new nt("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},"handler"),htmlBuilder:o((t,e)=>{var r;if(t.delim===".")r=sy(e,[]);else{r=au.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?_o("|","text"):_o(t.delim,t.mode),n=new et.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n},"mathmlBuilder")});G7=o((t,e)=>{var r=Be.wrapFragment(Cr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s=0,l=Vt.isCharacterBox(t.body);if(n==="sout")a=Be.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var u=Hn({number:.6,unit:"pt"},e),h=Hn({number:.35,unit:"ex"},e),f=e.havingBaseSizing();i=i/f.sizeMultiplier;var d=r.height+r.depth+u+h;r.style.paddingLeft=ct(d/2+u);var p=Math.floor(1e3*d*i),m=exe(p),g=new ll([new Jl("phase",m)],{width:"400em",height:ct(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});a=Be.makeSvgSpan(["hide-tail"],[g],e),a.style.height=ct(d),s=r.depth+u+h}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,v=0,x=0;/box/.test(n)?(x=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:x),v=y):n==="angl"?(x=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*x,v=Math.max(0,.25-r.depth)):(y=l?.2:0,v=y),a=ou.encloseSpan(r,n,y,v,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=ct(x)):n==="angl"&&x!==.049&&(a.style.borderTopWidth=ct(x),a.style.borderRightWidth=ct(x)),s=r.depth+v,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var b;if(t.backgroundColor)b=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},e);else{var w=/cancel|phase/.test(n)?["svg-align"]:[];b=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:w}]},e)}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!l?Be.makeSpan(["mord","cancel-lap"],[b],e):Be.makeSpan(["mord"],[b],e)},"htmlBuilder$7"),$7=o((t,e)=>{var r=0,n=new et.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[fn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n},"mathmlBuilder$6");vt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=ir(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:G7,mathmlBuilder:$7});vt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=ir(e[0],"color-token").color,s=ir(e[1],"color-token").color,l=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:l}},htmlBuilder:G7,mathmlBuilder:$7});vt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});vt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:G7,mathmlBuilder:$7});vt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});a$={};o(ec,"defineEnvironment");s$={};o(le,"defineMacro");o(hG,"getHLines");C4=o(t=>{var e=t.parser.settings;if(!e.displayMode)throw new nt("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext");o(V7,"getAutoTag");o(mh,"parseArray");o(U7,"dCellStyle");tc=o(function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,l=0,u=new Array(a),h=[],f=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),d=1/r.fontMetrics().ptPerEm,p=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var m=r.havingStyle(Ht.SCRIPT).sizeMultiplier;p=.2778*(m/r.sizeMultiplier)}var g=e.colSeparationType==="CD"?Hn({number:3,unit:"ex"},r):12*d,y=3*d,v=e.arraystretch*g,x=.7*v,b=.3*v,w=0;function S(ke){for(var Ie=0;Ie<ke.length;++Ie)Ie>0&&(w+=.25),h.push({pos:w,isDashed:ke[Ie]})}for(o(S,"setHLinePos"),S(s[0]),n=0;n<e.body.length;++n){var T=e.body[n],E=x,_=b;l<T.length&&(l=T.length);var A=new Array(T.length);for(i=0;i<T.length;++i){var L=Cr(T[i],r);_<L.depth&&(_=L.depth),E<L.height&&(E=L.height),A[i]=L}var M=e.rowGaps[n],N=0;M&&(N=Hn(M,r),N>0&&(N+=b,_<N&&(_=N),N=0)),e.addJot&&(_+=y),A.height=E,A.depth=_,w+=E,A.pos=w,w+=_+N,u[n]=A,S(s[n+1])}var k=w/2+r.fontMetrics().axisHeight,I=e.cols||[],C=[],O,D,P=[];if(e.tags&&e.tags.some(ke=>ke))for(n=0;n<a;++n){var F=u[n],B=F.pos-k,$=e.tags[n],z=void 0;$===!0?z=Be.makeSpan(["eqn-num"],[],r):$===!1?z=Be.makeSpan([],[],r):z=Be.makeSpan([],Ri($,r,!0),r),z.depth=F.depth,z.height=F.height,P.push({type:"elem",elem:z,shift:B})}for(i=0,D=0;i<l||D<I.length;++i,++D){for(var Y=I[D]||{},Q=!0;Y.type==="separator";){if(Q||(O=Be.makeSpan(["arraycolsep"],[]),O.style.width=ct(r.fontMetrics().doubleRuleSep),C.push(O)),Y.separator==="|"||Y.separator===":"){var X=Y.separator==="|"?"solid":"dashed",ie=Be.makeSpan(["vertical-separator"],[],r);ie.style.height=ct(w),ie.style.borderRightWidth=ct(f),ie.style.borderRightStyle=X,ie.style.margin="0 "+ct(-f/2);var j=w-k;j&&(ie.style.verticalAlign=ct(-j)),C.push(ie)}else throw new nt("Invalid separator type: "+Y.separator);D++,Y=I[D]||{},Q=!1}if(!(i>=l)){var J=void 0;(i>0||e.hskipBeforeAndAfter)&&(J=Vt.deflt(Y.pregap,p),J!==0&&(O=Be.makeSpan(["arraycolsep"],[]),O.style.width=ct(J),C.push(O)));var Z=[];for(n=0;n<a;++n){var H=u[n],q=H[i];if(q){var K=H.pos-k;q.depth=H.depth,q.height=H.height,Z.push({type:"elem",elem:q,shift:K})}}Z=Be.makeVList({positionType:"individualShift",children:Z},r),Z=Be.makeSpan(["col-align-"+(Y.align||"c")],[Z]),C.push(Z),(i<l-1||e.hskipBeforeAndAfter)&&(J=Vt.deflt(Y.postgap,p),J!==0&&(O=Be.makeSpan(["arraycolsep"],[]),O.style.width=ct(J),C.push(O)))}}if(u=Be.makeSpan(["mtable"],C),h.length>0){for(var se=Be.makeLineSpan("hline",r,f),ce=Be.makeLineSpan("hdashline",r,f),ue=[{type:"elem",elem:u,shift:0}];h.length>0;){var te=h.pop(),De=te.pos-k;te.isDashed?ue.push({type:"elem",elem:ce,shift:De}):ue.push({type:"elem",elem:se,shift:De})}u=Be.makeVList({positionType:"individualShift",children:ue},r)}if(P.length===0)return Be.makeSpan(["mord"],[u],r);var oe=Be.makeVList({positionType:"individualShift",children:P},r);return oe=Be.makeSpan(["tag"],[oe],r),Be.makeFragment([u,oe])},"htmlBuilder"),sbe={c:"center ",l:"left ",r:"right "},rc=o(function(e,r){for(var n=[],i=new et.MathNode("mtd",[],["mtr-glue"]),a=new et.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var l=e.body[s],u=[],h=0;h<l.length;h++)u.push(new et.MathNode("mtd",[fn(l[h],r)]));e.tags&&e.tags[s]&&(u.unshift(i),u.push(i),e.leqno?u.unshift(a):u.push(a)),n.push(new et.MathNode("mtr",u))}var f=new et.MathNode("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);f.setAttribute("rowspacing",ct(d));var p="",m="";if(e.cols&&e.cols.length>0){var g=e.cols,y="",v=!1,x=0,b=g.length;g[0].type==="separator"&&(p+="top ",x=1),g[g.length-1].type==="separator"&&(p+="bottom ",b-=1);for(var w=x;w<b;w++)g[w].type==="align"?(m+=sbe[g[w].align],v&&(y+="none "),v=!0):g[w].type==="separator"&&v&&(y+=g[w].separator==="|"?"solid ":"dashed ",v=!1);f.setAttribute("columnalign",m.trim()),/[sd]/.test(y)&&f.setAttribute("columnlines",y.trim())}if(e.colSeparationType==="align"){for(var S=e.cols||[],T="",E=1;E<S.length;E++)T+=E%2?"0em ":"1em ";f.setAttribute("columnspacing",T.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?f.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?f.setAttribute("columnspacing","0.5em"):f.setAttribute("columnspacing","1em");var _="",A=e.hLinesBeforeRow;p+=A[0].length>0?"left ":"",p+=A[A.length-1].length>0?"right ":"";for(var L=1;L<A.length-1;L++)_+=A[L].length===0?"none ":A[L][0]?"dashed ":"solid ";return/[sd]/.test(_)&&f.setAttribute("rowlines",_.trim()),p!==""&&(f=new et.MathNode("menclose",[f]),f.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(f=new et.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},"mathmlBuilder"),o$=o(function(e,r){e.envName.indexOf("ed")===-1&&C4(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",s=mh(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:V7(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),l,u=0,h={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var f="",d=0;d<r[0].body.length;d++){var p=ir(r[0].body[d],"textord");f+=p.text}l=Number(f),u=l*2}var m=!u;s.body.forEach(function(x){for(var b=1;b<x.length;b+=2){var w=ir(x[b],"styling"),S=ir(w.body[0],"ordgroup");S.body.unshift(h)}if(m)u<x.length&&(u=x.length);else{var T=x.length/2;if(l<T)throw new nt("Too many math in a row: "+("expected "+l+", but got "+T),x[0])}});for(var g=0;g<u;++g){var y="r",v=0;g%2===1?y="l":g>0&&m&&(v=1),n[g]={type:"align",align:y,pregap:v,postgap:0}}return s.colSeparationType=m?"align":"alignat",s},"alignedHandler");ec({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=T4(e[0]),n=r?[e[0]]:ir(e[0],"ordgroup").body,i=n.map(function(s){var l=B7(s),u=l.text;if("lcr".indexOf(u)!==-1)return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new nt("Unknown column alignment: "+u,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return mh(t.parser,a,U7(t.envName))},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new nt("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=mh(t.parser,n,U7(t.envName)),s=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=mh(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=T4(e[0]),n=r?[e[0]]:ir(e[0],"ordgroup").body,i=n.map(function(s){var l=B7(s),u=l.text;if("lc".indexOf(u)!==-1)return{type:"align",align:u};throw new nt("Unknown column alignment: "+u,s)});if(i.length>1)throw new nt("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=mh(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new nt("{subarray} can contain only one column");return a},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=mh(t.parser,e,U7(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:o$,htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Vt.contains(["gather","gather*"],t.envName)&&C4(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:V7(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return mh(t.parser,e,"display")},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:o$,htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){C4(t);var e={autoTag:V7(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return mh(t.parser,e,"display")},htmlBuilder:tc,mathmlBuilder:rc});ec({type:"array",names:["CD"],props:{numArgs:0},handler(t){return C4(t),Wxe(t.parser)},htmlBuilder:tc,mathmlBuilder:rc});le("\\nonumber","\\gdef\\@eqnsw{0}");le("\\notag","\\nonumber");vt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new nt(t.funcName+" valid only within array environment")}});fG=a$;vt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new nt("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=ir(i.body[s],"textord").text;if(n==="\\begin"){if(!fG.hasOwnProperty(a))throw new nt("No such environment: "+a,i);var l=fG[a],{args:u,optArgs:h}=r.parseArguments("\\begin{"+a+"}",l),f={mode:r.mode,envName:a,parser:r},d=l.handler(f,u,h);r.expect("\\end",!1);var p=r.nextToken,m=ir(r.parseFunction(),"environment");if(m.name!==a)throw new nt("Mismatch: \\begin{"+a+"} matched by \\end{"+m.name+"}",p);return d}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});l$=o((t,e)=>{var r=t.font,n=e.withFont(r);return Cr(t.body,n)},"htmlBuilder$5"),c$=o((t,e)=>{var r=t.font,n=e.withFont(r);return fn(t.body,n)},"mathmlBuilder$4"),dG={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};vt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=y4(e[0]),a=n;return a in dG&&(a=dG[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},"handler"),htmlBuilder:l$,mathmlBuilder:c$});vt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:o((t,e)=>{var{parser:r}=t,n=e[0],i=Vt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:k4(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}},"handler")});vt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:o((t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i),l="math"+n.slice(1);return{type:"font",mode:a,font:l,body:{type:"ordgroup",mode:r.mode,body:s}}},"handler"),htmlBuilder:l$,mathmlBuilder:c$});u$=o((t,e)=>{var r=e;return t==="display"?r=r.id>=Ht.SCRIPT.id?r.text():Ht.DISPLAY:t==="text"&&r.size===Ht.DISPLAY.size?r=Ht.TEXT:t==="script"?r=Ht.SCRIPT:t==="scriptscript"&&(r=Ht.SCRIPTSCRIPT),r},"adjustStyle"),H7=o((t,e)=>{var r=u$(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=Cr(t.numer,a,e);if(t.continued){var l=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm;s.height=s.height<l?l:s.height,s.depth=s.depth<u?u:s.depth}a=e.havingStyle(i);var h=Cr(t.denom,a,e),f,d,p;t.hasBarLine?(t.barSize?(d=Hn(t.barSize,e),f=Be.makeLineSpan("frac-line",e,d)):f=Be.makeLineSpan("frac-line",e),d=f.height,p=f.height):(f=null,d=0,p=e.fontMetrics().defaultRuleThickness);var m,g,y;r.size===Ht.DISPLAY.size||t.size==="display"?(m=e.fontMetrics().num1,d>0?g=3*p:g=7*p,y=e.fontMetrics().denom1):(d>0?(m=e.fontMetrics().num2,g=p):(m=e.fontMetrics().num3,g=3*p),y=e.fontMetrics().denom2);var v;if(f){var b=e.fontMetrics().axisHeight;m-s.depth-(b+.5*d)<g&&(m+=g-(m-s.depth-(b+.5*d))),b-.5*d-(h.height-y)<g&&(y+=g-(b-.5*d-(h.height-y)));var w=-(b-.5*d);v=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:f,shift:w},{type:"elem",elem:s,shift:-m}]},e)}else{var x=m-s.depth-(h.height-y);x<g&&(m+=.5*(g-x),y+=.5*(g-x)),v=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:s,shift:-m}]},e)}a=e.havingStyle(r),v.height*=a.sizeMultiplier/e.sizeMultiplier,v.depth*=a.sizeMultiplier/e.sizeMultiplier;var S;r.size===Ht.DISPLAY.size?S=e.fontMetrics().delim1:r.size===Ht.SCRIPTSCRIPT.size?S=e.havingStyle(Ht.SCRIPT).fontMetrics().delim2:S=e.fontMetrics().delim2;var T,E;return t.leftDelim==null?T=sy(e,["mopen"]):T=au.customSizedDelim(t.leftDelim,S,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?E=Be.makeSpan([]):t.rightDelim==null?E=sy(e,["mclose"]):E=au.customSizedDelim(t.rightDelim,S,!0,e.havingStyle(r),t.mode,["mclose"]),Be.makeSpan(["mord"].concat(a.sizingClasses(e)),[T,Be.makeSpan(["mfrac"],[v]),E],e)},"htmlBuilder$4"),Y7=o((t,e)=>{var r=new et.MathNode("mfrac",[fn(t.numer,e),fn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Hn(t.barSize,e);r.setAttribute("linethickness",ct(n))}var i=u$(t.size,e.style);if(i.size!==e.style.size){r=new et.MathNode("mstyle",[r]);var a=i.size===Ht.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var s=[];if(t.leftDelim!=null){var l=new et.MathNode("mo",[new et.TextNode(t.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}if(s.push(r),t.rightDelim!=null){var u=new et.MathNode("mo",[new et.TextNode(t.rightDelim.replace("\\",""))]);u.setAttribute("fence","true"),s.push(u)}return O7(s)}return r},"mathmlBuilder$3");vt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,l=null,u=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,l="(",u=")";break;case"\\\\bracefrac":s=!1,l="\\{",u="\\}";break;case"\\\\brackfrac":s=!1,l="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:l,rightDelim:u,size:h,barSize:null}},"handler"),htmlBuilder:H7,mathmlBuilder:Y7});vt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")});vt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});pG=["display","text","script","scriptscript"],mG=o(function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r},"delimFromValue");vt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=y4(e[0]),s=a.type==="atom"&&a.family==="open"?mG(a.text):null,l=y4(e[1]),u=l.type==="atom"&&l.family==="close"?mG(l.text):null,h=ir(e[2],"size"),f,d=null;h.isBlank?f=!0:(d=h.value,f=d.number>0);var p="auto",m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=ir(m.body[0],"textord");p=pG[Number(g.text)]}}else m=ir(m,"textord"),p=pG[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:f,barSize:d,leftDelim:s,rightDelim:u,size:p}},htmlBuilder:H7,mathmlBuilder:Y7});vt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:ir(e[0],"size").value,token:i}}});vt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=z2e(ir(e[1],"infix").size),s=e[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:H7,mathmlBuilder:Y7});h$=o((t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Cr(t.sup,e.havingStyle(r.sup()),e):Cr(t.sub,e.havingStyle(r.sub()),e),i=ir(t.base,"horizBrace")):i=ir(t,"horizBrace");var a=Cr(i.base,e.havingBaseStyle(Ht.DISPLAY)),s=ou.svgSpan(i,e),l;if(i.isOver?(l=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),l.children[0].children[0].children[1].classes.push("svg-align")):(l=Be.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),l.children[0].children[0].children[0].classes.push("svg-align")),n){var u=Be.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e);i.isOver?l=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]},e):l=Be.makeVList({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]},e)}return Be.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e)},"htmlBuilder$3"),obe=o((t,e)=>{var r=ou.mathMLnode(t.label);return new et.MathNode(t.isOver?"mover":"munder",[fn(t.base,e),r])},"mathmlBuilder$2");vt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:h$,mathmlBuilder:obe});vt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[1],i=ir(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:ui(n)}:r.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:o((t,e)=>{var r=Ri(t.body,e,!1);return Be.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=ph(t.body,e);return r instanceof ps||(r=new ps("mrow",[r])),r.setAttribute("href",t.href),r},"mathmlBuilder")});vt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=ir(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var l={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:ui(l)}},"handler")});vt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:ui(e[0])}},htmlBuilder(t,e){var r=Ri(t.body,e,!1);return Be.makeFragment(r)},mathmlBuilder(t,e){return new et.MathNode("mrow",gs(t.body,e))}});vt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:o((t,e)=>{var{parser:r,funcName:n,token:i}=t,a=ir(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,u={};switch(n){case"\\htmlClass":u.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":u.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":u.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var h=a.split(","),f=0;f<h.length;f++){var d=h[f].split("=");if(d.length!==2)throw new nt("Error parsing key-value for \\htmlData");u["data-"+d[0].trim()]=d[1].trim()}l={command:"\\htmlData",attributes:u};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:u,body:ui(s)}:r.formatUnsupportedCmd(n)},"handler"),htmlBuilder:o((t,e)=>{var r=Ri(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Be.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},"htmlBuilder"),mathmlBuilder:o((t,e)=>ph(t.body,e),"mathmlBuilder")});vt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:ui(e[0]),mathml:ui(e[1])}},"handler"),htmlBuilder:o((t,e)=>{var r=Ri(t.html,e,!1);return Be.makeFragment(r)},"htmlBuilder"),mathmlBuilder:o((t,e)=>ph(t.mathml,e),"mathmlBuilder")});g7=o(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new nt("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!DG(n))throw new nt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n},"sizeData");vt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:o((t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var u=ir(r[0],"raw").string,h=u.split(","),f=0;f<h.length;f++){var d=h[f].split("=");if(d.length===2){var p=d[1].trim();switch(d[0].trim()){case"alt":l=p;break;case"width":i=g7(p);break;case"height":a=g7(p);break;case"totalheight":s=g7(p);break;default:throw new nt("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=ir(e[0],"url").url;return l===""&&(l=m,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:l,width:i,height:a,totalheight:s,src:m}:n.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:o((t,e)=>{var r=Hn(t.height,e),n=0;t.totalheight.number>0&&(n=Hn(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Hn(t.width,e));var a={height:ct(r+n)};i>0&&(a.width=ct(i)),n>0&&(a.verticalAlign=ct(-n));var s=new T7(t.src,t.alt,a);return s.height=r,s.depth=n,s},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=new et.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Hn(t.height,e),i=0;if(t.totalheight.number>0&&(i=Hn(t.totalheight,e)-n,r.setAttribute("valign",ct(-i))),r.setAttribute("height",ct(n+i)),t.width.number>0){var a=Hn(t.width,e);r.setAttribute("width",ct(a))}return r.setAttribute("src",t.src),r},"mathmlBuilder")});vt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=ir(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return Be.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Hn(t.dimension,e);return new et.SpaceNode(r)}});vt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},"handler"),htmlBuilder:o((t,e)=>{var r;t.alignment==="clap"?(r=Be.makeSpan([],[Cr(t.body,e)]),r=Be.makeSpan(["inner"],[r],e)):r=Be.makeSpan(["inner"],[Cr(t.body,e)]);var n=Be.makeSpan(["fix"],[]),i=Be.makeSpan([t.alignment],[r,n],e),a=Be.makeSpan(["strut"]);return a.style.height=ct(i.height+i.depth),i.depth&&(a.style.verticalAlign=ct(-i.depth)),i.children.unshift(a),i=Be.makeSpan(["thinbox"],[i],e),Be.makeSpan(["mord","vbox"],[i],e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=new et.MathNode("mpadded",[fn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r},"mathmlBuilder")});vt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}});vt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new nt("Mismatched "+t.funcName)}});gG=o((t,e)=>{switch(e.style.size){case Ht.DISPLAY.size:return t.display;case Ht.TEXT.size:return t.text;case Ht.SCRIPT.size:return t.script;case Ht.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle");vt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:o((t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:ui(e[0]),text:ui(e[1]),script:ui(e[2]),scriptscript:ui(e[3])}},"handler"),htmlBuilder:o((t,e)=>{var r=gG(t,e),n=Ri(r,e,!1);return Be.makeFragment(n)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=gG(t,e);return ph(r,e)},"mathmlBuilder")});f$=o((t,e,r,n,i,a,s)=>{t=Be.makeSpan([],[t]);var l=r&&Vt.isCharacterBox(r),u,h;if(e){var f=Cr(e,n.havingStyle(i.sup()),n);h={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-f.depth)}}if(r){var d=Cr(r,n.havingStyle(i.sub()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var p;if(h&&u){var m=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+t.depth+s;p=Be.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:ct(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:ct(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(u){var g=t.height-s;p=Be.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:ct(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t}]},n)}else if(h){var y=t.depth+s;p=Be.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:ct(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var v=[p];if(u&&a!==0&&!l){var x=Be.makeSpan(["mspace"],[],n);x.style.marginRight=ct(a),v.unshift(x)}return Be.makeSpan(["mop","op-limits"],v,n)},"assembleSupSub"),d$=["\\smallint"],xp=o((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=ir(t.base,"op"),i=!0):a=ir(t,"op");var s=e.style,l=!1;s.size===Ht.DISPLAY.size&&a.symbol&&!Vt.contains(d$,a.name)&&(l=!0);var u;if(a.symbol){var h=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),u=Be.makeSymbol(a.name,h,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),f.length>0){var d=u.italic,p=Be.staticSvg(f+"Size"+(l?"2":"1"),e);u=Be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:p,shift:l?.08:0}]},e),a.name="\\"+f,u.classes.unshift("mop"),u.italic=d}}else if(a.body){var m=Ri(a.body,e,!0);m.length===1&&m[0]instanceof ms?(u=m[0],u.classes[0]="mop"):u=Be.makeSpan(["mop"],m,e)}else{for(var g=[],y=1;y<a.name.length;y++)g.push(Be.mathsym(a.name[y],a.mode,e));u=Be.makeSpan(["mop"],g,e)}var v=0,x=0;return(u instanceof ms||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(v=(u.height-u.depth)/2-e.fontMetrics().axisHeight,x=u.italic),i?f$(u,r,n,e,s,x,v):(v&&(u.style.position="relative",u.style.top=ct(v)),u)},"htmlBuilder$2"),oy=o((t,e)=>{var r;if(t.symbol)r=new ps("mo",[_o(t.name,t.mode)]),Vt.contains(d$,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new ps("mo",gs(t.body,e));else{r=new ps("mi",[new qf(t.name.slice(1))]);var n=new ps("mo",[_o("\u2061","text")]);t.parentIsSupSub?r=new ps("mrow",[r,n]):r=$G([r,n])}return r},"mathmlBuilder$1"),lbe={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};vt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=lbe[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},"handler"),htmlBuilder:xp,mathmlBuilder:oy});vt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ui(n)}},"handler"),htmlBuilder:xp,mathmlBuilder:oy});cbe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};vt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:xp,mathmlBuilder:oy});vt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:xp,mathmlBuilder:oy});vt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=cbe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:xp,mathmlBuilder:oy});p$=o((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=ir(t.base,"operatorname"),i=!0):a=ir(t,"operatorname");var s;if(a.body.length>0){for(var l=a.body.map(d=>{var p=d.text;return typeof p=="string"?{type:"textord",mode:d.mode,text:p}:d}),u=Ri(l,e.withFont("mathrm"),!0),h=0;h<u.length;h++){var f=u[h];f instanceof ms&&(f.text=f.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Be.makeSpan(["mop"],u,e)}else s=Be.makeSpan(["mop"],[],e);return i?f$(s,r,n,e,e.style,0,0):s},"htmlBuilder$1"),ube=o((t,e)=>{for(var r=gs(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof et.SpaceNode))if(a instanceof et.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof et.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var l=r.map(f=>f.toText()).join("");r=[new et.TextNode(l)]}var u=new et.MathNode("mi",r);u.setAttribute("mathvariant","normal");var h=new et.MathNode("mo",[_o("\u2061","text")]);return t.parentIsSupSub?new et.MathNode("mrow",[u,h]):et.newDocumentFragment([u,h])},"mathmlBuilder");vt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:o((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:ui(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:p$,mathmlBuilder:ube});le("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Kf({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Be.makeFragment(Ri(t.body,e,!1)):Be.makeSpan(["mord"],Ri(t.body,e,!0),e)},mathmlBuilder(t,e){return ph(t.body,e,!0)}});vt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Cr(t.body,e.havingCrampedStyle()),n=Be.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return Be.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new et.MathNode("mo",[new et.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new et.MathNode("mover",[fn(t.body,e),r]);return n.setAttribute("accent","true"),n}});vt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:ui(n)}},"handler"),htmlBuilder:o((t,e)=>{var r=Ri(t.body,e.withPhantom(),!1);return Be.makeFragment(r)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=gs(t.body,e);return new et.MathNode("mphantom",r)},"mathmlBuilder")});vt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:o((t,e)=>{var r=Be.makeSpan([],[Cr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Be.makeSpan(["mord"],[r],e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=gs(ui(t.body),e),n=new et.MathNode("mphantom",r),i=new et.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i},"mathmlBuilder")});vt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:o((t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:o((t,e)=>{var r=Be.makeSpan(["inner"],[Cr(t.body,e.withPhantom())]),n=Be.makeSpan(["fix"],[]);return Be.makeSpan(["mord","rlap"],[r,n],e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=gs(ui(t.body),e),n=new et.MathNode("mphantom",r),i=new et.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i},"mathmlBuilder")});vt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=ir(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Cr(t.body,e),n=Hn(t.dy,e);return Be.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new et.MathNode("mpadded",[fn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});vt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});vt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=ir(e[0],"size"),s=ir(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&ir(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=Be.makeSpan(["mord","rule"],[],e),n=Hn(t.width,e),i=Hn(t.height,e),a=t.shift?Hn(t.shift,e):0;return r.style.borderRightWidth=ct(n),r.style.borderTopWidth=ct(i),r.style.bottom=ct(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Hn(t.width,e),n=Hn(t.height,e),i=t.shift?Hn(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new et.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",ct(r)),s.setAttribute("height",ct(n));var l=new et.MathNode("mpadded",[s]);return i>=0?l.setAttribute("height",ct(i)):(l.setAttribute("height",ct(i)),l.setAttribute("depth",ct(-i))),l.setAttribute("voffset",ct(i)),l}});o(m$,"sizingGroup");yG=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],hbe=o((t,e)=>{var r=e.havingSize(t.size);return m$(t.body,r,e)},"htmlBuilder");vt({type:"sizing",names:yG,props:{numArgs:0,allowedInText:!0},handler:o((t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:yG.indexOf(n)+1,body:a}},"handler"),htmlBuilder:hbe,mathmlBuilder:o((t,e)=>{var r=e.havingSize(t.size),n=gs(t.body,r),i=new et.MathNode("mstyle",n);return i.setAttribute("mathsize",ct(r.sizeMultiplier)),i},"mathmlBuilder")});vt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:o((t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&ir(r[0],"ordgroup");if(s)for(var l="",u=0;u<s.body.length;++u){var h=s.body[u];if(l=h.text,l==="t")i=!0;else if(l==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var f=e[0];return{type:"smash",mode:n.mode,body:f,smashHeight:i,smashDepth:a}},"handler"),htmlBuilder:o((t,e)=>{var r=Be.makeSpan([],[Cr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return Be.makeSpan(["mord"],[a],e)},"htmlBuilder"),mathmlBuilder:o((t,e)=>{var r=new et.MathNode("mpadded",[fn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r},"mathmlBuilder")});vt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=Cr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Be.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.id<Ht.TEXT.id&&(a=e.fontMetrics().xHeight);var s=i+a/4,l=r.height+r.depth+s+i,{span:u,ruleWidth:h,advanceWidth:f}=au.sqrtImage(l,e),d=u.height-h;d>r.height+r.depth+s&&(s=(s+d-r.height-r.depth)/2);var p=u.height-r.height-s-h;r.style.paddingLeft=ct(f);var m=Be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:u},{type:"kern",size:h}]},e);if(t.index){var g=e.havingStyle(Ht.SCRIPTSCRIPT),y=Cr(t.index,g,e),v=.6*(m.height-m.depth),x=Be.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:y}]},e),b=Be.makeSpan(["root"],[x]);return Be.makeSpan(["mord","sqrt"],[b,m],e)}else return Be.makeSpan(["mord","sqrt"],[m],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new et.MathNode("mroot",[fn(r,e),fn(n,e)]):new et.MathNode("msqrt",[fn(r,e)])}});vG={display:Ht.DISPLAY,text:Ht.TEXT,script:Ht.SCRIPT,scriptscript:Ht.SCRIPTSCRIPT};vt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=vG[t.style],n=e.havingStyle(r).withFont("");return m$(t.body,n,e)},mathmlBuilder(t,e){var r=vG[t.style],n=e.havingStyle(r),i=gs(t.body,n),a=new et.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=s[t.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});fbe=o(function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Ht.DISPLAY.size||n.alwaysHandleSupSub);return i?xp:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Ht.DISPLAY.size||n.limits);return a?p$:null}else{if(n.type==="accent")return Vt.isCharacterBox(n.base)?F7:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?h$:null}else return null}else return null},"htmlBuilderDelegate");Kf({type:"supsub",htmlBuilder(t,e){var r=fbe(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=Cr(n,e),l,u,h=e.fontMetrics(),f=0,d=0,p=n&&Vt.isCharacterBox(n);if(i){var m=e.havingStyle(e.style.sup());l=Cr(i,m,e),p||(f=s.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());u=Cr(a,g,e),p||(d=s.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var y;e.style===Ht.DISPLAY?y=h.sup1:e.style.cramped?y=h.sup3:y=h.sup2;var v=e.sizeMultiplier,x=ct(.5/h.ptPerEm/v),b=null;if(u){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(s instanceof ms||w)&&(b=ct(-s.italic))}var S;if(l&&u){f=Math.max(f,y,l.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var T=h.defaultRuleThickness,E=4*T;if(f-l.depth-(u.height-d)<E){d=E-(f-l.depth)+u.height;var _=.8*h.xHeight-(f-l.depth);_>0&&(f+=_,d-=_)}var A=[{type:"elem",elem:u,shift:d,marginRight:x,marginLeft:b},{type:"elem",elem:l,shift:-f,marginRight:x}];S=Be.makeVList({positionType:"individualShift",children:A},e)}else if(u){d=Math.max(d,h.sub1,u.height-.8*h.xHeight);var L=[{type:"elem",elem:u,marginLeft:b,marginRight:x}];S=Be.makeVList({positionType:"shift",positionData:d,children:L},e)}else if(l)f=Math.max(f,y,l.depth+.25*h.xHeight),S=Be.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:l,marginRight:x}]},e);else throw new Error("supsub must have either sup or sub.");var M=E7(s,"right")||"mord";return Be.makeSpan([M],[s,Be.makeSpan(["msupsub"],[S])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[fn(t.base,e)];t.sub&&a.push(fn(t.sub,e)),t.sup&&a.push(fn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var h=t.base;h&&h.type==="op"&&h.limits&&e.style===Ht.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===Ht.DISPLAY||h.limits)?s="munderover":s="msubsup"}else{var u=t.base;u&&u.type==="op"&&u.limits&&(e.style===Ht.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||e.style===Ht.DISPLAY)?s="munder":s="msub"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===Ht.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Ht.DISPLAY)?s="mover":s="msup"}return new et.MathNode(s,a)}});Kf({type:"atom",htmlBuilder(t,e){return Be.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new et.MathNode("mo",[_o(t.text,t.mode)]);if(t.family==="bin"){var n=P7(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});g$={mi:"italic",mn:"normal",mtext:"normal"};Kf({type:"mathord",htmlBuilder(t,e){return Be.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new et.MathNode("mi",[_o(t.text,t.mode,e)]),n=P7(t,e)||"italic";return n!==g$[r.type]&&r.setAttribute("mathvariant",n),r}});Kf({type:"textord",htmlBuilder(t,e){return Be.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=_o(t.text,t.mode,e),n=P7(t,e)||"normal",i;return t.mode==="text"?i=new et.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new et.MathNode("mn",[r]):t.text==="\\prime"?i=new et.MathNode("mo",[r]):i=new et.MathNode("mi",[r]),n!==g$[i.type]&&i.setAttribute("mathvariant",n),i}});y7={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},v7={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Kf({type:"spacing",htmlBuilder(t,e){if(v7.hasOwnProperty(t.text)){var r=v7[t.text].className||"";if(t.mode==="text"){var n=Be.makeOrd(t,e,"textord");return n.classes.push(r),n}else return Be.makeSpan(["mspace",r],[Be.mathsym(t.text,t.mode,e)],e)}else{if(y7.hasOwnProperty(t.text))return Be.makeSpan(["mspace",y7[t.text]],[],e);throw new nt('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(v7.hasOwnProperty(t.text))r=new et.MathNode("mtext",[new et.TextNode("\xA0")]);else{if(y7.hasOwnProperty(t.text))return new et.MathNode("mspace");throw new nt('Unknown type of space "'+t.text+'"')}return r}});xG=o(()=>{var t=new et.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad");Kf({type:"tag",mathmlBuilder(t,e){var r=new et.MathNode("mtable",[new et.MathNode("mtr",[xG(),new et.MathNode("mtd",[ph(t.body,e)]),xG(),new et.MathNode("mtd",[ph(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});bG={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},wG={"\\textbf":"textbf","\\textmd":"textmd"},dbe={"\\textit":"textit","\\textup":"textup"},TG=o((t,e)=>{var r=t.font;if(r){if(bG[r])return e.withTextFontFamily(bG[r]);if(wG[r])return e.withTextFontWeight(wG[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(dbe[r])},"optionsWithFont");vt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:ui(i),font:n}},htmlBuilder(t,e){var r=TG(t,e),n=Ri(t.body,r,!0);return Be.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=TG(t,e);return ph(t.body,r)}});vt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Cr(t.body,e),n=Be.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Be.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return Be.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new et.MathNode("mo",[new et.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new et.MathNode("munder",[fn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});vt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Cr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Be.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new et.MathNode("mpadded",[fn(t.body,e)],["vcenter"])}});vt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new nt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=kG(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\textasciitilde"),n.push(Be.makeSymbol(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Be.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Be.tryCombineChars(n),i)},mathmlBuilder(t,e){var r=new et.TextNode(kG(t)),n=new et.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});kG=o(t=>t.body.replace(/ /g,t.star?"\u2423":"\xA0"),"makeVerb"),fh=zG,y$=`[ \r
272 `,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new Ao(i,new Xs(this,r,this.tokenRegex.lastIndex))}},D7=class{static{o(this,"Namespace")}constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new nt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},bbe=s$;le("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});le("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});le("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});le("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});le("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});le("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");le("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});EG={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};le("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new nt("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=EG[e.text],n==null||n>=r)throw new nt("Invalid base-"+r+" digit "+e.text);for(var i;(i=EG[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken()}return"\\@char{"+n+"}"});W7=o((t,e,r)=>{var n=t.consumeArg().tokens;if(n.length!==1)throw new nt("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new nt("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new nt("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(n=t.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new nt("Invalid number of arguments: "+l);s=parseInt(l),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:s}),""},"newcommand");le("\\newcommand",t=>W7(t,!1,!0));le("\\renewcommand",t=>W7(t,!0,!1));le("\\providecommand",t=>W7(t,!0,!0));le("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});le("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});le("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),fh[r],wn.math[r],wn.text[r]),""});le("\\bgroup","{");le("\\egroup","}");le("~","\\nobreakspace");le("\\lq","`");le("\\rq","'");le("\\aa","\\r a");le("\\AA","\\r A");le("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");le("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");le("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");le("\u212C","\\mathscr{B}");le("\u2130","\\mathscr{E}");le("\u2131","\\mathscr{F}");le("\u210B","\\mathscr{H}");le("\u2110","\\mathscr{I}");le("\u2112","\\mathscr{L}");le("\u2133","\\mathscr{M}");le("\u211B","\\mathscr{R}");le("\u212D","\\mathfrak{C}");le("\u210C","\\mathfrak{H}");le("\u2128","\\mathfrak{Z}");le("\\Bbbk","\\Bbb{k}");le("\xB7","\\cdotp");le("\\llap","\\mathllap{\\textrm{#1}}");le("\\rlap","\\mathrlap{\\textrm{#1}}");le("\\clap","\\mathclap{\\textrm{#1}}");le("\\mathstrut","\\vphantom{(}");le("\\underbar","\\underline{\\text{#1}}");le("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');le("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");le("\\ne","\\neq");le("\u2260","\\neq");le("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");le("\u2209","\\notin");le("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");le("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");le("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");le("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");le("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");le("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");le("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");le("\u27C2","\\perp");le("\u203C","\\mathclose{!\\mkern-0.8mu!}");le("\u220C","\\notni");le("\u231C","\\ulcorner");le("\u231D","\\urcorner");le("\u231E","\\llcorner");le("\u231F","\\lrcorner");le("\xA9","\\copyright");le("\xAE","\\textregistered");le("\uFE0F","\\textregistered");le("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');le("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');le("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');le("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');le("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");le("\u22EE","\\vdots");le("\\varGamma","\\mathit{\\Gamma}");le("\\varDelta","\\mathit{\\Delta}");le("\\varTheta","\\mathit{\\Theta}");le("\\varLambda","\\mathit{\\Lambda}");le("\\varXi","\\mathit{\\Xi}");le("\\varPi","\\mathit{\\Pi}");le("\\varSigma","\\mathit{\\Sigma}");le("\\varUpsilon","\\mathit{\\Upsilon}");le("\\varPhi","\\mathit{\\Phi}");le("\\varPsi","\\mathit{\\Psi}");le("\\varOmega","\\mathit{\\Omega}");le("\\substack","\\begin{subarray}{c}#1\\end{subarray}");le("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");le("\\boxed","\\fbox{$\\displaystyle{#1}$}");le("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");le("\\implies","\\DOTSB\\;\\Longrightarrow\\;");le("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");CG={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};le("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in CG?e=CG[r]:(r.slice(0,4)==="\\not"||r in wn.math&&Vt.contains(["bin","rel"],wn.math[r].group))&&(e="\\dotsb"),e});q7={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};le("\\dotso",function(t){var e=t.future().text;return e in q7?"\\ldots\\,":"\\ldots"});le("\\dotsc",function(t){var e=t.future().text;return e in q7&&e!==","?"\\ldots\\,":"\\ldots"});le("\\cdots",function(t){var e=t.future().text;return e in q7?"\\@cdots\\,":"\\@cdots"});le("\\dotsb","\\cdots");le("\\dotsm","\\cdots");le("\\dotsi","\\!\\cdots");le("\\dotsx","\\ldots\\,");le("\\DOTSI","\\relax");le("\\DOTSB","\\relax");le("\\DOTSX","\\relax");le("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");le("\\,","\\tmspace+{3mu}{.1667em}");le("\\thinspace","\\,");le("\\>","\\mskip{4mu}");le("\\:","\\tmspace+{4mu}{.2222em}");le("\\medspace","\\:");le("\\;","\\tmspace+{5mu}{.2777em}");le("\\thickspace","\\;");le("\\!","\\tmspace-{3mu}{.1667em}");le("\\negthinspace","\\!");le("\\negmedspace","\\tmspace-{4mu}{.2222em}");le("\\negthickspace","\\tmspace-{5mu}{.277em}");le("\\enspace","\\kern.5em ");le("\\enskip","\\hskip.5em\\relax");le("\\quad","\\hskip1em\\relax");le("\\qquad","\\hskip2em\\relax");le("\\tag","\\@ifstar\\tag@literal\\tag@paren");le("\\tag@paren","\\tag@literal{({#1})}");le("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new nt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});le("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");le("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");le("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");le("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");le("\\newline","\\\\\\relax");le("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");v$=ct(Zl["Main-Regular"][84][1]-.7*Zl["Main-Regular"][65][1]);le("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+v$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");le("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+v$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");le("\\hspace","\\@ifstar\\@hspacer\\@hspace");le("\\@hspace","\\hskip #1\\relax");le("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");le("\\ordinarycolon",":");le("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");le("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');le("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');le("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');le("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');le("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');le("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');le("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');le("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');le("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');le("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');le("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');le("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');le("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');le("\u2237","\\dblcolon");le("\u2239","\\eqcolon");le("\u2254","\\coloneqq");le("\u2255","\\eqqcolon");le("\u2A74","\\Coloneqq");le("\\ratio","\\vcentcolon");le("\\coloncolon","\\dblcolon");le("\\colonequals","\\coloneqq");le("\\coloncolonequals","\\Coloneqq");le("\\equalscolon","\\eqqcolon");le("\\equalscoloncolon","\\Eqqcolon");le("\\colonminus","\\coloneq");le("\\coloncolonminus","\\Coloneq");le("\\minuscolon","\\eqcolon");le("\\minuscoloncolon","\\Eqcolon");le("\\coloncolonapprox","\\Colonapprox");le("\\coloncolonsim","\\Colonsim");le("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");le("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");le("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");le("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");le("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");le("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");le("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");le("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");le("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");le("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");le("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");le("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");le("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");le("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");le("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");le("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");le("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");le("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");le("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");le("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");le("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");le("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");le("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");le("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");le("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");le("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");le("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");le("\\imath","\\html@mathml{\\@imath}{\u0131}");le("\\jmath","\\html@mathml{\\@jmath}{\u0237}");le("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");le("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");le("\u27E6","\\llbracket");le("\u27E7","\\rrbracket");le("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");le("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");le("\u2983","\\lBrace");le("\u2984","\\rBrace");le("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");le("\u29B5","\\minuso");le("\\darr","\\downarrow");le("\\dArr","\\Downarrow");le("\\Darr","\\Downarrow");le("\\lang","\\langle");le("\\rang","\\rangle");le("\\uarr","\\uparrow");le("\\uArr","\\Uparrow");le("\\Uarr","\\Uparrow");le("\\N","\\mathbb{N}");le("\\R","\\mathbb{R}");le("\\Z","\\mathbb{Z}");le("\\alef","\\aleph");le("\\alefsym","\\aleph");le("\\Alpha","\\mathrm{A}");le("\\Beta","\\mathrm{B}");le("\\bull","\\bullet");le("\\Chi","\\mathrm{X}");le("\\clubs","\\clubsuit");le("\\cnums","\\mathbb{C}");le("\\Complex","\\mathbb{C}");le("\\Dagger","\\ddagger");le("\\diamonds","\\diamondsuit");le("\\empty","\\emptyset");le("\\Epsilon","\\mathrm{E}");le("\\Eta","\\mathrm{H}");le("\\exist","\\exists");le("\\harr","\\leftrightarrow");le("\\hArr","\\Leftrightarrow");le("\\Harr","\\Leftrightarrow");le("\\hearts","\\heartsuit");le("\\image","\\Im");le("\\infin","\\infty");le("\\Iota","\\mathrm{I}");le("\\isin","\\in");le("\\Kappa","\\mathrm{K}");le("\\larr","\\leftarrow");le("\\lArr","\\Leftarrow");le("\\Larr","\\Leftarrow");le("\\lrarr","\\leftrightarrow");le("\\lrArr","\\Leftrightarrow");le("\\Lrarr","\\Leftrightarrow");le("\\Mu","\\mathrm{M}");le("\\natnums","\\mathbb{N}");le("\\Nu","\\mathrm{N}");le("\\Omicron","\\mathrm{O}");le("\\plusmn","\\pm");le("\\rarr","\\rightarrow");le("\\rArr","\\Rightarrow");le("\\Rarr","\\Rightarrow");le("\\real","\\Re");le("\\reals","\\mathbb{R}");le("\\Reals","\\mathbb{R}");le("\\Rho","\\mathrm{P}");le("\\sdot","\\cdot");le("\\sect","\\S");le("\\spades","\\spadesuit");le("\\sub","\\subset");le("\\sube","\\subseteq");le("\\supe","\\supseteq");le("\\Tau","\\mathrm{T}");le("\\thetasym","\\vartheta");le("\\weierp","\\wp");le("\\Zeta","\\mathrm{Z}");le("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");le("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");le("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");le("\\bra","\\mathinner{\\langle{#1}|}");le("\\ket","\\mathinner{|{#1}\\rangle}");le("\\braket","\\mathinner{\\langle{#1}\\rangle}");le("\\Bra","\\left\\langle#1\\right|");le("\\Ket","\\left|#1\\right\\rangle");x$=o(t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var u=o(d=>p=>{t&&(p.macros.set("|",s),i.length&&p.macros.set("\\|",l));var m=d;if(!d&&i.length){var g=p.future();g.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?i:n,numArgs:0}},"midMacro");e.macros.set("|",u(!1)),i.length&&e.macros.set("\\|",u(!0));var h=e.consumeArg().tokens,f=e.expandTokens([...a,...h,...r]);return e.macros.endGroup(),{tokens:f.reverse(),numArgs:0}},"braketHelper");le("\\bra@ket",x$(!1));le("\\bra@set",x$(!0));le("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");le("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");le("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");le("\\angln","{\\angl n}");le("\\blue","\\textcolor{##6495ed}{#1}");le("\\orange","\\textcolor{##ffa500}{#1}");le("\\pink","\\textcolor{##ff00af}{#1}");le("\\red","\\textcolor{##df0030}{#1}");le("\\green","\\textcolor{##28ae7b}{#1}");le("\\gray","\\textcolor{gray}{#1}");le("\\purple","\\textcolor{##9d38bd}{#1}");le("\\blueA","\\textcolor{##ccfaff}{#1}");le("\\blueB","\\textcolor{##80f6ff}{#1}");le("\\blueC","\\textcolor{##63d9ea}{#1}");le("\\blueD","\\textcolor{##11accd}{#1}");le("\\blueE","\\textcolor{##0c7f99}{#1}");le("\\tealA","\\textcolor{##94fff5}{#1}");le("\\tealB","\\textcolor{##26edd5}{#1}");le("\\tealC","\\textcolor{##01d1c1}{#1}");le("\\tealD","\\textcolor{##01a995}{#1}");le("\\tealE","\\textcolor{##208170}{#1}");le("\\greenA","\\textcolor{##b6ffb0}{#1}");le("\\greenB","\\textcolor{##8af281}{#1}");le("\\greenC","\\textcolor{##74cf70}{#1}");le("\\greenD","\\textcolor{##1fab54}{#1}");le("\\greenE","\\textcolor{##0d923f}{#1}");le("\\goldA","\\textcolor{##ffd0a9}{#1}");le("\\goldB","\\textcolor{##ffbb71}{#1}");le("\\goldC","\\textcolor{##ff9c39}{#1}");le("\\goldD","\\textcolor{##e07d10}{#1}");le("\\goldE","\\textcolor{##a75a05}{#1}");le("\\redA","\\textcolor{##fca9a9}{#1}");le("\\redB","\\textcolor{##ff8482}{#1}");le("\\redC","\\textcolor{##f9685d}{#1}");le("\\redD","\\textcolor{##e84d39}{#1}");le("\\redE","\\textcolor{##bc2612}{#1}");le("\\maroonA","\\textcolor{##ffbde0}{#1}");le("\\maroonB","\\textcolor{##ff92c6}{#1}");le("\\maroonC","\\textcolor{##ed5fa6}{#1}");le("\\maroonD","\\textcolor{##ca337c}{#1}");le("\\maroonE","\\textcolor{##9e034e}{#1}");le("\\purpleA","\\textcolor{##ddd7ff}{#1}");le("\\purpleB","\\textcolor{##c6b9fc}{#1}");le("\\purpleC","\\textcolor{##aa87ff}{#1}");le("\\purpleD","\\textcolor{##7854ab}{#1}");le("\\purpleE","\\textcolor{##543b78}{#1}");le("\\mintA","\\textcolor{##f5f9e8}{#1}");le("\\mintB","\\textcolor{##edf2df}{#1}");le("\\mintC","\\textcolor{##e0e5cc}{#1}");le("\\grayA","\\textcolor{##f6f7f7}{#1}");le("\\grayB","\\textcolor{##f0f1f2}{#1}");le("\\grayC","\\textcolor{##e3e5e6}{#1}");le("\\grayD","\\textcolor{##d6d8da}{#1}");le("\\grayE","\\textcolor{##babec2}{#1}");le("\\grayF","\\textcolor{##888d93}{#1}");le("\\grayG","\\textcolor{##626569}{#1}");le("\\grayH","\\textcolor{##3b3e40}{#1}");le("\\grayI","\\textcolor{##21242c}{#1}");le("\\kaBlue","\\textcolor{##314453}{#1}");le("\\kaGreen","\\textcolor{##71B307}{#1}");b$={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},R7=class{static{o(this,"MacroExpander")}constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new D7(bbe,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new v4(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Ao("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new nt("Extra }",a)}else if(a.text==="EOF")throw new nt("Unexpected end of input in a macro argument, expected '"+(e&&n?e[l]:"}")+"'",a);if(e&&n)if((s===0||s===1&&e[l]==="{")&&a.text===e[l]){if(++l,l===e.length){r.splice(-l,l);break}}else l=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new nt("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new nt("Use of the macro doesn't match its definition",a)}}for(var s=[],l=0;l<e;l++)s.push(this.consumeArg(r&&r[l+1]).tokens);return s}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new nt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new nt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new nt("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...s[+u.text-1]);else throw new nt("Not a valid argument number",u)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ao(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var l=new v4(i,this.settings),u=[],h=l.lex();h.text!=="EOF";)u.push(h),h=l.lex();u.reverse();var f={tokens:u,numArgs:a};return f}return i}isDefined(e){return this.macros.has(e)||fh.hasOwnProperty(e)||wn.math.hasOwnProperty(e)||wn.text.hasOwnProperty(e)||b$.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:fh.hasOwnProperty(e)&&!fh[e].primitive}},SG=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,c4=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),x7={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},AG={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},x4=class t{static{o(this,"Parser")}constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new R7(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new nt("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Ao("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&fh[i.text]&&fh[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i<e.length;i++)if(e[i].type==="infix"){if(r!==-1)throw new nt("only one infix operator per group",e[i].token);r=i,n=e[i].replaceWith}if(r!==-1&&n){var a,s,l=e.slice(0,r),u=e.slice(r+1);l.length===1&&l[0].type==="ordgroup"?a=l[0]:a={type:"ordgroup",mode:this.mode,body:l},u.length===1&&u[0].type==="ordgroup"?s=u[0]:s={type:"ordgroup",mode:this.mode,body:u};var h;return n==="\\\\abovefrac"?h=this.callFunction(n,[a,e[r],s],[]):h=this.callFunction(n,[a,s],[]),[h]}else return e}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i=this.parseGroup(e);if(!i)throw new nt("Expected group after '"+n+"'",r);return i}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a}parseAtom(e){var r=this.parseGroup("atom",e);if(this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var s=a.text==="\\limits";r.limits=s,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new nt("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new nt("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(i)throw new nt("Double subscript",a);i=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(n)throw new nt("Double superscript",a);var l={type:"textord",mode:this.mode,text:"\\prime"},u=[l];for(this.consume();this.fetch().text==="'";)u.push(l),this.consume();this.fetch().text==="^"&&u.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:u}}else if(c4[a.text]){var h=SG.test(a.text),f=[];for(f.push(new Ao(c4[a.text])),this.consume();;){var d=this.fetch().text;if(!c4[d]||SG.test(d)!==h)break;f.unshift(new Ao(c4[d])),this.consume()}var p=this.subparse(f);h?i={type:"ordgroup",mode:"math",body:p}:n={type:"ordgroup",mode:"math",body:p}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(e,r){var n=this.fetch(),i=n.text,a=fh[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new nt("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new nt("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new nt("Can't use function '"+i+"' in math mode",n);var{args:s,optArgs:l}=this.parseArguments(i,a);return this.callFunction(i,s,l,n,e)}callFunction(e,r,n,i,a){var s={funcName:e,parser:this,token:i,breakOnTokenText:a},l=fh[e];if(l&&l.handler)return l.handler(s,r,n);throw new nt("No function handler for "+e)}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],s=0;s<n;s++){var l=r.argTypes&&r.argTypes[s],u=s<r.numOptionalArgs;(r.primitive&&l==null||r.type==="sqrt"&&s===1&&a[0]==null)&&(l="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",l,u);if(u)a.push(h);else if(h!=null)i.push(h);else throw new nt("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new nt("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new nt("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new nt("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,r){for(var n=this.fetch(),i=n,a="",s;(s=this.fetch()).text!=="EOF"&&e.test(a+s.text);)i=s,a+=i.text,this.consume();if(a==="")throw new nt("Invalid "+r+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new nt("Invalid color: '"+r.text+"'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new nt("Invalid size: '"+r.text+"'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!DG(a))throw new nt("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),s}parseGroup(e,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\begingroup"){this.consume();var s=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,s),u=this.fetch();this.expect(s),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:Xs.range(n,u),body:l,semisimple:i==="\\begingroup"||void 0}}else if(a=this.parseFunction(r,e)||this.parseSymbol(),a==null&&i[0]==="\\"&&!b$.hasOwnProperty(i)){if(this.settings.throwOnError)throw new nt("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var i=e[n],a=i.text;a==="-"&&e[n+1].text==="-"&&(n+1<r&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:Xs.range(i,e[n+2]),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Xs.range(i,e[n+1]),text:"--"}),r-=1)),(a==="'"||a==="`")&&e[n+1].text===a&&(e.splice(n,2,{type:"textord",mode:"text",loc:Xs.range(i,e[n+1]),text:a+a}),r-=1)}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new nt(`\\verb assertion failed --
273 please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}AG.hasOwnProperty(r[0])&&!wn[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=AG[r[0]]+r.slice(1));var a=vbe.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="\u0131":r==="j"&&(r="\u0237"));var s;if(wn[this.mode][r]){this.settings.strict&&this.mode==="math"&&k7.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var l=wn[this.mode][r].group,u=Xs.range(e),h;if(hxe.hasOwnProperty(l)){var f=l;h={type:"atom",mode:this.mode,family:f,loc:u,text:r}}else h={type:l,mode:this.mode,loc:u,text:r};s=h}else if(r.charCodeAt(0)>=128)this.settings.strict&&(LG(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Xs.range(e),text:r};else return null;if(this.consume(),a)for(var d=0;d<a[0].length;d++){var p=a[0][d];if(!x7[p])throw new nt("Unknown accent ' "+p+"'",e);var m=x7[p][this.mode]||x7[p].text;if(!m)throw new nt("Accent "+p+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Xs.range(e),label:m,isStretchy:!1,isShifty:!0,base:s}}return s}};x4.endOfExpression=["}","\\endgroup","\\end","\\right","&"];X7=o(function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new x4(e,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new nt("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new Ao("\\df@tag")])}]}return i},"parseTree"),w$=o(function(e,r,n){r.textContent="";var i=j7(e,n).toNode();r.appendChild(i)},"render");typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),w$=o(function(){throw new nt("KaTeX doesn't work in quirks mode.")},"render"));wbe=o(function(e,r){var n=j7(e,r).toMarkup();return n},"renderToString"),Tbe=o(function(e,r){var n=new ry(r);return X7(e,n)},"generateParseTree"),T$=o(function(e,r,n){if(n.throwOnError||!(e instanceof nt))throw e;var i=Be.makeSpan(["katex-error"],[new ms(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},"renderError"),j7=o(function(e,r){var n=new ry(r);try{var i=X7(e,n);return Mxe(i,e,n)}catch(a){return T$(a,e,n)}},"renderToDomTree"),kbe=o(function(e,r){var n=new ry(r);try{var i=X7(e,n);return Ixe(i,e,n)}catch(a){return T$(a,e,n)}},"renderToHTMLTree"),Ebe={version:"0.16.11",render:w$,renderToString:wbe,ParseError:nt,SETTINGS_SCHEMA:u4,__parse:Tbe,__renderToDomTree:j7,__renderToHTMLTree:kbe,__setFontMetrics:axe,__defineSymbol:G,__defineFunction:vt,__defineMacro:le,__domTree:{Span:jf,Anchor:iy,SymbolNode:ms,SvgNode:ll,PathNode:Jl,LineNode:ay}}});function Abe(){let t="data-temp-href-target";bp.default.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),bp.default.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"))})}var bp,Qf,Cbe,Sbe,A$,C$,qr,_be,Lbe,Dbe,Rbe,_$,Nbe,yr,Mbe,Ibe,gh,K7,Obe,Pbe,S$,Q7,Ni,Zf,yh,We,rr=R(()=>{"use strict";bp=Xi(o7(),1),Qf=/<br\s*\/?>/gi,Cbe=o(t=>t?_$(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Sbe=(()=>{let t=!1;return()=>{t||(Abe(),t=!0)}})();o(Abe,"setupDompurifyHooks");A$=o(t=>(Sbe(),bp.default.sanitize(t)),"removeScript"),C$=o((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=A$(t):r!=="loose"&&(t=_$(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=Rbe(t))}return t},"sanitizeMore"),qr=o((t,e)=>t&&(e.dompurifyConfig?t=bp.default.sanitize(C$(t,e),e.dompurifyConfig).toString():t=bp.default.sanitize(C$(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),_be=o((t,e)=>typeof t=="string"?qr(t,e):t.flat().map(r=>qr(r,e)),"sanitizeTextOrArray"),Lbe=o(t=>Qf.test(t),"hasBreaks"),Dbe=o(t=>t.split(Qf),"splitBreaks"),Rbe=o(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),_$=o(t=>t.replace(Qf,"#br#"),"breakToPlaceholder"),Nbe=o(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),yr=o(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Mbe=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),Ibe=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),gh=o(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let i=e[n];if(i===","&&n>0&&n+1<e.length){let a=e[n-1],s=e[n+1];Obe(a,s)&&(i=a+","+s,n++,r.pop())}r.push(Pbe(i))}return r.join("")},"parseGenericTypes"),K7=o((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Obe=o((t,e)=>{let r=K7(t,"~"),n=K7(e,"~");return r===1&&n===1},"shouldCombineSets"),Pbe=o(t=>{let e=K7(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),S$=o(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Q7=/\$\$(.*)\$\$/g,Ni=o(t=>(t.match(Q7)?.length??0)>0,"hasKatex"),Zf=o(async(t,e)=>{t=await yh(t,e);let r=document.createElement("div");r.innerHTML=t,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"),yh=o(async(t,e)=>{if(!Ni(t))return t;if(!(S$()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Q7,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(E$(),k$)),n=e.forceLegacyMathML||!S$()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Qf).map(i=>Ni(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(Q7,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))},"renderKatex"),We={getRows:Cbe,sanitizeText:qr,sanitizeTextOrArray:_be,hasBreaks:Lbe,splitBreaks:Dbe,lineBreakRegex:Qf,removeScript:A$,getUrl:Nbe,evaluate:yr,getMax:Mbe,getMin:Ibe}});var Bbe,Fbe,Sr,Lo,Yn=R(()=>{"use strict";ut();Bbe=o(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Fbe=o(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Sr=o(function(t,e,r,n){let i=Fbe(e,r,n);Bbe(t,i)},"configureSvgSize"),Lo=o(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,s=i.height;V.info(`SVG bounds: ${a}x${s}`,i);let l=0,u=0;V.info(`Graph bounds: ${l}x${u}`,t),l=a+r*2,u=s+r*2,V.info(`Calculated bounds: ${l}x${u}`),Sr(e,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox")});var S4,zbe,L$,D$,Z7=R(()=>{"use strict";ut();S4={},zbe=o((t,e,r)=>{let n="";return t in S4&&S4[t]?n=S4[t](r):V.warn(`No theme found for ${t}`),` & {
329 `)},"setAccDescription"),Lr=o(()=>tS,"getAccDescription"),nn=o(t=>{eS=rS(t)},"setDiagramTitle"),Xr=o(()=>eS,"getDiagramTitle")});var R$,Gbe,de,iS,_4,$be,aS,Vbe,A4,Jf,cy,nS,_t=R(()=>{"use strict";Hf();ut();qs();rr();Yn();Z7();bi();R$=V,Gbe=$1,de=Or,iS=Zb,_4=uh,$be=o(t=>qr(t,de()),"sanitizeText"),aS=Lo,Vbe=o(()=>ly,"getCommonDb"),A4={},Jf=o((t,e,r)=>{A4[t]&&R$.warn(`Diagram with id ${t} already registered. Overwriting.`),A4[t]=e,r&&$C(t,r),L$(t,e.styles),e.injectUtils?.(R$,Gbe,de,$be,aS,Vbe(),()=>{})},"registerDiagram"),cy=o(t=>{if(t in A4)return A4[t];throw new nS(t)},"getDiagram"),nS=class extends Error{static{o(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}});var ul,vh,ja,cl,nc,uy,sS,oS,L4,D4,N$,Ube,Hbe,Ybe,Wbe,qbe,Xbe,jbe,Kbe,Qbe,Zbe,Jbe,e4e,t4e,r4e,n4e,i4e,a4e,M$,s4e,o4e,I$,l4e,c4e,u4e,h4e,xh,f4e,d4e,p4e,m4e,g4e,hy,lS=R(()=>{"use strict";_t();rr();bi();ul=[],vh=[""],ja="global",cl="",nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],uy=[],sS="",oS=!1,L4=4,D4=2,Ube=o(function(){return N$},"getC4Type"),Hbe=o(function(t){N$=qr(t,de())},"setC4Type"),Ybe=o(function(t,e,r,n,i,a,s,l,u){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let h={},f=uy.find(d=>d.from===e&&d.to===r);if(f?h=f:uy.push(h),h.type=t,h.from=e,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]={text:p}}else h.descr={text:a};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p}else h.sprite=s;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.tags=l;if(typeof u=="object"){let[d,p]=Object.entries(u)[0];h[d]=p}else h.link=u;h.wrap=xh()},"addRel"),Wbe=o(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let l={},u=ul.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,ul.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.tags=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=ja,l.wrap=xh()},"addPersonOrSystem"),qbe=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=ul.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,ul.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=xh(),u.typeC4Shape={text:t},u.parentBoundary=ja},"addContainer"),Xbe=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=ul.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,ul.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=xh(),u.typeC4Shape={text:t},u.parentBoundary=ja},"addComponent"),jbe=o(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=nc.find(l=>l.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,nc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=ja,a.wrap=xh(),cl=ja,ja=t,vh.push(cl)},"addPersonOrSystemBoundary"),Kbe=o(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=nc.find(l=>l.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,nc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=ja,a.wrap=xh(),cl=ja,ja=t,vh.push(cl)},"addContainerBoundary"),Qbe=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=nc.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,nc.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.nodeType=t,u.parentBoundary=ja,u.wrap=xh(),cl=ja,ja=e,vh.push(cl)},"addDeploymentNode"),Zbe=o(function(){ja=cl,vh.pop(),cl=vh.pop(),vh.push(cl)},"popBoundaryParseStack"),Jbe=o(function(t,e,r,n,i,a,s,l,u,h,f){let d=ul.find(p=>p.alias===e);if(!(d===void 0&&(d=nc.find(p=>p.alias===e),d===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];d[p]=m}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];d[p]=m}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];d[p]=m}else d.borderColor=i;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];d[p]=m}else d.shadowing=a;if(s!=null)if(typeof s=="object"){let[p,m]=Object.entries(s)[0];d[p]=m}else d.shape=s;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];d[p]=m}else d.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];d[p]=m}else d.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];d[p]=m}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];d[p]=m}else d.legendSprite=f}},"updateElStyle"),e4e=o(function(t,e,r,n,i,a,s){let l=uy.find(u=>u.from===e&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(s)}},"updateRelStyle"),t4e=o(function(t,e,r){let n=L4,i=D4;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(L4=n),i>=1&&(D4=i)},"updateLayoutConfig"),r4e=o(function(){return L4},"getC4ShapeInRow"),n4e=o(function(){return D4},"getC4BoundaryInRow"),i4e=o(function(){return ja},"getCurrentBoundaryParse"),a4e=o(function(){return cl},"getParentBoundaryParse"),M$=o(function(t){return t==null?ul:ul.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),s4e=o(function(t){return ul.find(e=>e.alias===t)},"getC4Shape"),o4e=o(function(t){return Object.keys(M$(t))},"getC4ShapeKeys"),I$=o(function(t){return t==null?nc:nc.filter(e=>e.parentBoundary===t)},"getBoundaries"),l4e=I$,c4e=o(function(){return uy},"getRels"),u4e=o(function(){return sS},"getTitle"),h4e=o(function(t){oS=t},"setWrap"),xh=o(function(){return oS},"autoWrap"),f4e=o(function(){ul=[],nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],cl="",ja="global",vh=[""],uy=[],vh=[""],sS="",oS=!1,L4=4,D4=2},"clear"),d4e={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},p4e={FILLED:0,OPEN:1},m4e={LEFTOF:0,RIGHTOF:1,OVER:2},g4e=o(function(t){sS=qr(t,de())},"setTitle"),hy={addPersonOrSystem:Wbe,addPersonOrSystemBoundary:jbe,addContainer:qbe,addContainerBoundary:Kbe,addComponent:Xbe,addDeploymentNode:Qbe,popBoundaryParseStack:Zbe,addRel:Ybe,updateElStyle:Jbe,updateRelStyle:e4e,updateLayoutConfig:t4e,autoWrap:xh,setWrap:h4e,getC4ShapeArray:M$,getC4Shape:s4e,getC4ShapeKeys:o4e,getBoundaries:I$,getBoundarys:l4e,getCurrentBoundaryParse:i4e,getParentBoundaryParse:a4e,getRels:c4e,getTitle:u4e,getC4Type:Ube,getC4ShapeInRow:r4e,getC4BoundaryInRow:n4e,setAccTitle:kr,getAccTitle:Ar,getAccDescription:Lr,setAccDescription:_r,getConfig:o(()=>de().c4,"getConfig"),clear:f4e,LINETYPE:d4e,ARROWTYPE:p4e,PLACEMENT:m4e,setTitle:g4e,setC4Type:Hbe}});function ed(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}var cS=R(()=>{"use strict";o(ed,"ascending")});function uS(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}var O$=R(()=>{"use strict";o(uS,"descending")});function td(t){let e,r,n;t.length!==2?(e=ed,r=o((l,u)=>ed(t(l),u),"compare2"),n=o((l,u)=>t(l)-u,"delta")):(e=t===ed||t===uS?t:y4e,r=t,n=t);function i(l,u,h=0,f=l.length){if(h<f){if(e(u,u)!==0)return f;do{let d=h+f>>>1;r(l[d],u)<0?h=d+1:f=d}while(h<f)}return h}o(i,"left");function a(l,u,h=0,f=l.length){if(h<f){if(e(u,u)!==0)return f;do{let d=h+f>>>1;r(l[d],u)<=0?h=d+1:f=d}while(h<f)}return h}o(a,"right");function s(l,u,h=0,f=l.length){let d=i(l,u,h,f-1);return d>h&&n(l[d-1],u)>-n(l[d],u)?d-1:d}return o(s,"center"),{left:i,center:s,right:a}}function y4e(){return 0}var hS=R(()=>{"use strict";cS();O$();o(td,"bisector");o(y4e,"zero")});function fS(t){return t===null?NaN:+t}var P$=R(()=>{"use strict";o(fS,"number")});var B$,F$,v4e,x4e,dS,z$=R(()=>{"use strict";cS();hS();P$();B$=td(ed),F$=B$.right,v4e=B$.left,x4e=td(fS).center,dS=F$});function G$({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function b4e({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function w4e({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function T4e(t){return t!==null&&typeof t=="object"?t.valueOf():t}var wp,$$=R(()=>{"use strict";wp=class extends Map{static{o(this,"InternMap")}constructor(e,r=T4e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(G$(this,e))}has(e){return super.has(G$(this,e))}set(e,r){return super.set(b4e(this,e),r)}delete(e){return super.delete(w4e(this,e))}};o(G$,"intern_get");o(b4e,"intern_set");o(w4e,"intern_delete");o(T4e,"keyof")});function R4(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=k4e?10:a>=E4e?5:a>=C4e?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/s,l=Math.round(t*h),u=Math.round(e*h),l/h<t&&++l,u/h>e&&--u,h=-h):(h=Math.pow(10,i)*s,l=Math.round(t/h),u=Math.round(e/h),l*h<t&&++l,u*h>e&&--u),u<l&&.5<=r&&r<2?R4(t,e,r*2):[l,u,h]}function N4(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];let n=e<t,[i,a,s]=n?R4(e,t,r):R4(t,e,r);if(!(a>=i))return[];let l=a-i+1,u=new Array(l);if(n)if(s<0)for(let h=0;h<l;++h)u[h]=(a-h)/-s;else for(let h=0;h<l;++h)u[h]=(a-h)*s;else if(s<0)for(let h=0;h<l;++h)u[h]=(i+h)/-s;else for(let h=0;h<l;++h)u[h]=(i+h)*s;return u}function fy(t,e,r){return e=+e,t=+t,r=+r,R4(t,e,r)[2]}function Tp(t,e,r){e=+e,t=+t,r=+r;let n=e<t,i=n?fy(e,t,r):fy(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}var k4e,E4e,C4e,V$=R(()=>{"use strict";k4e=Math.sqrt(50),E4e=Math.sqrt(10),C4e=Math.sqrt(2);o(R4,"tickSpec");o(N4,"ticks");o(fy,"tickIncrement");o(Tp,"tickStep")});function M4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}var U$=R(()=>{"use strict";o(M4,"max")});function I4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var H$=R(()=>{"use strict";o(I4,"min")});function O4(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}var Y$=R(()=>{"use strict";o(O4,"range")});var bh=R(()=>{"use strict";z$();hS();U$();H$();Y$();V$();$$()});function pS(t){return t}var W$=R(()=>{"use strict";o(pS,"default")});function S4e(t){return"translate("+t+",0)"}function A4e(t){return"translate(0,"+t+")"}function _4e(t){return e=>+t(e)}function L4e(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function D4e(){return!this.__axis}function X$(t,e){var r=[],n=null,i=null,a=6,s=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===B4||t===P4?-1:1,f=t===P4||t===mS?"x":"y",d=t===B4||t===gS?S4e:A4e;function p(m){var g=n??(e.ticks?e.ticks.apply(e,r):e.domain()),y=i??(e.tickFormat?e.tickFormat.apply(e,r):pS),v=Math.max(a,0)+l,x=e.range(),b=+x[0]+u,w=+x[x.length-1]+u,S=(e.bandwidth?L4e:_4e)(e.copy(),u),T=m.selection?m.selection():m,E=T.selectAll(".domain").data([null]),_=T.selectAll(".tick").data(g,e).order(),A=_.exit(),L=_.enter().append("g").attr("class","tick"),M=_.select("line"),N=_.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(L),M=M.merge(L.append("line").attr("stroke","currentColor").attr(f+"2",h*a)),N=N.merge(L.append("text").attr("fill","currentColor").attr(f,h*v).attr("dy",t===B4?"0em":t===gS?"0.71em":"0.32em")),m!==T&&(E=E.transition(m),_=_.transition(m),M=M.transition(m),N=N.transition(m),A=A.transition(m).attr("opacity",q$).attr("transform",function(k){return isFinite(k=S(k))?d(k+u):this.getAttribute("transform")}),L.attr("opacity",q$).attr("transform",function(k){var I=this.parentNode.__axis;return d((I&&isFinite(I=I(k))?I:S(k))+u)})),A.remove(),E.attr("d",t===P4||t===mS?s?"M"+h*s+","+b+"H"+u+"V"+w+"H"+h*s:"M"+u+","+b+"V"+w:s?"M"+b+","+h*s+"V"+u+"H"+w+"V"+h*s:"M"+b+","+u+"H"+w),_.attr("opacity",1).attr("transform",function(k){return d(S(k)+u)}),M.attr(f+"2",h*a),N.attr(f,h*v).text(y),T.filter(D4e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===mS?"start":t===P4?"end":"middle"),T.each(function(){this.__axis=S})}return o(p,"axis"),p.scale=function(m){return arguments.length?(e=m,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(a=s=+m,p):a},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a},p.tickSizeOuter=function(m){return arguments.length?(s=+m,p):s},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function yS(t){return X$(B4,t)}function vS(t){return X$(gS,t)}var B4,mS,gS,P4,q$,j$=R(()=>{"use strict";W$();B4=1,mS=2,gS=3,P4=4,q$=1e-6;o(S4e,"translateX");o(A4e,"translateY");o(_4e,"number");o(L4e,"center");o(D4e,"entering");o(X$,"axis");o(yS,"axisTop");o(vS,"axisBottom")});var K$=R(()=>{"use strict";j$()});function Z$(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new F4(r)}function F4(t){this._=t}function N4e(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function M4e(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function Q$(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=R4e,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var R4e,xS,J$=R(()=>{"use strict";R4e={value:o(()=>{},"value")};o(Z$,"dispatch");o(F4,"Dispatch");o(N4e,"parseTypenames");F4.prototype=Z$.prototype={constructor:F4,on:o(function(t,e){var r=this._,n=N4e(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(t=n[a]).type)&&(i=M4e(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=n[a]).type)r[i]=Q$(r[i],t.name,e);else if(e==null)for(i in r)r[i]=Q$(r[i],t.name,null);return this},"on"),copy:o(function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new F4(t)},"copy"),call:o(function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],n=0,i=a.length;n<i;++n)a[n].value.apply(e,r)},"call"),apply:o(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)},"apply")};o(M4e,"get");o(Q$,"set");xS=Z$});var bS=R(()=>{"use strict";J$()});var z4,wS,TS=R(()=>{"use strict";z4="http://www.w3.org/1999/xhtml",wS={svg:"http://www.w3.org/2000/svg",xhtml:z4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function ic(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),wS.hasOwnProperty(e)?{space:wS[e],local:t}:t}var G4=R(()=>{"use strict";TS();o(ic,"default")});function I4e(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===z4&&e.documentElement.namespaceURI===z4?e.createElement(t):e.createElementNS(r,t)}}function O4e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function dy(t){var e=ic(t);return(e.local?O4e:I4e)(e)}var kS=R(()=>{"use strict";G4();TS();o(I4e,"creatorInherit");o(O4e,"creatorFixed");o(dy,"default")});function P4e(){}function wh(t){return t==null?P4e:function(){return this.querySelector(t)}}var $4=R(()=>{"use strict";o(P4e,"none");o(wh,"default")});function ES(t){typeof t!="function"&&(t=wh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,l=n[i]=new Array(s),u,h,f=0;f<s;++f)(u=a[f])&&(h=t.call(u,u.__data__,f,a))&&("__data__"in u&&(h.__data__=u.__data__),l[f]=h);return new Zn(n,this._parents)}var eV=R(()=>{"use strict";hl();$4();o(ES,"default")});function CS(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var tV=R(()=>{"use strict";o(CS,"array")});function B4e(){return[]}function kp(t){return t==null?B4e:function(){return this.querySelectorAll(t)}}var SS=R(()=>{"use strict";o(B4e,"empty");o(kp,"default")});function F4e(t){return function(){return CS(t.apply(this,arguments))}}function AS(t){typeof t=="function"?t=F4e(t):t=kp(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var s=e[a],l=s.length,u,h=0;h<l;++h)(u=s[h])&&(n.push(t.call(u,u.__data__,h,s)),i.push(u));return new Zn(n,i)}var rV=R(()=>{"use strict";hl();tV();SS();o(F4e,"arrayAll");o(AS,"default")});function Ep(t){return function(){return this.matches(t)}}function V4(t){return function(e){return e.matches(t)}}var py=R(()=>{"use strict";o(Ep,"default");o(V4,"childMatcher")});function G4e(t){return function(){return z4e.call(this.children,t)}}function $4e(){return this.firstElementChild}function _S(t){return this.select(t==null?$4e:G4e(typeof t=="function"?t:V4(t)))}var z4e,nV=R(()=>{"use strict";py();z4e=Array.prototype.find;o(G4e,"childFind");o($4e,"childFirst");o(_S,"default")});function U4e(){return Array.from(this.children)}function H4e(t){return function(){return V4e.call(this.children,t)}}function LS(t){return this.selectAll(t==null?U4e:H4e(typeof t=="function"?t:V4(t)))}var V4e,iV=R(()=>{"use strict";py();V4e=Array.prototype.filter;o(U4e,"children");o(H4e,"childrenFilter");o(LS,"default")});function DS(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,l=n[i]=[],u,h=0;h<s;++h)(u=a[h])&&t.call(u,u.__data__,h,a)&&l.push(u);return new Zn(n,this._parents)}var aV=R(()=>{"use strict";hl();py();o(DS,"default")});function my(t){return new Array(t.length)}var RS=R(()=>{"use strict";o(my,"default")});function NS(){return new Zn(this._enter||this._groups.map(my),this._parents)}function gy(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var MS=R(()=>{"use strict";RS();hl();o(NS,"default");o(gy,"EnterNode");gy.prototype={constructor:gy,appendChild:o(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:o(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:o(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:o(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function IS(t){return function(){return t}}var sV=R(()=>{"use strict";o(IS,"default")});function Y4e(t,e,r,n,i,a){for(var s=0,l,u=e.length,h=a.length;s<h;++s)(l=e[s])?(l.__data__=a[s],n[s]=l):r[s]=new gy(t,a[s]);for(;s<u;++s)(l=e[s])&&(i[s]=l)}function W4e(t,e,r,n,i,a,s){var l,u,h=new Map,f=e.length,d=a.length,p=new Array(f),m;for(l=0;l<f;++l)(u=e[l])&&(p[l]=m=s.call(u,u.__data__,l,e)+"",h.has(m)?i[l]=u:h.set(m,u));for(l=0;l<d;++l)m=s.call(t,a[l],l,a)+"",(u=h.get(m))?(n[l]=u,u.__data__=a[l],h.delete(m)):r[l]=new gy(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&h.get(p[l])===u&&(i[l]=u)}function q4e(t){return t.__data__}function OS(t,e){if(!arguments.length)return Array.from(this,q4e);var r=e?W4e:Y4e,n=this._parents,i=this._groups;typeof t!="function"&&(t=IS(t));for(var a=i.length,s=new Array(a),l=new Array(a),u=new Array(a),h=0;h<a;++h){var f=n[h],d=i[h],p=d.length,m=X4e(t.call(f,f&&f.__data__,h,n)),g=m.length,y=l[h]=new Array(g),v=s[h]=new Array(g),x=u[h]=new Array(p);r(f,d,y,v,x,m,e);for(var b=0,w=0,S,T;b<g;++b)if(S=y[b]){for(b>=w&&(w=b+1);!(T=v[w])&&++w<g;);S._next=T||null}}return s=new Zn(s,n),s._enter=l,s._exit=u,s}function X4e(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var oV=R(()=>{"use strict";hl();MS();sV();o(Y4e,"bindIndex");o(W4e,"bindKey");o(q4e,"datum");o(OS,"default");o(X4e,"arraylike")});function PS(){return new Zn(this._exit||this._groups.map(my),this._parents)}var lV=R(()=>{"use strict";RS();hl();o(PS,"default")});function BS(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var cV=R(()=>{"use strict";o(BS,"default")});function FS(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),l=new Array(i),u=0;u<s;++u)for(var h=r[u],f=n[u],d=h.length,p=l[u]=new Array(d),m,g=0;g<d;++g)(m=h[g]||f[g])&&(p[g]=m);for(;u<i;++u)l[u]=r[u];return new Zn(l,this._parents)}var uV=R(()=>{"use strict";hl();o(FS,"default")});function zS(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var hV=R(()=>{"use strict";o(zS,"default")});function GS(t){t||(t=j4e);function e(d,p){return d&&p?t(d.__data__,p.__data__):!d-!p}o(e,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],l=s.length,u=i[a]=new Array(l),h,f=0;f<l;++f)(h=s[f])&&(u[f]=h);u.sort(e)}return new Zn(i,this._parents).order()}function j4e(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var fV=R(()=>{"use strict";hl();o(GS,"default");o(j4e,"ascending")});function $S(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var dV=R(()=>{"use strict";o($S,"default")});function VS(){return Array.from(this)}var pV=R(()=>{"use strict";o(VS,"default")});function US(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}var mV=R(()=>{"use strict";o(US,"default")});function HS(){let t=0;for(let e of this)++t;return t}var gV=R(()=>{"use strict";o(HS,"default")});function YS(){return!this.node()}var yV=R(()=>{"use strict";o(YS,"default")});function WS(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,s=i.length,l;a<s;++a)(l=i[a])&&t.call(l,l.__data__,a,i);return this}var vV=R(()=>{"use strict";o(WS,"default")});function K4e(t){return function(){this.removeAttribute(t)}}function Q4e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Z4e(t,e){return function(){this.setAttribute(t,e)}}function J4e(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function e3e(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function t3e(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)}}function qS(t,e){var r=ic(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?Q4e:K4e:typeof e=="function"?r.local?t3e:e3e:r.local?J4e:Z4e)(r,e))}var xV=R(()=>{"use strict";G4();o(K4e,"attrRemove");o(Q4e,"attrRemoveNS");o(Z4e,"attrConstant");o(J4e,"attrConstantNS");o(e3e,"attrFunction");o(t3e,"attrFunctionNS");o(qS,"default")});function yy(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var XS=R(()=>{"use strict";o(yy,"default")});function r3e(t){return function(){this.style.removeProperty(t)}}function n3e(t,e,r){return function(){this.style.setProperty(t,e,r)}}function i3e(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function jS(t,e,r){return arguments.length>1?this.each((e==null?r3e:typeof e=="function"?i3e:n3e)(t,e,r??"")):Th(this.node(),t)}function Th(t,e){return t.style.getPropertyValue(e)||yy(t).getComputedStyle(t,null).getPropertyValue(e)}var KS=R(()=>{"use strict";XS();o(r3e,"styleRemove");o(n3e,"styleConstant");o(i3e,"styleFunction");o(jS,"default");o(Th,"styleValue")});function a3e(t){return function(){delete this[t]}}function s3e(t,e){return function(){this[t]=e}}function o3e(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function QS(t,e){return arguments.length>1?this.each((e==null?a3e:typeof e=="function"?o3e:s3e)(t,e)):this.node()[t]}var bV=R(()=>{"use strict";o(a3e,"propertyRemove");o(s3e,"propertyConstant");o(o3e,"propertyFunction");o(QS,"default")});function wV(t){return t.trim().split(/^|\s+/)}function ZS(t){return t.classList||new TV(t)}function TV(t){this._node=t,this._names=wV(t.getAttribute("class")||"")}function kV(t,e){for(var r=ZS(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function EV(t,e){for(var r=ZS(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function l3e(t){return function(){kV(this,t)}}function c3e(t){return function(){EV(this,t)}}function u3e(t,e){return function(){(e.apply(this,arguments)?kV:EV)(this,t)}}function JS(t,e){var r=wV(t+"");if(arguments.length<2){for(var n=ZS(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?u3e:e?l3e:c3e)(r,e))}var CV=R(()=>{"use strict";o(wV,"classArray");o(ZS,"classList");o(TV,"ClassList");TV.prototype={add:o(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:o(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:o(function(t){return this._names.indexOf(t)>=0},"contains")};o(kV,"classedAdd");o(EV,"classedRemove");o(l3e,"classedTrue");o(c3e,"classedFalse");o(u3e,"classedFunction");o(JS,"default")});function h3e(){this.textContent=""}function f3e(t){return function(){this.textContent=t}}function d3e(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function eA(t){return arguments.length?this.each(t==null?h3e:(typeof t=="function"?d3e:f3e)(t)):this.node().textContent}var SV=R(()=>{"use strict";o(h3e,"textRemove");o(f3e,"textConstant");o(d3e,"textFunction");o(eA,"default")});function p3e(){this.innerHTML=""}function m3e(t){return function(){this.innerHTML=t}}function g3e(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function tA(t){return arguments.length?this.each(t==null?p3e:(typeof t=="function"?g3e:m3e)(t)):this.node().innerHTML}var AV=R(()=>{"use strict";o(p3e,"htmlRemove");o(m3e,"htmlConstant");o(g3e,"htmlFunction");o(tA,"default")});function y3e(){this.nextSibling&&this.parentNode.appendChild(this)}function rA(){return this.each(y3e)}var _V=R(()=>{"use strict";o(y3e,"raise");o(rA,"default")});function v3e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function nA(){return this.each(v3e)}var LV=R(()=>{"use strict";o(v3e,"lower");o(nA,"default")});function iA(t){var e=typeof t=="function"?t:dy(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var DV=R(()=>{"use strict";kS();o(iA,"default")});function x3e(){return null}function aA(t,e){var r=typeof t=="function"?t:dy(t),n=e==null?x3e:typeof e=="function"?e:wh(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var RV=R(()=>{"use strict";kS();$4();o(x3e,"constantNull");o(aA,"default")});function b3e(){var t=this.parentNode;t&&t.removeChild(this)}function sA(){return this.each(b3e)}var NV=R(()=>{"use strict";o(b3e,"remove");o(sA,"default")});function w3e(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function T3e(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oA(t){return this.select(t?T3e:w3e)}var MV=R(()=>{"use strict";o(w3e,"selection_cloneShallow");o(T3e,"selection_cloneDeep");o(oA,"default")});function lA(t){return arguments.length?this.property("__data__",t):this.node().__data__}var IV=R(()=>{"use strict";o(lA,"default")});function k3e(t){return function(e){t.call(this,e,this.__data__)}}function E3e(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function C3e(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r<i;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++n]=a;++n?e.length=n:delete this.__on}}}function S3e(t,e,r){return function(){var n=this.__on,i,a=k3e(e);if(n){for(var s=0,l=n.length;s<l;++s)if((i=n[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function cA(t,e,r){var n=E3e(t+""),i,a=n.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,h=l.length,f;u<h;++u)for(i=0,f=l[u];i<a;++i)if((s=n[i]).type===f.type&&s.name===f.name)return f.value}return}for(l=e?S3e:C3e,i=0;i<a;++i)this.each(l(n[i],e,r));return this}var OV=R(()=>{"use strict";o(k3e,"contextListener");o(E3e,"parseTypenames");o(C3e,"onRemove");o(S3e,"onAdd");o(cA,"default")});function PV(t,e,r){var n=yy(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function A3e(t,e){return function(){return PV(this,t,e)}}function _3e(t,e){return function(){return PV(this,t,e.apply(this,arguments))}}function uA(t,e){return this.each((typeof e=="function"?_3e:A3e)(t,e))}var BV=R(()=>{"use strict";XS();o(PV,"dispatchEvent");o(A3e,"dispatchConstant");o(_3e,"dispatchFunction");o(uA,"default")});function*hA(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s)}var FV=R(()=>{"use strict";o(hA,"default")});function Zn(t,e){this._groups=t,this._parents=e}function zV(){return new Zn([[document.documentElement]],fA)}function L3e(){return this}var fA,cu,hl=R(()=>{"use strict";eV();rV();nV();iV();aV();oV();MS();lV();cV();uV();hV();fV();dV();pV();mV();gV();yV();vV();xV();KS();bV();CV();SV();AV();_V();LV();DV();RV();NV();MV();IV();OV();BV();FV();fA=[null];o(Zn,"Selection");o(zV,"selection");o(L3e,"selection_selection");Zn.prototype=zV.prototype={constructor:Zn,select:ES,selectAll:AS,selectChild:_S,selectChildren:LS,filter:DS,data:OS,enter:NS,exit:PS,join:BS,merge:FS,selection:L3e,order:zS,sort:GS,call:$S,nodes:VS,node:US,size:HS,empty:YS,each:WS,attr:qS,style:jS,property:QS,classed:JS,text:eA,html:tA,raise:rA,lower:nA,append:iA,insert:aA,remove:sA,clone:oA,datum:lA,on:cA,dispatch:uA,[Symbol.iterator]:hA};cu=zV});function $e(t){return typeof t=="string"?new Zn([[document.querySelector(t)]],[document.documentElement]):new Zn([[t]],fA)}var GV=R(()=>{"use strict";hl();o($e,"default")});var fl=R(()=>{"use strict";py();G4();GV();hl();$4();SS();KS()});var $V=R(()=>{"use strict"});function kh(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Cp(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var dA=R(()=>{"use strict";o(kh,"default");o(Cp,"extend")});function Eh(){}function UV(){return this.rgb().formatHex()}function B3e(){return this.rgb().formatHex8()}function F3e(){return KV(this).formatHsl()}function HV(){return this.rgb().formatRgb()}function pl(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=D3e.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?YV(e):r===3?new la(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?U4(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?U4(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=R3e.exec(t))?new la(e[1],e[2],e[3],1):(e=N3e.exec(t))?new la(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=M3e.exec(t))?U4(e[1],e[2],e[3],e[4]):(e=I3e.exec(t))?U4(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=O3e.exec(t))?XV(e[1],e[2]/100,e[3]/100,1):(e=P3e.exec(t))?XV(e[1],e[2]/100,e[3]/100,e[4]):VV.hasOwnProperty(t)?YV(VV[t]):t==="transparent"?new la(NaN,NaN,NaN,0):null}function YV(t){return new la(t>>16&255,t>>8&255,t&255,1)}function U4(t,e,r,n){return n<=0&&(t=e=r=NaN),new la(t,e,r,n)}function mA(t){return t instanceof Eh||(t=pl(t)),t?(t=t.rgb(),new la(t.r,t.g,t.b,t.opacity)):new la}function Ap(t,e,r,n){return arguments.length===1?mA(t):new la(t,e,r,n??1)}function la(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function WV(){return`#${rd(this.r)}${rd(this.g)}${rd(this.b)}`}function z3e(){return`#${rd(this.r)}${rd(this.g)}${rd(this.b)}${rd((isNaN(this.opacity)?1:this.opacity)*255)}`}function qV(){let t=W4(this.opacity);return`${t===1?"rgb(":"rgba("}${nd(this.r)}, ${nd(this.g)}, ${nd(this.b)}${t===1?")":`, ${t})`}`}function W4(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function nd(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rd(t){return t=nd(t),(t<16?"0":"")+t.toString(16)}function XV(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new dl(t,e,r,n)}function KV(t){if(t instanceof dl)return new dl(t.h,t.s,t.l,t.opacity);if(t instanceof Eh||(t=pl(t)),!t)return new dl;if(t instanceof dl)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,l=a-i,u=(a+i)/2;return l?(e===a?s=(r-n)/l+(r<n)*6:r===a?s=(n-e)/l+2:s=(e-r)/l+4,l/=u<.5?a+i:2-a-i,s*=60):l=u>0&&u<1?0:s,new dl(s,l,u,t.opacity)}function QV(t,e,r,n){return arguments.length===1?KV(t):new dl(t,e,r,n??1)}function dl(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function jV(t){return t=(t||0)%360,t<0?t+360:t}function H4(t){return Math.max(0,Math.min(1,t||0))}function pA(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var vy,Y4,Sp,xy,ac,D3e,R3e,N3e,M3e,I3e,O3e,P3e,VV,gA=R(()=>{"use strict";dA();o(Eh,"Color");vy=.7,Y4=1/vy,Sp="\\s*([+-]?\\d+)\\s*",xy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ac="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",D3e=/^#([0-9a-f]{3,8})$/,R3e=new RegExp(`^rgb\\(${Sp},${Sp},${Sp}\\)$`),N3e=new RegExp(`^rgb\\(${ac},${ac},${ac}\\)$`),M3e=new RegExp(`^rgba\\(${Sp},${Sp},${Sp},${xy}\\)$`),I3e=new RegExp(`^rgba\\(${ac},${ac},${ac},${xy}\\)$`),O3e=new RegExp(`^hsl\\(${xy},${ac},${ac}\\)$`),P3e=new RegExp(`^hsla\\(${xy},${ac},${ac},${xy}\\)$`),VV={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};kh(Eh,pl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:UV,formatHex:UV,formatHex8:B3e,formatHsl:F3e,formatRgb:HV,toString:HV});o(UV,"color_formatHex");o(B3e,"color_formatHex8");o(F3e,"color_formatHsl");o(HV,"color_formatRgb");o(pl,"color");o(YV,"rgbn");o(U4,"rgba");o(mA,"rgbConvert");o(Ap,"rgb");o(la,"Rgb");kh(la,Ap,Cp(Eh,{brighter(t){return t=t==null?Y4:Math.pow(Y4,t),new la(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?vy:Math.pow(vy,t),new la(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new la(nd(this.r),nd(this.g),nd(this.b),W4(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:WV,formatHex:WV,formatHex8:z3e,formatRgb:qV,toString:qV}));o(WV,"rgb_formatHex");o(z3e,"rgb_formatHex8");o(qV,"rgb_formatRgb");o(W4,"clampa");o(nd,"clampi");o(rd,"hex");o(XV,"hsla");o(KV,"hslConvert");o(QV,"hsl");o(dl,"Hsl");kh(dl,QV,Cp(Eh,{brighter(t){return t=t==null?Y4:Math.pow(Y4,t),new dl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?vy:Math.pow(vy,t),new dl(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,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new la(pA(t>=240?t-240:t+120,i,n),pA(t,i,n),pA(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new dl(jV(this.h),H4(this.s),H4(this.l),W4(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=W4(this.opacity);return`${t===1?"hsl(":"hsla("}${jV(this.h)}, ${H4(this.s)*100}%, ${H4(this.l)*100}%${t===1?")":`, ${t})`}`}}));o(jV,"clamph");o(H4,"clampt");o(pA,"hsl2rgb")});var ZV,JV,eU=R(()=>{"use strict";ZV=Math.PI/180,JV=180/Math.PI});function sU(t){if(t instanceof sc)return new sc(t.l,t.a,t.b,t.opacity);if(t instanceof uu)return oU(t);t instanceof la||(t=mA(t));var e=bA(t.r),r=bA(t.g),n=bA(t.b),i=yA((.2225045*e+.7168786*r+.0606169*n)/rU),a,s;return e===r&&r===n?a=s=i:(a=yA((.4360747*e+.3850649*r+.1430804*n)/tU),s=yA((.0139322*e+.0971045*r+.7141733*n)/nU)),new sc(116*i-16,500*(a-i),200*(i-s),t.opacity)}function wA(t,e,r,n){return arguments.length===1?sU(t):new sc(t,e,r,n??1)}function sc(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function yA(t){return t>G3e?Math.pow(t,1/3):t/aU+iU}function vA(t){return t>_p?t*t*t:aU*(t-iU)}function xA(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function bA(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function $3e(t){if(t instanceof uu)return new uu(t.h,t.c,t.l,t.opacity);if(t instanceof sc||(t=sU(t)),t.a===0&&t.b===0)return new uu(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*JV;return new uu(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function by(t,e,r,n){return arguments.length===1?$3e(t):new uu(t,e,r,n??1)}function uu(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function oU(t){if(isNaN(t.h))return new sc(t.l,0,0,t.opacity);var e=t.h*ZV;return new sc(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}var q4,tU,rU,nU,iU,_p,aU,G3e,lU=R(()=>{"use strict";dA();gA();eU();q4=18,tU=.96422,rU=1,nU=.82521,iU=4/29,_p=6/29,aU=3*_p*_p,G3e=_p*_p*_p;o(sU,"labConvert");o(wA,"lab");o(sc,"Lab");kh(sc,wA,Cp(Eh,{brighter(t){return new sc(this.l+q4*(t??1),this.a,this.b,this.opacity)},darker(t){return new sc(this.l-q4*(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=tU*vA(e),t=rU*vA(t),r=nU*vA(r),new la(xA(3.1338561*e-1.6168667*t-.4906146*r),xA(-.9787684*e+1.9161415*t+.033454*r),xA(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));o(yA,"xyz2lab");o(vA,"lab2xyz");o(xA,"lrgb2rgb");o(bA,"rgb2lrgb");o($3e,"hclConvert");o(by,"hcl");o(uu,"Hcl");o(oU,"hcl2lab");kh(uu,by,Cp(Eh,{brighter(t){return new uu(this.h,this.c,this.l+q4*(t??1),this.opacity)},darker(t){return new uu(this.h,this.c,this.l-q4*(t??1),this.opacity)},rgb(){return oU(this).rgb()}}))});var Lp=R(()=>{"use strict";gA();lU()});function TA(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function kA(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,l=n<e-1?t[n+2]:2*a-i;return TA((r-n/e)*e,s,i,a,l)}}var EA=R(()=>{"use strict";o(TA,"basis");o(kA,"default")});function CA(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],l=t[(n+2)%e];return TA((r-n/e)*e,i,a,s,l)}}var cU=R(()=>{"use strict";EA();o(CA,"default")});var Dp,SA=R(()=>{"use strict";Dp=o(t=>()=>t,"default")});function uU(t,e){return function(r){return t+r*e}}function V3e(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function hU(t,e){var r=e-t;return r?uU(t,r>180||r<-180?r-360*Math.round(r/360):r):Dp(isNaN(t)?e:t)}function fU(t){return(t=+t)==1?hu:function(e,r){return r-e?V3e(e,r,t):Dp(isNaN(e)?r:e)}}function hu(t,e){var r=e-t;return r?uU(t,r):Dp(isNaN(t)?e:t)}var AA=R(()=>{"use strict";SA();o(uU,"linear");o(V3e,"exponential");o(hU,"hue");o(fU,"gamma");o(hu,"nogamma")});function dU(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,l;for(s=0;s<r;++s)l=Ap(e[s]),n[s]=l.r||0,i[s]=l.g||0,a[s]=l.b||0;return n=t(n),i=t(i),a=t(a),l.opacity=1,function(u){return l.r=n(u),l.g=i(u),l.b=a(u),l+""}}}var id,U3e,H3e,_A=R(()=>{"use strict";Lp();EA();cU();AA();id=o(function t(e){var r=fU(e);function n(i,a){var s=r((i=Ap(i)).r,(a=Ap(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),h=hu(i.opacity,a.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=u(f),i.opacity=h(f),i+""}}return o(n,"rgb"),n.gamma=t,n},"rgbGamma")(1);o(dU,"rgbSpline");U3e=dU(kA),H3e=dU(CA)});function LA(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function pU(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var mU=R(()=>{"use strict";o(LA,"default");o(pU,"isNumberArray")});function gU(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Ch(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(l){for(s=0;s<n;++s)a[s]=i[s](l);return a}}var yU=R(()=>{"use strict";X4();o(gU,"genericArray")});function DA(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var vU=R(()=>{"use strict";o(DA,"default")});function ji(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var wy=R(()=>{"use strict";o(ji,"default")});function RA(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Ch(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var xU=R(()=>{"use strict";X4();o(RA,"default")});function Y3e(t){return function(){return t}}function W3e(t){return function(e){return t(e)+""}}function Rp(t,e){var r=MA.lastIndex=NA.lastIndex=0,n,i,a,s=-1,l=[],u=[];for(t=t+"",e=e+"";(n=MA.exec(t))&&(i=NA.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(n=n[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,u.push({i:s,x:ji(n,i)})),r=NA.lastIndex;return r<e.length&&(a=e.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?u[0]?W3e(u[0].x):Y3e(e):(e=u.length,function(h){for(var f=0,d;f<e;++f)l[(d=u[f]).i]=d.x(h);return l.join("")})}var MA,NA,IA=R(()=>{"use strict";wy();MA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,NA=new RegExp(MA.source,"g");o(Y3e,"zero");o(W3e,"one");o(Rp,"default")});function Ch(t,e){var r=typeof e,n;return e==null||r==="boolean"?Dp(e):(r==="number"?ji:r==="string"?(n=pl(e))?(e=n,id):Rp:e instanceof pl?id:e instanceof Date?DA:pU(e)?LA:Array.isArray(e)?gU:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?RA:ji)(t,e)}var X4=R(()=>{"use strict";Lp();_A();yU();vU();wy();xU();IA();SA();mU();o(Ch,"default")});function j4(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var bU=R(()=>{"use strict";o(j4,"default")});function Q4(t,e,r,n,i,a){var s,l,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),t*n<e*r&&(t=-t,e=-e,u=-u,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*wU,skewX:Math.atan(u)*wU,scaleX:s,scaleY:l}}var wU,K4,TU=R(()=>{"use strict";wU=180/Math.PI,K4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};o(Q4,"default")});function kU(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?K4:Q4(e.a,e.b,e.c,e.d,e.e,e.f)}function EU(t){return t==null?K4:(Z4||(Z4=document.createElementNS("http://www.w3.org/2000/svg","g")),Z4.setAttribute("transform",t),(t=Z4.transform.baseVal.consolidate())?(t=t.matrix,Q4(t.a,t.b,t.c,t.d,t.e,t.f)):K4)}var Z4,CU=R(()=>{"use strict";TU();o(kU,"parseCss");o(EU,"parseSvg")});function SU(t,e,r,n){function i(h){return h.length?h.pop()+" ":""}o(i,"pop");function a(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push("translate(",null,e,null,r);g.push({i:y-4,x:ji(h,d)},{i:y-2,x:ji(f,p)})}else(d||p)&&m.push("translate("+d+e+p+r)}o(a,"translate");function s(h,f,d,p){h!==f?(h-f>180?f+=360:f-h>180&&(h+=360),p.push({i:d.push(i(d)+"rotate(",null,n)-2,x:ji(h,f)})):f&&d.push(i(d)+"rotate("+f+n)}o(s,"rotate");function l(h,f,d,p){h!==f?p.push({i:d.push(i(d)+"skewX(",null,n)-2,x:ji(h,f)}):f&&d.push(i(d)+"skewX("+f+n)}o(l,"skewX");function u(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:ji(h,d)},{i:y-2,x:ji(f,p)})}else(d!==1||p!==1)&&m.push(i(m)+"scale("+d+","+p+")")}return o(u,"scale"),function(h,f){var d=[],p=[];return h=t(h),f=t(f),a(h.translateX,h.translateY,f.translateX,f.translateY,d,p),s(h.rotate,f.rotate,d,p),l(h.skewX,f.skewX,d,p),u(h.scaleX,h.scaleY,f.scaleX,f.scaleY,d,p),h=f=null,function(m){for(var g=-1,y=p.length,v;++g<y;)d[(v=p[g]).i]=v.x(m);return d.join("")}}}var OA,PA,AU=R(()=>{"use strict";wy();CU();o(SU,"interpolateTransform");OA=SU(kU,"px, ","px)","deg)"),PA=SU(EU,", ",")",")")});function _U(t){return function(e,r){var n=t((e=by(e)).h,(r=by(r)).h),i=hu(e.c,r.c),a=hu(e.l,r.l),s=hu(e.opacity,r.opacity);return function(l){return e.h=n(l),e.c=i(l),e.l=a(l),e.opacity=s(l),e+""}}}var BA,q3e,LU=R(()=>{"use strict";Lp();AA();o(_U,"hcl");BA=_U(hU),q3e=_U(hu)});var Np=R(()=>{"use strict";X4();wy();bU();IA();AU();_A();LU()});function Ay(){return ad||(NU(X3e),ad=Cy.now()+t3)}function X3e(){ad=0}function Sy(){this._call=this._time=this._next=null}function r3(t,e,r){var n=new Sy;return n.restart(t,e,r),n}function MU(){Ay(),++Mp;for(var t=J4,e;t;)(e=ad-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Mp}function DU(){ad=(e3=Cy.now())+t3,Mp=ky=0;try{MU()}finally{Mp=0,K3e(),ad=0}}function j3e(){var t=Cy.now(),e=t-e3;e>RU&&(t3-=e,e3=t)}function K3e(){for(var t,e=J4,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:J4=r);Ey=t,FA(n)}function FA(t){if(!Mp){ky&&(ky=clearTimeout(ky));var e=t-ad;e>24?(t<1/0&&(ky=setTimeout(DU,t-Cy.now()-t3)),Ty&&(Ty=clearInterval(Ty))):(Ty||(e3=Cy.now(),Ty=setInterval(j3e,RU)),Mp=1,NU(DU))}}var Mp,ky,Ty,RU,J4,Ey,e3,ad,t3,Cy,NU,zA=R(()=>{"use strict";Mp=0,ky=0,Ty=0,RU=1e3,e3=0,ad=0,t3=0,Cy=typeof performance=="object"&&performance.now?performance:Date,NU=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};o(Ay,"now");o(X3e,"clearNow");o(Sy,"Timer");Sy.prototype=r3.prototype={constructor:Sy,restart:o(function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Ay():+r)+(e==null?0:+e),!this._next&&Ey!==this&&(Ey?Ey._next=this:J4=this,Ey=this),this._call=t,this._time=r,FA()},"restart"),stop:o(function(){this._call&&(this._call=null,this._time=1/0,FA())},"stop")};o(r3,"timer");o(MU,"timerFlush");o(DU,"wake");o(j3e,"poke");o(K3e,"nap");o(FA,"sleep")});function _y(t,e,r){var n=new Sy;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var IU=R(()=>{"use strict";zA();o(_y,"default")});var n3=R(()=>{"use strict";zA();IU()});function fu(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;J3e(t,r,{name:e,index:n,group:i,on:Q3e,tween:Z3e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:BU})}function Dy(t,e){var r=Mi(t,e);if(r.state>BU)throw new Error("too late; already scheduled");return r}function ca(t,e){var r=Mi(t,e);if(r.state>i3)throw new Error("too late; already running");return r}function Mi(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function J3e(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=r3(a,0,r.time);function a(h){r.state=OU,r.timer.restart(s,r.delay,r.time),r.delay<=h&&s(h-r.delay)}o(a,"schedule");function s(h){var f,d,p,m;if(r.state!==OU)return u();for(f in n)if(m=n[f],m.name===r.name){if(m.state===i3)return _y(s);m.state===PU?(m.state=Ly,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[f]):+f<e&&(m.state=Ly,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete n[f])}if(_y(function(){r.state===i3&&(r.state=PU,r.timer.restart(l,r.delay,r.time),l(h))}),r.state=a3,r.on.call("start",t,t.__data__,r.index,r.group),r.state===a3){for(r.state=i3,i=new Array(p=r.tween.length),f=0,d=-1;f<p;++f)(m=r.tween[f].value.call(t,t.__data__,r.index,r.group))&&(i[++d]=m);i.length=d+1}}o(s,"start");function l(h){for(var f=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(u),r.state=s3,1),d=-1,p=i.length;++d<p;)i[d].call(t,f);r.state===s3&&(r.on.call("end",t,t.__data__,r.index,r.group),u())}o(l,"tick");function u(){r.state=Ly,r.timer.stop(),delete n[e];for(var h in n)return;delete t.__transition}o(u,"stop")}var Q3e,Z3e,BU,OU,a3,i3,PU,s3,Ly,ys=R(()=>{"use strict";bS();n3();Q3e=xS("start","end","cancel","interrupt"),Z3e=[],BU=0,OU=1,a3=2,i3=3,PU=4,s3=5,Ly=6;o(fu,"default");o(Dy,"init");o(ca,"set");o(Mi,"get");o(J3e,"create")});function Ry(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>a3&&n.state<s3,n.state=Ly,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[s]}a&&delete t.__transition}}var FU=R(()=>{"use strict";ys();o(Ry,"default")});function GA(t){return this.each(function(){Ry(this,t)})}var zU=R(()=>{"use strict";FU();o(GA,"default")});function e5e(t,e){var r,n;return function(){var i=ca(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,l=n.length;s<l;++s)if(n[s].name===e){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function t5e(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=ca(this,t),s=a.tween;if(s!==n){i=(n=s).slice();for(var l={name:e,value:r},u=0,h=i.length;u<h;++u)if(i[u].name===e){i[u]=l;break}u===h&&i.push(l)}a.tween=i}}function $A(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Mi(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===t)return s.value;return null}return this.each((e==null?e5e:t5e)(r,t,e))}function Ip(t,e,r){var n=t._id;return t.each(function(){var i=ca(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return Mi(i,n).value[e]}}var Ny=R(()=>{"use strict";ys();o(e5e,"tweenRemove");o(t5e,"tweenFunction");o($A,"default");o(Ip,"tweenValue")});function My(t,e){var r;return(typeof e=="number"?ji:e instanceof pl?id:(r=pl(e))?(e=r,id):Rp)(t,e)}var VA=R(()=>{"use strict";Lp();Np();o(My,"default")});function r5e(t){return function(){this.removeAttribute(t)}}function n5e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function i5e(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function a5e(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function s5e(t,e,r){var n,i,a;return function(){var s,l=r(this),u;return l==null?void this.removeAttribute(t):(s=this.getAttribute(t),u=l+"",s===u?null:s===n&&u===i?a:(i=u,a=e(n=s,l)))}}function o5e(t,e,r){var n,i,a;return function(){var s,l=r(this),u;return l==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),u=l+"",s===u?null:s===n&&u===i?a:(i=u,a=e(n=s,l)))}}function UA(t,e){var r=ic(t),n=r==="transform"?PA:My;return this.attrTween(t,typeof e=="function"?(r.local?o5e:s5e)(r,n,Ip(this,"attr."+t,e)):e==null?(r.local?n5e:r5e)(r):(r.local?a5e:i5e)(r,n,e))}var GU=R(()=>{"use strict";Np();fl();Ny();VA();o(r5e,"attrRemove");o(n5e,"attrRemoveNS");o(i5e,"attrConstant");o(a5e,"attrConstantNS");o(s5e,"attrFunction");o(o5e,"attrFunctionNS");o(UA,"default")});function l5e(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function c5e(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function u5e(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&c5e(t,a)),r}return o(i,"tween"),i._value=e,i}function h5e(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&l5e(t,a)),r}return o(i,"tween"),i._value=e,i}function HA(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=ic(t);return this.tween(r,(n.local?u5e:h5e)(n,e))}var $U=R(()=>{"use strict";fl();o(l5e,"attrInterpolate");o(c5e,"attrInterpolateNS");o(u5e,"attrTweenNS");o(h5e,"attrTween");o(HA,"default")});function f5e(t,e){return function(){Dy(this,t).delay=+e.apply(this,arguments)}}function d5e(t,e){return e=+e,function(){Dy(this,t).delay=e}}function YA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?f5e:d5e)(e,t)):Mi(this.node(),e).delay}var VU=R(()=>{"use strict";ys();o(f5e,"delayFunction");o(d5e,"delayConstant");o(YA,"default")});function p5e(t,e){return function(){ca(this,t).duration=+e.apply(this,arguments)}}function m5e(t,e){return e=+e,function(){ca(this,t).duration=e}}function WA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?p5e:m5e)(e,t)):Mi(this.node(),e).duration}var UU=R(()=>{"use strict";ys();o(p5e,"durationFunction");o(m5e,"durationConstant");o(WA,"default")});function g5e(t,e){if(typeof e!="function")throw new Error;return function(){ca(this,t).ease=e}}function qA(t){var e=this._id;return arguments.length?this.each(g5e(e,t)):Mi(this.node(),e).ease}var HU=R(()=>{"use strict";ys();o(g5e,"easeConstant");o(qA,"default")});function y5e(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;ca(this,t).ease=r}}function XA(t){if(typeof t!="function")throw new Error;return this.each(y5e(this._id,t))}var YU=R(()=>{"use strict";ys();o(y5e,"easeVarying");o(XA,"default")});function jA(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,l=n[i]=[],u,h=0;h<s;++h)(u=a[h])&&t.call(u,u.__data__,h,a)&&l.push(u);return new Ka(n,this._parents,this._name,this._id)}var WU=R(()=>{"use strict";fl();sd();o(jA,"default")});function KA(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),l=0;l<a;++l)for(var u=e[l],h=r[l],f=u.length,d=s[l]=new Array(f),p,m=0;m<f;++m)(p=u[m]||h[m])&&(d[m]=p);for(;l<n;++l)s[l]=e[l];return new Ka(s,this._parents,this._name,this._id)}var qU=R(()=>{"use strict";sd();o(KA,"default")});function v5e(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function x5e(t,e,r){var n,i,a=v5e(e)?Dy:ca;return function(){var s=a(this,t),l=s.on;l!==n&&(i=(n=l).copy()).on(e,r),s.on=i}}function QA(t,e){var r=this._id;return arguments.length<2?Mi(this.node(),r).on.on(t):this.each(x5e(r,t,e))}var XU=R(()=>{"use strict";ys();o(v5e,"start");o(x5e,"onFunction");o(QA,"default")});function b5e(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function ZA(){return this.on("end.remove",b5e(this._id))}var jU=R(()=>{"use strict";o(b5e,"removeFunction");o(ZA,"default")});function JA(t){var e=this._name,r=this._id;typeof t!="function"&&(t=wh(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var l=n[s],u=l.length,h=a[s]=new Array(u),f,d,p=0;p<u;++p)(f=l[p])&&(d=t.call(f,f.__data__,p,l))&&("__data__"in f&&(d.__data__=f.__data__),h[p]=d,fu(h[p],e,r,p,h,Mi(f,r)));return new Ka(a,this._parents,e,r)}var KU=R(()=>{"use strict";fl();sd();ys();o(JA,"default")});function e8(t){var e=this._name,r=this._id;typeof t!="function"&&(t=kp(t));for(var n=this._groups,i=n.length,a=[],s=[],l=0;l<i;++l)for(var u=n[l],h=u.length,f,d=0;d<h;++d)if(f=u[d]){for(var p=t.call(f,f.__data__,d,u),m,g=Mi(f,r),y=0,v=p.length;y<v;++y)(m=p[y])&&fu(m,e,r,y,p,g);a.push(p),s.push(f)}return new Ka(a,s,e,r)}var QU=R(()=>{"use strict";fl();sd();ys();o(e8,"default")});function t8(){return new w5e(this._groups,this._parents)}var w5e,ZU=R(()=>{"use strict";fl();w5e=cu.prototype.constructor;o(t8,"default")});function T5e(t,e){var r,n,i;return function(){var a=Th(this,t),s=(this.style.removeProperty(t),Th(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function JU(t){return function(){this.style.removeProperty(t)}}function k5e(t,e,r){var n,i=r+"",a;return function(){var s=Th(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function E5e(t,e,r){var n,i,a;return function(){var s=Th(this,t),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(t),Th(this,t))),s===u?null:s===n&&u===i?a:(i=u,a=e(n=s,l))}}function C5e(t,e){var r,n,i,a="style."+e,s="end."+a,l;return function(){var u=ca(this,t),h=u.on,f=u.value[a]==null?l||(l=JU(e)):void 0;(h!==r||i!==f)&&(n=(r=h).copy()).on(s,i=f),u.on=n}}function r8(t,e,r){var n=(t+="")=="transform"?OA:My;return e==null?this.styleTween(t,T5e(t,n)).on("end.style."+t,JU(t)):typeof e=="function"?this.styleTween(t,E5e(t,n,Ip(this,"style."+t,e))).each(C5e(this._id,t)):this.styleTween(t,k5e(t,n,e),r).on("end.style."+t,null)}var eH=R(()=>{"use strict";Np();fl();ys();Ny();VA();o(T5e,"styleNull");o(JU,"styleRemove");o(k5e,"styleConstant");o(E5e,"styleFunction");o(C5e,"styleMaybeRemove");o(r8,"default")});function S5e(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function A5e(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&S5e(t,s,r)),n}return o(a,"tween"),a._value=e,a}function n8(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,A5e(t,e,r??""))}var tH=R(()=>{"use strict";o(S5e,"styleInterpolate");o(A5e,"styleTween");o(n8,"default")});function _5e(t){return function(){this.textContent=t}}function L5e(t){return function(){var e=t(this);this.textContent=e??""}}function i8(t){return this.tween("text",typeof t=="function"?L5e(Ip(this,"text",t)):_5e(t==null?"":t+""))}var rH=R(()=>{"use strict";Ny();o(_5e,"textConstant");o(L5e,"textFunction");o(i8,"default")});function D5e(t){return function(e){this.textContent=t.call(this,e)}}function R5e(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&D5e(i)),e}return o(n,"tween"),n._value=t,n}function a8(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,R5e(t))}var nH=R(()=>{"use strict";o(D5e,"textInterpolate");o(R5e,"textTween");o(a8,"default")});function s8(){for(var t=this._name,e=this._id,r=o3(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],l=s.length,u,h=0;h<l;++h)if(u=s[h]){var f=Mi(u,e);fu(u,t,r,h,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ka(n,this._parents,t,r)}var iH=R(()=>{"use strict";sd();ys();o(s8,"default")});function o8(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var l={value:s},u={value:o(function(){--i===0&&a()},"value")};r.each(function(){var h=ca(this,n),f=h.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),h.on=e}),i===0&&a()})}var aH=R(()=>{"use strict";ys();o(o8,"default")});function Ka(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function sH(t){return cu().transition(t)}function o3(){return++N5e}var N5e,du,sd=R(()=>{"use strict";fl();GU();$U();VU();UU();HU();YU();WU();qU();XU();jU();KU();QU();ZU();eH();tH();rH();nH();iH();Ny();aH();N5e=0;o(Ka,"Transition");o(sH,"transition");o(o3,"newId");du=cu.prototype;Ka.prototype=sH.prototype={constructor:Ka,select:JA,selectAll:e8,selectChild:du.selectChild,selectChildren:du.selectChildren,filter:jA,merge:KA,selection:t8,transition:s8,call:du.call,nodes:du.nodes,node:du.node,size:du.size,empty:du.empty,each:du.each,on:QA,attr:UA,attrTween:HA,style:r8,styleTween:n8,text:i8,textTween:a8,remove:ZA,tween:$A,delay:YA,duration:WA,ease:qA,easeVarying:XA,end:o8,[Symbol.iterator]:du[Symbol.iterator]}});function l3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var oH=R(()=>{"use strict";o(l3,"cubicInOut")});var l8=R(()=>{"use strict";oH()});function I5e(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function c8(t){var e,r;t instanceof Ka?(e=t._id,t=t._name):(e=o3(),(r=M5e).time=Ay(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],l=s.length,u,h=0;h<l;++h)(u=s[h])&&fu(u,t,e,h,s,r||I5e(u,e));return new Ka(n,this._parents,t,e)}var M5e,lH=R(()=>{"use strict";sd();ys();l8();n3();M5e={time:null,delay:0,duration:250,ease:l3};o(I5e,"inherit");o(c8,"default")});var cH=R(()=>{"use strict";fl();zU();lH();cu.prototype.interrupt=GA;cu.prototype.transition=c8});var c3=R(()=>{"use strict";cH()});var uH=R(()=>{"use strict"});var hH=R(()=>{"use strict"});var fH=R(()=>{"use strict"});function dH(t){return[+t[0],+t[1]]}function O5e(t){return[dH(t[0]),dH(t[1])]}function u8(t){return{type:t}}var Kpt,Qpt,Zpt,Jpt,emt,tmt,pH=R(()=>{"use strict";c3();uH();hH();fH();({abs:Kpt,max:Qpt,min:Zpt}=Math);o(dH,"number1");o(O5e,"number2");Jpt={name:"x",handles:["w","e"].map(u8),input:o(function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),output:o(function(t){return t&&[t[0][0],t[1][0]]},"output")},emt={name:"y",handles:["n","s"].map(u8),input:o(function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),output:o(function(t){return t&&[t[0][1],t[1][1]]},"output")},tmt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(u8),input:o(function(t){return t==null?null:O5e(t)},"input"),output:o(function(t){return t},"output")};o(u8,"type")});var mH=R(()=>{"use strict";pH()});function gH(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function B5e(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return gH;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}function yH(){return new ld}var h8,f8,od,P5e,ld,vH=R(()=>{"use strict";h8=Math.PI,f8=2*h8,od=1e-6,P5e=f8-od;o(gH,"append");o(B5e,"appendRound");ld=class{static{o(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?gH:B5e(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,l=this._y1,u=n-e,h=i-r,f=s-e,d=l-r,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>od)if(!(Math.abs(d*u-h*f)>od)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let m=n-s,g=i-l,y=u*u+h*h,v=m*m+g*g,x=Math.sqrt(y),b=Math.sqrt(p),w=a*Math.tan((h8-Math.acos((y+p-v)/(2*x*b)))/2),S=w/b,T=w/x;Math.abs(S-1)>od&&this._append`L${e+S*f},${r+S*d}`,this._append`A${a},${a},0,0,${+(d*m>f*g)},${this._x1=e+T*u},${this._y1=r+T*h}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=e+l,f=r+u,d=1^s,p=s?i-a:a-i;this._x1===null?this._append`M${h},${f}`:(Math.abs(this._x1-h)>od||Math.abs(this._y1-f)>od)&&this._append`L${h},${f}`,n&&(p<0&&(p=p%f8+f8),p>P5e?this._append`A${n},${n},0,1,${d},${e-l},${r-u}A${n},${n},0,1,${d},${this._x1=h},${this._y1=f}`:p>od&&this._append`A${n},${n},0,${+(p>=h8)},${d},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};o(yH,"path");yH.prototype=ld.prototype});var d8=R(()=>{"use strict";vH()});var xH=R(()=>{"use strict"});var bH=R(()=>{"use strict"});var wH=R(()=>{"use strict"});var TH=R(()=>{"use strict"});var kH=R(()=>{"use strict"});var EH=R(()=>{"use strict"});var CH=R(()=>{"use strict"});function p8(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function cd(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var Iy=R(()=>{"use strict";o(p8,"default");o(cd,"formatDecimalParts")});function ml(t){return t=cd(Math.abs(t)),t?t[1]:NaN}var Oy=R(()=>{"use strict";Iy();o(ml,"default")});function m8(t,e){return function(r,n){for(var i=r.length,a=[],s=0,l=t[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=t[s=(s+1)%t.length];return a.reverse().join(e)}}var SH=R(()=>{"use strict";o(m8,"default")});function g8(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var AH=R(()=>{"use strict";o(g8,"default")});function Sh(t){if(!(e=F5e.exec(t)))throw new Error("invalid format: "+t);var e;return new u3({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]})}function u3(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+""}var F5e,y8=R(()=>{"use strict";F5e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;o(Sh,"formatSpecifier");Sh.prototype=u3.prototype;o(u3,"FormatSpecifier");u3.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 v8(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var _H=R(()=>{"use strict";o(v8,"default")});function b8(t,e){var r=cd(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(x8=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+cd(t,Math.max(0,e+a-1))[0]}var x8,w8=R(()=>{"use strict";Iy();o(b8,"default")});function h3(t,e){var r=cd(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var LH=R(()=>{"use strict";Iy();o(h3,"default")});var T8,DH=R(()=>{"use strict";Iy();w8();LH();T8={"%":o((t,e)=>(t*100).toFixed(e),"%"),b:o(t=>Math.round(t).toString(2),"b"),c:o(t=>t+"","c"),d:p8,e:o((t,e)=>t.toExponential(e),"e"),f:o((t,e)=>t.toFixed(e),"f"),g:o((t,e)=>t.toPrecision(e),"g"),o:o(t=>Math.round(t).toString(8),"o"),p:o((t,e)=>h3(t*100,e),"p"),r:h3,s:b8,X:o(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:o(t=>Math.round(t).toString(16),"x")}});function f3(t){return t}var RH=R(()=>{"use strict";o(f3,"default")});function k8(t){var e=t.grouping===void 0||t.thousands===void 0?f3:m8(NH.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?f3:g8(NH.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function h(d){d=Sh(d);var p=d.fill,m=d.align,g=d.sign,y=d.symbol,v=d.zero,x=d.width,b=d.comma,w=d.precision,S=d.trim,T=d.type;T==="n"?(b=!0,T="g"):T8[T]||(w===void 0&&(w=12),S=!0,T="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var E=y==="$"?r:y==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",_=y==="$"?n:/[%p]/.test(T)?s:"",A=T8[T],L=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(N){var k=E,I=_,C,O,D;if(T==="c")I=A(N)+I,N="";else{N=+N;var P=N<0||1/N<0;if(N=isNaN(N)?u:A(Math.abs(N),w),S&&(N=v8(N)),P&&+N==0&&g!=="+"&&(P=!1),k=(P?g==="("?g:l:g==="-"||g==="("?"":g)+k,I=(T==="s"?MH[8+x8/3]:"")+I+(P&&g==="("?")":""),L){for(C=-1,O=N.length;++C<O;)if(D=N.charCodeAt(C),48>D||D>57){I=(D===46?i+N.slice(C+1):N.slice(C))+I,N=N.slice(0,C);break}}}b&&!v&&(N=e(N,1/0));var F=k.length+N.length+I.length,B=F<x?new Array(x-F+1).join(p):"";switch(b&&v&&(N=e(B+N,B.length?x-I.length:1/0),B=""),m){case"<":N=k+N+I+B;break;case"=":N=k+B+N+I;break;case"^":N=B.slice(0,F=B.length>>1)+k+N+I+B.slice(F);break;default:N=B+k+N+I;break}return a(N)}return o(M,"format"),M.toString=function(){return d+""},M}o(h,"newFormat");function f(d,p){var m=h((d=Sh(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(ml(p)/3)))*3,y=Math.pow(10,-g),v=MH[8+g/3];return function(x){return m(y*x)+v}}return o(f,"formatPrefix"),{format:h,formatPrefix:f}}var NH,MH,IH=R(()=>{"use strict";Oy();SH();AH();y8();_H();DH();w8();RH();NH=Array.prototype.map,MH=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];o(k8,"default")});function E8(t){return d3=k8(t),p3=d3.format,m3=d3.formatPrefix,d3}var d3,p3,m3,OH=R(()=>{"use strict";IH();E8({thousands:",",grouping:[3],currency:["$",""]});o(E8,"defaultLocale")});function g3(t){return Math.max(0,-ml(Math.abs(t)))}var PH=R(()=>{"use strict";Oy();o(g3,"default")});function y3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ml(e)/3)))*3-ml(Math.abs(t)))}var BH=R(()=>{"use strict";Oy();o(y3,"default")});function v3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ml(e)-ml(t))+1}var FH=R(()=>{"use strict";Oy();o(v3,"default")});var C8=R(()=>{"use strict";OH();y8();PH();BH();FH()});var zH=R(()=>{"use strict"});var GH=R(()=>{"use strict"});var $H=R(()=>{"use strict"});var VH=R(()=>{"use strict"});function Ah(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var Py=R(()=>{"use strict";o(Ah,"initRange")});function pu(){var t=new wp,e=[],r=[],n=S8;function i(a){let s=t.get(a);if(s===void 0){if(n!==S8)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return o(i,"scale"),i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new wp;for(let s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return pu(e,r).unknown(n)},Ah.apply(i,arguments),i}var S8,A8=R(()=>{"use strict";bh();Py();S8=Symbol("implicit");o(pu,"ordinal")});function Op(){var t=pu().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,l=!1,u=0,h=0,f=.5;delete t.unknown;function d(){var p=e().length,m=i<n,g=m?i:n,y=m?n:i;a=(y-g)/Math.max(1,p-u+h*2),l&&(a=Math.floor(a)),g+=(y-g-a*(p-u))*f,s=a*(1-u),l&&(g=Math.round(g),s=Math.round(s));var v=O4(p).map(function(x){return g+a*x});return r(m?v.reverse():v)}return o(d,"rescale"),t.domain=function(p){return arguments.length?(e(p),d()):e()},t.range=function(p){return arguments.length?([n,i]=p,n=+n,i=+i,d()):[n,i]},t.rangeRound=function(p){return[n,i]=p,n=+n,i=+i,l=!0,d()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(p){return arguments.length?(l=!!p,d()):l},t.padding=function(p){return arguments.length?(u=Math.min(1,h=+p),d()):u},t.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),d()):u},t.paddingOuter=function(p){return arguments.length?(h=+p,d()):h},t.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f},t.copy=function(){return Op(e(),[n,i]).round(l).paddingInner(u).paddingOuter(h).align(f)},Ah.apply(d(),arguments)}var UH=R(()=>{"use strict";bh();Py();A8();o(Op,"band")});function _8(t){return function(){return t}}var HH=R(()=>{"use strict";o(_8,"constants")});function L8(t){return+t}var YH=R(()=>{"use strict";o(L8,"number")});function Pp(t){return t}function D8(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:_8(isNaN(e)?NaN:.5)}function z5e(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function G5e(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=D8(i,n),a=r(s,a)):(n=D8(n,i),a=r(a,s)),function(l){return a(n(l))}}function $5e(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=D8(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(l){var u=dS(t,l,1,n)-1;return a[u](i[u](l))}}function x3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function V5e(){var t=WH,e=WH,r=Ch,n,i,a,s=Pp,l,u,h;function f(){var p=Math.min(t.length,e.length);return s!==Pp&&(s=z5e(t[0],t[p-1])),l=p>2?$5e:G5e,u=h=null,d}o(f,"rescale");function d(p){return p==null||isNaN(p=+p)?a:(u||(u=l(t.map(n),e,r)))(n(s(p)))}return o(d,"scale"),d.invert=function(p){return s(i((h||(h=l(e,t.map(n),ji)))(p)))},d.domain=function(p){return arguments.length?(t=Array.from(p,L8),f()):t.slice()},d.range=function(p){return arguments.length?(e=Array.from(p),f()):e.slice()},d.rangeRound=function(p){return e=Array.from(p),r=j4,f()},d.clamp=function(p){return arguments.length?(s=p?!0:Pp,f()):s!==Pp},d.interpolate=function(p){return arguments.length?(r=p,f()):r},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,m){return n=p,i=m,f()}}function By(){return V5e()(Pp,Pp)}var WH,R8=R(()=>{"use strict";bh();Np();HH();YH();WH=[0,1];o(Pp,"identity");o(D8,"normalize");o(z5e,"clamper");o(G5e,"bimap");o($5e,"polymap");o(x3,"copy");o(V5e,"transformer");o(By,"continuous")});function N8(t,e,r,n){var i=Tp(t,e,r),a;switch(n=Sh(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=y3(i,s))&&(n.precision=a),m3(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=v3(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=g3(i))&&(n.precision=a-(n.type==="%")*2);break}}return p3(n)}var qH=R(()=>{"use strict";bh();C8();o(N8,"tickFormat")});function U5e(t){var e=t.domain;return t.ticks=function(r){var n=e();return N4(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return N8(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],l=n[a],u,h,f=10;for(l<s&&(h=s,s=l,l=h,h=i,i=a,a=h);f-- >0;){if(h=fy(s,l,r),h===u)return n[i]=s,n[a]=l,e(n);if(h>0)s=Math.floor(s/h)*h,l=Math.ceil(l/h)*h;else if(h<0)s=Math.ceil(s*h)/h,l=Math.floor(l*h)/h;else break;u=h}return t},t}function gl(){var t=By();return t.copy=function(){return x3(t,gl())},Ah.apply(t,arguments),U5e(t)}var XH=R(()=>{"use strict";bh();R8();Py();qH();o(U5e,"linearish");o(gl,"linear")});function M8(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}var jH=R(()=>{"use strict";o(M8,"nice")});function dn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return o(i,"interval"),i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),l=i.ceil(a);return a-s<l-a?s:l},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,l)=>{let u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<s)||!(l>0))return u;let h;do u.push(h=new Date(+a)),e(a,l),t(a);while(h<a&&a<s);return u},i.filter=a=>dn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!a(s););else for(;--l>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(I8.setTime(+a),O8.setTime(+s),t(I8),t(O8),Math.floor(r(I8,O8))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var I8,O8,mu=R(()=>{"use strict";I8=new Date,O8=new Date;o(dn,"timeInterval")});var oc,KH,P8=R(()=>{"use strict";mu();oc=dn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);oc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?dn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):oc);KH=oc.range});var Ks,QH,B8=R(()=>{"use strict";mu();Ks=dn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),QH=Ks.range});var gu,H5e,b3,Y5e,F8=R(()=>{"use strict";mu();gu=dn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),H5e=gu.range,b3=dn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),Y5e=b3.range});var yu,W5e,w3,q5e,z8=R(()=>{"use strict";mu();yu=dn(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()),W5e=yu.range,w3=dn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),q5e=w3.range});var Do,X5e,zy,j5e,T3,K5e,G8=R(()=>{"use strict";mu();Do=dn(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),X5e=Do.range,zy=dn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),j5e=zy.range,T3=dn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),K5e=T3.range});function fd(t){return dn(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)}function dd(t){return dn(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)}var yl,_h,k3,E3,cc,C3,S3,JH,Q5e,Z5e,J5e,ewe,twe,rwe,pd,Bp,eY,tY,Lh,rY,nY,iY,nwe,iwe,awe,swe,owe,lwe,$8=R(()=>{"use strict";mu();o(fd,"timeWeekday");yl=fd(0),_h=fd(1),k3=fd(2),E3=fd(3),cc=fd(4),C3=fd(5),S3=fd(6),JH=yl.range,Q5e=_h.range,Z5e=k3.range,J5e=E3.range,ewe=cc.range,twe=C3.range,rwe=S3.range;o(dd,"utcWeekday");pd=dd(0),Bp=dd(1),eY=dd(2),tY=dd(3),Lh=dd(4),rY=dd(5),nY=dd(6),iY=pd.range,nwe=Bp.range,iwe=eY.range,awe=tY.range,swe=Lh.range,owe=rY.range,lwe=nY.range});var vu,cwe,A3,uwe,V8=R(()=>{"use strict";mu();vu=dn(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()),cwe=vu.range,A3=dn(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()),uwe=A3.range});var Qs,hwe,vl,fwe,U8=R(()=>{"use strict";mu();Qs=dn(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());Qs.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dn(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)});hwe=Qs.range,vl=dn(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());vl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:dn(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)});fwe=vl.range});function sY(t,e,r,n,i,a){let s=[[Ks,1,1e3],[Ks,5,5*1e3],[Ks,15,15*1e3],[Ks,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function l(h,f,d){let p=f<h;p&&([h,f]=[f,h]);let m=d&&typeof d.range=="function"?d:u(h,f,d),g=m?m.range(h,+f+1):[];return p?g.reverse():g}o(l,"ticks");function u(h,f,d){let p=Math.abs(f-h)/d,m=td(([,,v])=>v).right(s,p);if(m===s.length)return t.every(Tp(h/31536e6,f/31536e6,d));if(m===0)return oc.every(Math.max(Tp(h,f,d),1));let[g,y]=s[p/s[m-1][2]<s[m][2]/p?m-1:m];return g.every(y)}return o(u,"tickInterval"),[l,u]}var pwe,mwe,H8,Y8,oY=R(()=>{"use strict";bh();P8();B8();F8();z8();G8();$8();V8();U8();o(sY,"ticker");[pwe,mwe]=sY(vl,A3,pd,T3,w3,b3),[H8,Y8]=sY(Qs,vu,yl,Do,yu,gu)});var _3=R(()=>{"use strict";P8();B8();F8();z8();G8();$8();V8();U8();oY()});function W8(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function q8(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Gy(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function X8(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,u=t.shortMonths,h=$y(i),f=Vy(i),d=$y(a),p=Vy(a),m=$y(s),g=Vy(s),y=$y(l),v=Vy(l),x=$y(u),b=Vy(u),w={a:P,A:F,b:B,B:$,c:null,d:dY,e:dY,f:Fwe,g:Xwe,G:Kwe,H:Owe,I:Pwe,j:Bwe,L:vY,m:zwe,M:Gwe,p:z,q:Y,Q:gY,s:yY,S:$we,u:Vwe,U:Uwe,V:Hwe,w:Ywe,W:Wwe,x:null,X:null,y:qwe,Y:jwe,Z:Qwe,"%":mY},S={a:Q,A:X,b:ie,B:j,c:null,d:pY,e:pY,f:tTe,g:hTe,G:dTe,H:Zwe,I:Jwe,j:eTe,L:bY,m:rTe,M:nTe,p:J,q:Z,Q:gY,s:yY,S:iTe,u:aTe,U:sTe,V:oTe,w:lTe,W:cTe,x:null,X:null,y:uTe,Y:fTe,Z:pTe,"%":mY},T={a:M,A:N,b:k,B:I,c:C,d:hY,e:hY,f:Rwe,g:uY,G:cY,H:fY,I:fY,j:Awe,L:Dwe,m:Swe,M:_we,p:L,q:Cwe,Q:Mwe,s:Iwe,S:Lwe,u:bwe,U:wwe,V:Twe,w:xwe,W:kwe,x:O,X:D,y:uY,Y:cY,Z:Ewe,"%":Nwe};w.x=E(r,w),w.X=E(n,w),w.c=E(e,w),S.x=E(r,S),S.X=E(n,S),S.c=E(e,S);function E(H,q){return function(K){var se=[],ce=-1,ue=0,te=H.length,De,oe,ke;for(K instanceof Date||(K=new Date(+K));++ce<te;)H.charCodeAt(ce)===37&&(se.push(H.slice(ue,ce)),(oe=lY[De=H.charAt(++ce)])!=null?De=H.charAt(++ce):oe=De==="e"?" ":"0",(ke=q[De])&&(De=ke(K,oe)),se.push(De),ue=ce+1);return se.push(H.slice(ue,ce)),se.join("")}}o(E,"newFormat");function _(H,q){return function(K){var se=Gy(1900,void 0,1),ce=A(se,H,K+="",0),ue,te;if(ce!=K.length)return null;if("Q"in se)return new Date(se.Q);if("s"in se)return new Date(se.s*1e3+("L"in se?se.L:0));if(q&&!("Z"in se)&&(se.Z=0),"p"in se&&(se.H=se.H%12+se.p*12),se.m===void 0&&(se.m="q"in se?se.q:0),"V"in se){if(se.V<1||se.V>53)return null;"w"in se||(se.w=1),"Z"in se?(ue=q8(Gy(se.y,0,1)),te=ue.getUTCDay(),ue=te>4||te===0?Bp.ceil(ue):Bp(ue),ue=zy.offset(ue,(se.V-1)*7),se.y=ue.getUTCFullYear(),se.m=ue.getUTCMonth(),se.d=ue.getUTCDate()+(se.w+6)%7):(ue=W8(Gy(se.y,0,1)),te=ue.getDay(),ue=te>4||te===0?_h.ceil(ue):_h(ue),ue=Do.offset(ue,(se.V-1)*7),se.y=ue.getFullYear(),se.m=ue.getMonth(),se.d=ue.getDate()+(se.w+6)%7)}else("W"in se||"U"in se)&&("w"in se||(se.w="u"in se?se.u%7:"W"in se?1:0),te="Z"in se?q8(Gy(se.y,0,1)).getUTCDay():W8(Gy(se.y,0,1)).getDay(),se.m=0,se.d="W"in se?(se.w+6)%7+se.W*7-(te+5)%7:se.w+se.U*7-(te+6)%7);return"Z"in se?(se.H+=se.Z/100|0,se.M+=se.Z%100,q8(se)):W8(se)}}o(_,"newParse");function A(H,q,K,se){for(var ce=0,ue=q.length,te=K.length,De,oe;ce<ue;){if(se>=te)return-1;if(De=q.charCodeAt(ce++),De===37){if(De=q.charAt(ce++),oe=T[De in lY?q.charAt(ce++):De],!oe||(se=oe(H,K,se))<0)return-1}else if(De!=K.charCodeAt(se++))return-1}return se}o(A,"parseSpecifier");function L(H,q,K){var se=h.exec(q.slice(K));return se?(H.p=f.get(se[0].toLowerCase()),K+se[0].length):-1}o(L,"parsePeriod");function M(H,q,K){var se=m.exec(q.slice(K));return se?(H.w=g.get(se[0].toLowerCase()),K+se[0].length):-1}o(M,"parseShortWeekday");function N(H,q,K){var se=d.exec(q.slice(K));return se?(H.w=p.get(se[0].toLowerCase()),K+se[0].length):-1}o(N,"parseWeekday");function k(H,q,K){var se=x.exec(q.slice(K));return se?(H.m=b.get(se[0].toLowerCase()),K+se[0].length):-1}o(k,"parseShortMonth");function I(H,q,K){var se=y.exec(q.slice(K));return se?(H.m=v.get(se[0].toLowerCase()),K+se[0].length):-1}o(I,"parseMonth");function C(H,q,K){return A(H,e,q,K)}o(C,"parseLocaleDateTime");function O(H,q,K){return A(H,r,q,K)}o(O,"parseLocaleDate");function D(H,q,K){return A(H,n,q,K)}o(D,"parseLocaleTime");function P(H){return s[H.getDay()]}o(P,"formatShortWeekday");function F(H){return a[H.getDay()]}o(F,"formatWeekday");function B(H){return u[H.getMonth()]}o(B,"formatShortMonth");function $(H){return l[H.getMonth()]}o($,"formatMonth");function z(H){return i[+(H.getHours()>=12)]}o(z,"formatPeriod");function Y(H){return 1+~~(H.getMonth()/3)}o(Y,"formatQuarter");function Q(H){return s[H.getUTCDay()]}o(Q,"formatUTCShortWeekday");function X(H){return a[H.getUTCDay()]}o(X,"formatUTCWeekday");function ie(H){return u[H.getUTCMonth()]}o(ie,"formatUTCShortMonth");function j(H){return l[H.getUTCMonth()]}o(j,"formatUTCMonth");function J(H){return i[+(H.getUTCHours()>=12)]}o(J,"formatUTCPeriod");function Z(H){return 1+~~(H.getUTCMonth()/3)}return o(Z,"formatUTCQuarter"),{format:o(function(H){var q=E(H+="",w);return q.toString=function(){return H},q},"format"),parse:o(function(H){var q=_(H+="",!1);return q.toString=function(){return H},q},"parse"),utcFormat:o(function(H){var q=E(H+="",S);return q.toString=function(){return H},q},"utcFormat"),utcParse:o(function(H){var q=_(H+="",!0);return q.toString=function(){return H},q},"utcParse")}}function Pr(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function vwe(t){return t.replace(ywe,"\\$&")}function $y(t){return new RegExp("^(?:"+t.map(vwe).join("|")+")","i")}function Vy(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function xwe(t,e,r){var n=Ki.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function bwe(t,e,r){var n=Ki.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function wwe(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function Twe(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function kwe(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function cY(t,e,r){var n=Ki.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function uY(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Ewe(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Cwe(t,e,r){var n=Ki.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function Swe(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function hY(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Awe(t,e,r){var n=Ki.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function fY(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function _we(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Lwe(t,e,r){var n=Ki.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Dwe(t,e,r){var n=Ki.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Rwe(t,e,r){var n=Ki.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Nwe(t,e,r){var n=gwe.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Mwe(t,e,r){var n=Ki.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Iwe(t,e,r){var n=Ki.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function dY(t,e){return Pr(t.getDate(),e,2)}function Owe(t,e){return Pr(t.getHours(),e,2)}function Pwe(t,e){return Pr(t.getHours()%12||12,e,2)}function Bwe(t,e){return Pr(1+Do.count(Qs(t),t),e,3)}function vY(t,e){return Pr(t.getMilliseconds(),e,3)}function Fwe(t,e){return vY(t,e)+"000"}function zwe(t,e){return Pr(t.getMonth()+1,e,2)}function Gwe(t,e){return Pr(t.getMinutes(),e,2)}function $we(t,e){return Pr(t.getSeconds(),e,2)}function Vwe(t){var e=t.getDay();return e===0?7:e}function Uwe(t,e){return Pr(yl.count(Qs(t)-1,t),e,2)}function xY(t){var e=t.getDay();return e>=4||e===0?cc(t):cc.ceil(t)}function Hwe(t,e){return t=xY(t),Pr(cc.count(Qs(t),t)+(Qs(t).getDay()===4),e,2)}function Ywe(t){return t.getDay()}function Wwe(t,e){return Pr(_h.count(Qs(t)-1,t),e,2)}function qwe(t,e){return Pr(t.getFullYear()%100,e,2)}function Xwe(t,e){return t=xY(t),Pr(t.getFullYear()%100,e,2)}function jwe(t,e){return Pr(t.getFullYear()%1e4,e,4)}function Kwe(t,e){var r=t.getDay();return t=r>=4||r===0?cc(t):cc.ceil(t),Pr(t.getFullYear()%1e4,e,4)}function Qwe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Pr(e/60|0,"0",2)+Pr(e%60,"0",2)}function pY(t,e){return Pr(t.getUTCDate(),e,2)}function Zwe(t,e){return Pr(t.getUTCHours(),e,2)}function Jwe(t,e){return Pr(t.getUTCHours()%12||12,e,2)}function eTe(t,e){return Pr(1+zy.count(vl(t),t),e,3)}function bY(t,e){return Pr(t.getUTCMilliseconds(),e,3)}function tTe(t,e){return bY(t,e)+"000"}function rTe(t,e){return Pr(t.getUTCMonth()+1,e,2)}function nTe(t,e){return Pr(t.getUTCMinutes(),e,2)}function iTe(t,e){return Pr(t.getUTCSeconds(),e,2)}function aTe(t){var e=t.getUTCDay();return e===0?7:e}function sTe(t,e){return Pr(pd.count(vl(t)-1,t),e,2)}function wY(t){var e=t.getUTCDay();return e>=4||e===0?Lh(t):Lh.ceil(t)}function oTe(t,e){return t=wY(t),Pr(Lh.count(vl(t),t)+(vl(t).getUTCDay()===4),e,2)}function lTe(t){return t.getUTCDay()}function cTe(t,e){return Pr(Bp.count(vl(t)-1,t),e,2)}function uTe(t,e){return Pr(t.getUTCFullYear()%100,e,2)}function hTe(t,e){return t=wY(t),Pr(t.getUTCFullYear()%100,e,2)}function fTe(t,e){return Pr(t.getUTCFullYear()%1e4,e,4)}function dTe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Lh(t):Lh.ceil(t),Pr(t.getUTCFullYear()%1e4,e,4)}function pTe(){return"+0000"}function mY(){return"%"}function gY(t){return+t}function yY(t){return Math.floor(+t/1e3)}var lY,Ki,gwe,ywe,TY=R(()=>{"use strict";_3();o(W8,"localDate");o(q8,"utcDate");o(Gy,"newDate");o(X8,"formatLocale");lY={"-":"",_:" ",0:"0"},Ki=/^\s*\d+/,gwe=/^%/,ywe=/[\\^$*+?|[\]().{}]/g;o(Pr,"pad");o(vwe,"requote");o($y,"formatRe");o(Vy,"formatLookup");o(xwe,"parseWeekdayNumberSunday");o(bwe,"parseWeekdayNumberMonday");o(wwe,"parseWeekNumberSunday");o(Twe,"parseWeekNumberISO");o(kwe,"parseWeekNumberMonday");o(cY,"parseFullYear");o(uY,"parseYear");o(Ewe,"parseZone");o(Cwe,"parseQuarter");o(Swe,"parseMonthNumber");o(hY,"parseDayOfMonth");o(Awe,"parseDayOfYear");o(fY,"parseHour24");o(_we,"parseMinutes");o(Lwe,"parseSeconds");o(Dwe,"parseMilliseconds");o(Rwe,"parseMicroseconds");o(Nwe,"parseLiteralPercent");o(Mwe,"parseUnixTimestamp");o(Iwe,"parseUnixTimestampSeconds");o(dY,"formatDayOfMonth");o(Owe,"formatHour24");o(Pwe,"formatHour12");o(Bwe,"formatDayOfYear");o(vY,"formatMilliseconds");o(Fwe,"formatMicroseconds");o(zwe,"formatMonthNumber");o(Gwe,"formatMinutes");o($we,"formatSeconds");o(Vwe,"formatWeekdayNumberMonday");o(Uwe,"formatWeekNumberSunday");o(xY,"dISO");o(Hwe,"formatWeekNumberISO");o(Ywe,"formatWeekdayNumberSunday");o(Wwe,"formatWeekNumberMonday");o(qwe,"formatYear");o(Xwe,"formatYearISO");o(jwe,"formatFullYear");o(Kwe,"formatFullYearISO");o(Qwe,"formatZone");o(pY,"formatUTCDayOfMonth");o(Zwe,"formatUTCHour24");o(Jwe,"formatUTCHour12");o(eTe,"formatUTCDayOfYear");o(bY,"formatUTCMilliseconds");o(tTe,"formatUTCMicroseconds");o(rTe,"formatUTCMonthNumber");o(nTe,"formatUTCMinutes");o(iTe,"formatUTCSeconds");o(aTe,"formatUTCWeekdayNumberMonday");o(sTe,"formatUTCWeekNumberSunday");o(wY,"UTCdISO");o(oTe,"formatUTCWeekNumberISO");o(lTe,"formatUTCWeekdayNumberSunday");o(cTe,"formatUTCWeekNumberMonday");o(uTe,"formatUTCYear");o(hTe,"formatUTCYearISO");o(fTe,"formatUTCFullYear");o(dTe,"formatUTCFullYearISO");o(pTe,"formatUTCZone");o(mY,"formatLiteralPercent");o(gY,"formatUnixTimestamp");o(yY,"formatUnixTimestampSeconds")});function j8(t){return Fp=X8(t),md=Fp.format,kY=Fp.parse,EY=Fp.utcFormat,CY=Fp.utcParse,Fp}var Fp,md,kY,EY,CY,SY=R(()=>{"use strict";TY();j8({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"]});o(j8,"defaultLocale")});var K8=R(()=>{"use strict";SY()});function mTe(t){return new Date(t)}function gTe(t){return t instanceof Date?+t:+new Date(+t)}function AY(t,e,r,n,i,a,s,l,u,h){var f=By(),d=f.invert,p=f.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),v=h("%I %p"),x=h("%a %d"),b=h("%b %d"),w=h("%B"),S=h("%Y");function T(E){return(u(E)<E?m:l(E)<E?g:s(E)<E?y:a(E)<E?v:n(E)<E?i(E)<E?x:b:r(E)<E?w:S)(E)}return o(T,"tickFormat"),f.invert=function(E){return new Date(d(E))},f.domain=function(E){return arguments.length?p(Array.from(E,gTe)):p().map(mTe)},f.ticks=function(E){var _=p();return t(_[0],_[_.length-1],E??10)},f.tickFormat=function(E,_){return _==null?T:h(_)},f.nice=function(E){var _=p();return(!E||typeof E.range!="function")&&(E=e(_[0],_[_.length-1],E??10)),E?p(M8(_,E)):f},f.copy=function(){return x3(f,AY(t,e,r,n,i,a,s,l,u,h))},f}function L3(){return Ah.apply(AY(H8,Y8,Qs,vu,yl,Do,yu,gu,Ks,md).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var _Y=R(()=>{"use strict";_3();K8();R8();Py();jH();o(mTe,"date");o(gTe,"number");o(AY,"calendar");o(L3,"time")});var LY=R(()=>{"use strict";UH();XH();A8();_Y()});function Q8(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}var DY=R(()=>{"use strict";o(Q8,"default")});var Z8,RY=R(()=>{"use strict";DY();Z8=Q8("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var NY=R(()=>{"use strict";RY()});function Nn(t){return o(function(){return t},"constant")}var D3=R(()=>{"use strict";o(Nn,"default")});function IY(t){return t>1?0:t<-1?zp:Math.acos(t)}function e_(t){return t>=1?Uy:t<=-1?-Uy:Math.asin(t)}var J8,ua,Dh,MY,R3,xl,gd,Qi,zp,Uy,Gp,N3=R(()=>{"use strict";J8=Math.abs,ua=Math.atan2,Dh=Math.cos,MY=Math.max,R3=Math.min,xl=Math.sin,gd=Math.sqrt,Qi=1e-12,zp=Math.PI,Uy=zp/2,Gp=2*zp;o(IY,"acos");o(e_,"asin")});function M3(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new ld(e)}var t_=R(()=>{"use strict";d8();o(M3,"withPath")});function yTe(t){return t.innerRadius}function vTe(t){return t.outerRadius}function xTe(t){return t.startAngle}function bTe(t){return t.endAngle}function wTe(t){return t&&t.padAngle}function TTe(t,e,r,n,i,a,s,l){var u=r-t,h=n-e,f=s-i,d=l-a,p=d*u-f*h;if(!(p*p<Qi))return p=(f*(e-a)-d*(t-i))/p,[t+p*u,e+p*h]}function I3(t,e,r,n,i,a,s){var l=t-r,u=e-n,h=(s?a:-a)/gd(l*l+u*u),f=h*u,d=-h*l,p=t+f,m=e+d,g=r+f,y=n+d,v=(p+g)/2,x=(m+y)/2,b=g-p,w=y-m,S=b*b+w*w,T=i-a,E=p*y-g*m,_=(w<0?-1:1)*gd(MY(0,T*T*S-E*E)),A=(E*w-b*_)/S,L=(-E*b-w*_)/S,M=(E*w+b*_)/S,N=(-E*b+w*_)/S,k=A-v,I=L-x,C=M-v,O=N-x;return k*k+I*I>C*C+O*O&&(A=M,L=N),{cx:A,cy:L,x01:-f,y01:-d,x11:A*(i/T-1),y11:L*(i/T-1)}}function bl(){var t=yTe,e=vTe,r=Nn(0),n=null,i=xTe,a=bTe,s=wTe,l=null,u=M3(h);function h(){var f,d,p=+t.apply(this,arguments),m=+e.apply(this,arguments),g=i.apply(this,arguments)-Uy,y=a.apply(this,arguments)-Uy,v=J8(y-g),x=y>g;if(l||(l=f=u()),m<p&&(d=m,m=p,p=d),!(m>Qi))l.moveTo(0,0);else if(v>Gp-Qi)l.moveTo(m*Dh(g),m*xl(g)),l.arc(0,0,m,g,y,!x),p>Qi&&(l.moveTo(p*Dh(y),p*xl(y)),l.arc(0,0,p,y,g,x));else{var b=g,w=y,S=g,T=y,E=v,_=v,A=s.apply(this,arguments)/2,L=A>Qi&&(n?+n.apply(this,arguments):gd(p*p+m*m)),M=R3(J8(m-p)/2,+r.apply(this,arguments)),N=M,k=M,I,C;if(L>Qi){var O=e_(L/p*xl(A)),D=e_(L/m*xl(A));(E-=O*2)>Qi?(O*=x?1:-1,S+=O,T-=O):(E=0,S=T=(g+y)/2),(_-=D*2)>Qi?(D*=x?1:-1,b+=D,w-=D):(_=0,b=w=(g+y)/2)}var P=m*Dh(b),F=m*xl(b),B=p*Dh(T),$=p*xl(T);if(M>Qi){var z=m*Dh(w),Y=m*xl(w),Q=p*Dh(S),X=p*xl(S),ie;if(v<zp)if(ie=TTe(P,F,Q,X,z,Y,B,$)){var j=P-ie[0],J=F-ie[1],Z=z-ie[0],H=Y-ie[1],q=1/xl(IY((j*Z+J*H)/(gd(j*j+J*J)*gd(Z*Z+H*H)))/2),K=gd(ie[0]*ie[0]+ie[1]*ie[1]);N=R3(M,(p-K)/(q-1)),k=R3(M,(m-K)/(q+1))}else N=k=0}_>Qi?k>Qi?(I=I3(Q,X,P,F,m,k,x),C=I3(z,Y,B,$,m,k,x),l.moveTo(I.cx+I.x01,I.cy+I.y01),k<M?l.arc(I.cx,I.cy,k,ua(I.y01,I.x01),ua(C.y01,C.x01),!x):(l.arc(I.cx,I.cy,k,ua(I.y01,I.x01),ua(I.y11,I.x11),!x),l.arc(0,0,m,ua(I.cy+I.y11,I.cx+I.x11),ua(C.cy+C.y11,C.cx+C.x11),!x),l.arc(C.cx,C.cy,k,ua(C.y11,C.x11),ua(C.y01,C.x01),!x))):(l.moveTo(P,F),l.arc(0,0,m,b,w,!x)):l.moveTo(P,F),!(p>Qi)||!(E>Qi)?l.lineTo(B,$):N>Qi?(I=I3(B,$,z,Y,p,-N,x),C=I3(P,F,Q,X,p,-N,x),l.lineTo(I.cx+I.x01,I.cy+I.y01),N<M?l.arc(I.cx,I.cy,N,ua(I.y01,I.x01),ua(C.y01,C.x01),!x):(l.arc(I.cx,I.cy,N,ua(I.y01,I.x01),ua(I.y11,I.x11),!x),l.arc(0,0,p,ua(I.cy+I.y11,I.cx+I.x11),ua(C.cy+C.y11,C.cx+C.x11),x),l.arc(C.cx,C.cy,N,ua(C.y11,C.x11),ua(C.y01,C.x01),!x))):l.arc(0,0,p,T,S,x)}if(l.closePath(),f)return l=null,f+""||null}return o(h,"arc"),h.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-zp/2;return[Dh(d)*f,xl(d)*f]},h.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Nn(+f),h):t},h.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Nn(+f),h):e},h.cornerRadius=function(f){return arguments.length?(r=typeof f=="function"?f:Nn(+f),h):r},h.padRadius=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Nn(+f),h):n},h.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Nn(+f),h):i},h.endAngle=function(f){return arguments.length?(a=typeof f=="function"?f:Nn(+f),h):a},h.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Nn(+f),h):s},h.context=function(f){return arguments.length?(l=f??null,h):l},h}var OY=R(()=>{"use strict";D3();N3();t_();o(yTe,"arcInnerRadius");o(vTe,"arcOuterRadius");o(xTe,"arcStartAngle");o(bTe,"arcEndAngle");o(wTe,"arcPadAngle");o(TTe,"intersect");o(I3,"cornerTangents");o(bl,"default")});function Hy(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Dyt,r_=R(()=>{"use strict";Dyt=Array.prototype.slice;o(Hy,"default")});function PY(t){this._context=t}function xu(t){return new PY(t)}var n_=R(()=>{"use strict";o(PY,"Linear");PY.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._point=0},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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:this._context.lineTo(t,e);break}},"point")};o(xu,"default")});function BY(t){return t[0]}function FY(t){return t[1]}var zY=R(()=>{"use strict";o(BY,"x");o(FY,"y")});function ha(t,e){var r=Nn(!0),n=null,i=xu,a=null,s=M3(l);t=typeof t=="function"?t:t===void 0?BY:Nn(t),e=typeof e=="function"?e:e===void 0?FY:Nn(e);function l(u){var h,f=(u=Hy(u)).length,d,p=!1,m;for(n==null&&(a=i(m=s())),h=0;h<=f;++h)!(h<f&&r(d=u[h],h,u))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+t(d,h,u),+e(d,h,u));if(m)return a=null,m+""||null}return o(l,"line"),l.x=function(u){return arguments.length?(t=typeof u=="function"?u:Nn(+u),l):t},l.y=function(u){return arguments.length?(e=typeof u=="function"?u:Nn(+u),l):e},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Nn(!!u),l):r},l.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),l):i},l.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),l):n},l}var GY=R(()=>{"use strict";r_();D3();n_();t_();zY();o(ha,"default")});function i_(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}var $Y=R(()=>{"use strict";o(i_,"default")});function a_(t){return t}var VY=R(()=>{"use strict";o(a_,"default")});function O3(){var t=a_,e=i_,r=null,n=Nn(0),i=Nn(Gp),a=Nn(0);function s(l){var u,h=(l=Hy(l)).length,f,d,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),v=Math.min(Gp,Math.max(-Gp,i.apply(this,arguments)-y)),x,b=Math.min(Math.abs(v)/h,a.apply(this,arguments)),w=b*(v<0?-1:1),S;for(u=0;u<h;++u)(S=g[m[u]=u]=+t(l[u],u,l))>0&&(p+=S);for(e!=null?m.sort(function(T,E){return e(g[T],g[E])}):r!=null&&m.sort(function(T,E){return r(l[T],l[E])}),u=0,d=p?(v-h*w)/p:0;u<h;++u,y=x)f=m[u],S=g[f],x=y+(S>0?S*d:0)+w,g[f]={data:l[f],index:u,value:S,startAngle:y,endAngle:x,padAngle:b};return g}return o(s,"pie"),s.value=function(l){return arguments.length?(t=typeof l=="function"?l:Nn(+l),s):t},s.sortValues=function(l){return arguments.length?(e=l,r=null,s):e},s.sort=function(l){return arguments.length?(r=l,e=null,s):r},s.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Nn(+l),s):n},s.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Nn(+l),s):i},s.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Nn(+l),s):a},s}var UY=R(()=>{"use strict";r_();D3();$Y();VY();N3();o(O3,"default")});function s_(t){return new P3(t,!0)}function o_(t){return new P3(t,!1)}var P3,HY=R(()=>{"use strict";P3=class{static{o(this,"Bump")}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}};o(s_,"bumpX");o(o_,"bumpY")});function Zs(){}var Yy=R(()=>{"use strict";o(Zs,"default")});function $p(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)}function Wy(t){this._context=t}function vs(t){return new Wy(t)}var qy=R(()=>{"use strict";o($p,"point");o(Wy,"Basis");Wy.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:o(function(){switch(this._point){case 3:$p(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:o(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:$p(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};o(vs,"default")});function YY(t){this._context=t}function B3(t){return new YY(t)}var WY=R(()=>{"use strict";Yy();qy();o(YY,"BasisClosed");YY.prototype={areaStart:Zs,areaEnd:Zs,lineStart:o(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:o(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:o(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:$p(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};o(B3,"default")});function qY(t){this._context=t}function F3(t){return new qY(t)}var XY=R(()=>{"use strict";qy();o(qY,"BasisOpen");qY.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:$p(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};o(F3,"default")});function jY(t,e){this._basis=new Wy(t),this._beta=e}var l_,KY=R(()=>{"use strict";qy();o(jY,"Bundle");jY.prototype={lineStart:o(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:o(function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+u*a),this._beta*e[l]+(1-this._beta)*(i+u*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:o(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};l_=o(function t(e){function r(n){return e===1?new Wy(n):new jY(n,e)}return o(r,"bundle"),r.beta=function(n){return t(+n)},r},"custom")(.85)});function Vp(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)}function z3(t,e){this._context=t,this._k=(1-e)/6}var c_,Xy=R(()=>{"use strict";o(Vp,"point");o(z3,"Cardinal");z3.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Vp(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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:Vp(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")};c_=o(function t(e){function r(n){return new z3(n,e)}return o(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function G3(t,e){this._context=t,this._k=(1-e)/6}var u_,h_=R(()=>{"use strict";Yy();Xy();o(G3,"CardinalClosed");G3.prototype={areaStart:Zs,areaEnd:Zs,lineStart:o(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:o(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:o(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:Vp(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")};u_=o(function t(e){function r(n){return new G3(n,e)}return o(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function $3(t,e){this._context=t,this._k=(1-e)/6}var f_,d_=R(()=>{"use strict";Xy();o($3,"CardinalOpen");$3.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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:Vp(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")};f_=o(function t(e){function r(n){return new $3(n,e)}return o(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function jy(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Qi){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Qi){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/f,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/f}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function QY(t,e){this._context=t,this._alpha=e}var p_,V3=R(()=>{"use strict";N3();Xy();o(jy,"point");o(QY,"CatmullRom");QY.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(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:o(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:o(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:jy(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")};p_=o(function t(e){function r(n){return e?new QY(n,e):new z3(n,0)}return o(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function ZY(t,e){this._context=t,this._alpha=e}var m_,JY=R(()=>{"use strict";h_();Yy();V3();o(ZY,"CatmullRomClosed");ZY.prototype={areaStart:Zs,areaEnd:Zs,lineStart:o(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:o(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:o(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:jy(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")};m_=o(function t(e){function r(n){return e?new ZY(n,e):new G3(n,0)}return o(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function eW(t,e){this._context=t,this._alpha=e}var g_,tW=R(()=>{"use strict";d_();V3();o(eW,"CatmullRomOpen");eW.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(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:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:jy(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")};g_=o(function t(e){function r(n){return e?new eW(n,e):new $3(n,0)}return o(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function rW(t){this._context=t}function U3(t){return new rW(t)}var nW=R(()=>{"use strict";Yy();o(rW,"LinearClosed");rW.prototype={areaStart:Zs,areaEnd:Zs,lineStart:o(function(){this._point=0},"lineStart"),lineEnd:o(function(){this._point&&this._context.closePath()},"lineEnd"),point:o(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};o(U3,"default")});function iW(t){return t<0?-1:1}function aW(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),l=(a*i+s*n)/(n+i);return(iW(a)+iW(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function sW(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function y_(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,l=(a-n)/3;t._context.bezierCurveTo(n+l,i+l*e,a-l,s-l*r,a,s)}function H3(t){this._context=t}function oW(t){this._context=new lW(t)}function lW(t){this._context=t}function v_(t){return new H3(t)}function x_(t){return new oW(t)}var cW=R(()=>{"use strict";o(iW,"sign");o(aW,"slope3");o(sW,"slope2");o(y_,"point");o(H3,"MonotoneX");H3.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:y_(this,this._t0,sW(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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,y_(this,sW(this,r=aW(this,t,e)),r);break;default:y_(this,this._t0,r=aW(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")};o(oW,"MonotoneY");(oW.prototype=Object.create(H3.prototype)).point=function(t,e){H3.prototype.point.call(this,e,t)};o(lW,"ReflectContext");lW.prototype={moveTo:o(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:o(function(){this._context.closePath()},"closePath"),lineTo:o(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:o(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")};o(v_,"monotoneX");o(x_,"monotoneY")});function hW(t){this._context=t}function uW(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Y3(t){return new hW(t)}var fW=R(()=>{"use strict";o(hW,"Natural");hW.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:o(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 n=uW(t),i=uW(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:o(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};o(uW,"controlPoints");o(Y3,"default")});function W3(t,e){this._context=t,this._t=e}function q3(t){return new W3(t,.5)}function b_(t){return new W3(t,0)}function w_(t){return new W3(t,1)}var dW=R(()=>{"use strict";o(W3,"Step");W3.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:o(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:o(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")};o(q3,"default");o(b_,"stepBefore");o(w_,"stepAfter")});var pW=R(()=>{"use strict";OY();GY();UY();WY();XY();qy();HY();KY();h_();d_();Xy();JY();tW();V3();nW();n_();cW();fW();dW()});var mW=R(()=>{"use strict"});var gW=R(()=>{"use strict"});function Rh(t,e,r){this.k=t,this.x=e,this.y=r}function k_(t){for(;!t.__zoom;)if(!(t=t.parentNode))return T_;return t.__zoom}var T_,E_=R(()=>{"use strict";o(Rh,"Transform");Rh.prototype={constructor:Rh,scale:o(function(t){return t===1?this:new Rh(this.k*t,this.x,this.y)},"scale"),translate:o(function(t,e){return t===0&e===0?this:new Rh(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:o(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:o(function(t){return t*this.k+this.x},"applyX"),applyY:o(function(t){return t*this.k+this.y},"applyY"),invert:o(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:o(function(t){return(t-this.x)/this.k},"invertX"),invertY:o(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:o(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:o(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:o(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};T_=new Rh(1,0,0);k_.prototype=Rh.prototype;o(k_,"transform")});var yW=R(()=>{"use strict"});var vW=R(()=>{"use strict";c3();mW();gW();E_();yW()});var xW=R(()=>{"use strict";vW();E_()});var Zt=R(()=>{"use strict";bh();K$();mH();xH();Lp();bH();wH();bS();$V();TH();l8();kH();CH();C8();zH();GH();Np();d8();$H();EH();VH();LY();NY();fl();pW();_3();K8();n3();c3();xW()});var bW=gi(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.BLANK_URL=Zi.relativeFirstCharacters=Zi.whitespaceEscapeCharsRegex=Zi.urlSchemeRegex=Zi.ctrlCharactersRegex=Zi.htmlCtrlEntityRegex=Zi.htmlEntitiesRegex=Zi.invalidProtocolRegex=void 0;Zi.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Zi.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Zi.htmlCtrlEntityRegex=/&(newline|tab);/gi;Zi.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Zi.urlSchemeRegex=/^.+(:|&colon;)/gim;Zi.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Zi.relativeFirstCharacters=[".","/"];Zi.BLANK_URL="about:blank"});var Up=gi(X3=>{"use strict";Object.defineProperty(X3,"__esModule",{value:!0});X3.sanitizeUrl=void 0;var Na=bW();function kTe(t){return Na.relativeFirstCharacters.indexOf(t[0])>-1}o(kTe,"isRelativeUrlWithoutProtocol");function ETe(t){var e=t.replace(Na.ctrlCharactersRegex,"");return e.replace(Na.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}o(ETe,"decodeHtmlCharacters");function CTe(t){return URL.canParse(t)}o(CTe,"isValidUrl");function wW(t){try{return decodeURIComponent(t)}catch{return t}}o(wW,"decodeURI");function STe(t){if(!t)return Na.BLANK_URL;var e,r=wW(t.trim());do r=ETe(r).replace(Na.htmlCtrlEntityRegex,"").replace(Na.ctrlCharactersRegex,"").replace(Na.whitespaceEscapeCharsRegex,"").trim(),r=wW(r),e=r.match(Na.ctrlCharactersRegex)||r.match(Na.htmlEntitiesRegex)||r.match(Na.htmlCtrlEntityRegex)||r.match(Na.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Na.BLANK_URL;if(kTe(n))return n;var i=n.trimStart(),a=i.match(Na.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(Na.invalidProtocolRegex.test(s))return Na.BLANK_URL;var l=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return l;if(s==="http:"||s==="https:"){if(!CTe(l))return Na.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}o(STe,"sanitizeUrl");X3.sanitizeUrl=STe});var C_,yd,j3,TW,kW,EW,wl,Ky,Qy=R(()=>{"use strict";C_=Xi(Up(),1);rr();yd=o((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),j3=o((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};yd(t,r).lower()},"drawBackgroundRect"),TW=o((t,e)=>{let r=e.text.replace(Qf," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),kW=o((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,C_.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),EW=o((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,C_.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),wl=o(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Ky=o(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var CW,S_,SW,ATe,_Te,LTe,DTe,RTe,NTe,MTe,ITe,OTe,PTe,BTe,FTe,bu,Tl,AW=R(()=>{"use strict";rr();Qy();CW=Xi(Up(),1),S_=o(function(t,e){return yd(t,e)},"drawRect"),SW=o(function(t,e,r,n,i,a){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let l=a.startsWith("data:image/png;base64")?a:(0,CW.sanitizeUrl)(a);s.attr("xlink:href",l)},"drawImage"),ATe=o((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",l=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,f="";if(i===0){let p=n.append("line");p.attr("x1",a.startPoint.x),p.attr("y1",a.startPoint.y),p.attr("x2",a.endPoint.x),p.attr("y2",a.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",l),p.style("fill","none"),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)"),i=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)")}let d=r.messageFont();bu(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:s},d),a.techn&&a.techn.text!==""&&(d=r.messageFont(),bu(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},d))}},"drawRels"),_Te=o(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let u={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};S_(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,bu(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=s,bu(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=s,bu(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},"drawBoundary"),LTe=o(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let l=t.append("g");l.attr("class","person-man");let u=wl();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=e.x,u.y=e.y,u.fill=n,u.width=e.width,u.height=e.height,u.stroke=i,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},S_(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let h=FTe(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":SW(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let f=r[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,bu(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=r[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&e.techn?.text!==""?bu(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&bu(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=r.personFont(),f.fontColor=a,bu(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},"drawC4Shape"),DTe=o(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),RTe=o(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),NTe=o(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),MTe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),ITe=o(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),OTe=o(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},"insertArrowFilledHead"),PTe=o(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),BTe=o(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),FTe=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),bu=function(){function t(i,a,s,l,u,h,f){let d=a.append("text").attr("x",s+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(d,f)}o(t,"byText");function e(i,a,s,l,u,h,f,d){let{fontSize:p,fontFamily:m,fontWeight:g}=d,y=i.split(We.lineBreakRegex);for(let v=0;v<y.length;v++){let x=v*p-p*(y.length-1)/2,b=a.append("text").attr("x",s+u/2).attr("y",l).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",g).style("font-family",m);b.append("tspan").attr("dy",x).text(y[v]).attr("alignment-baseline","mathematical"),n(b,f)}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f)}o(r,"byFo");function n(i,a){for(let s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),Tl={drawRect:S_,drawBoundary:_Te,drawC4Shape:LTe,drawRels:ATe,drawImage:SW,insertArrowHead:MTe,insertArrowEnd:ITe,insertArrowFilledHead:OTe,insertDynamicNumber:PTe,insertArrowCrossHead:BTe,insertDatabaseIcon:DTe,insertComputerIcon:RTe,insertClockIcon:NTe}});var zTe,Q3,A_=R(()=>{"use strict";zTe=typeof global=="object"&&global&&global.Object===Object&&global,Q3=zTe});var GTe,$Te,Jn,Ro=R(()=>{"use strict";A_();GTe=typeof self=="object"&&self&&self.Object===Object&&self,$Te=Q3||GTe||Function("return this")(),Jn=$Te});var VTe,Ji,vd=R(()=>{"use strict";Ro();VTe=Jn.Symbol,Ji=VTe});function YTe(t){var e=UTe.call(t,Zy),r=t[Zy];try{t[Zy]=void 0;var n=!0}catch{}var i=HTe.call(t);return n&&(e?t[Zy]=r:delete t[Zy]),i}var _W,UTe,HTe,Zy,LW,DW=R(()=>{"use strict";vd();_W=Object.prototype,UTe=_W.hasOwnProperty,HTe=_W.toString,Zy=Ji?Ji.toStringTag:void 0;o(YTe,"getRawTag");LW=YTe});function XTe(t){return qTe.call(t)}var WTe,qTe,RW,NW=R(()=>{"use strict";WTe=Object.prototype,qTe=WTe.toString;o(XTe,"objectToString");RW=XTe});function QTe(t){return t==null?t===void 0?KTe:jTe:MW&&MW in Object(t)?LW(t):RW(t)}var jTe,KTe,MW,fa,wu=R(()=>{"use strict";vd();DW();NW();jTe="[object Null]",KTe="[object Undefined]",MW=Ji?Ji.toStringTag:void 0;o(QTe,"baseGetTag");fa=QTe});function ZTe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var pn,Js=R(()=>{"use strict";o(ZTe,"isObject");pn=ZTe});function nke(t){if(!pn(t))return!1;var e=fa(t);return e==eke||e==tke||e==JTe||e==rke}var JTe,eke,tke,rke,wi,Jy=R(()=>{"use strict";wu();Js();JTe="[object AsyncFunction]",eke="[object Function]",tke="[object GeneratorFunction]",rke="[object Proxy]";o(nke,"isFunction");wi=nke});var ike,Z3,IW=R(()=>{"use strict";Ro();ike=Jn["__core-js_shared__"],Z3=ike});function ake(t){return!!OW&&OW in t}var OW,PW,BW=R(()=>{"use strict";IW();OW=function(){var t=/[^.]+$/.exec(Z3&&Z3.keys&&Z3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();o(ake,"isMasked");PW=ake});function lke(t){if(t!=null){try{return oke.call(t)}catch{}try{return t+""}catch{}}return""}var ske,oke,Tu,__=R(()=>{"use strict";ske=Function.prototype,oke=ske.toString;o(lke,"toSource");Tu=lke});function gke(t){if(!pn(t)||PW(t))return!1;var e=wi(t)?mke:uke;return e.test(Tu(t))}var cke,uke,hke,fke,dke,pke,mke,FW,zW=R(()=>{"use strict";Jy();BW();Js();__();cke=/[\\^$.*+?()[\]{}|]/g,uke=/^\[object .+?Constructor\]$/,hke=Function.prototype,fke=Object.prototype,dke=hke.toString,pke=fke.hasOwnProperty,mke=RegExp("^"+dke.call(pke).replace(cke,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o(gke,"baseIsNative");FW=gke});function yke(t,e){return t?.[e]}var GW,$W=R(()=>{"use strict";o(yke,"getValue");GW=yke});function vke(t,e){var r=GW(t,e);return FW(r)?r:void 0}var xs,Nh=R(()=>{"use strict";zW();$W();o(vke,"getNative");xs=vke});var xke,ku,ev=R(()=>{"use strict";Nh();xke=xs(Object,"create"),ku=xke});function bke(){this.__data__=ku?ku(null):{},this.size=0}var VW,UW=R(()=>{"use strict";ev();o(bke,"hashClear");VW=bke});function wke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var HW,YW=R(()=>{"use strict";o(wke,"hashDelete");HW=wke});function Cke(t){var e=this.__data__;if(ku){var r=e[t];return r===Tke?void 0:r}return Eke.call(e,t)?e[t]:void 0}var Tke,kke,Eke,WW,qW=R(()=>{"use strict";ev();Tke="__lodash_hash_undefined__",kke=Object.prototype,Eke=kke.hasOwnProperty;o(Cke,"hashGet");WW=Cke});function _ke(t){var e=this.__data__;return ku?e[t]!==void 0:Ake.call(e,t)}var Ske,Ake,XW,jW=R(()=>{"use strict";ev();Ske=Object.prototype,Ake=Ske.hasOwnProperty;o(_ke,"hashHas");XW=_ke});function Dke(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ku&&e===void 0?Lke:e,this}var Lke,KW,QW=R(()=>{"use strict";ev();Lke="__lodash_hash_undefined__";o(Dke,"hashSet");KW=Dke});function Hp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var L_,ZW=R(()=>{"use strict";UW();YW();qW();jW();QW();o(Hp,"Hash");Hp.prototype.clear=VW;Hp.prototype.delete=HW;Hp.prototype.get=WW;Hp.prototype.has=XW;Hp.prototype.set=KW;L_=Hp});function Rke(){this.__data__=[],this.size=0}var JW,eq=R(()=>{"use strict";o(Rke,"listCacheClear");JW=Rke});function Nke(t,e){return t===e||t!==t&&e!==e}var No,xd=R(()=>{"use strict";o(Nke,"eq");No=Nke});function Mke(t,e){for(var r=t.length;r--;)if(No(t[r][0],e))return r;return-1}var Mh,tv=R(()=>{"use strict";xd();o(Mke,"assocIndexOf");Mh=Mke});function Pke(t){var e=this.__data__,r=Mh(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Oke.call(e,r,1),--this.size,!0}var Ike,Oke,tq,rq=R(()=>{"use strict";tv();Ike=Array.prototype,Oke=Ike.splice;o(Pke,"listCacheDelete");tq=Pke});function Bke(t){var e=this.__data__,r=Mh(e,t);return r<0?void 0:e[r][1]}var nq,iq=R(()=>{"use strict";tv();o(Bke,"listCacheGet");nq=Bke});function Fke(t){return Mh(this.__data__,t)>-1}var aq,sq=R(()=>{"use strict";tv();o(Fke,"listCacheHas");aq=Fke});function zke(t,e){var r=this.__data__,n=Mh(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var oq,lq=R(()=>{"use strict";tv();o(zke,"listCacheSet");oq=zke});function Yp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var Ih,rv=R(()=>{"use strict";eq();rq();iq();sq();lq();o(Yp,"ListCache");Yp.prototype.clear=JW;Yp.prototype.delete=tq;Yp.prototype.get=nq;Yp.prototype.has=aq;Yp.prototype.set=oq;Ih=Yp});var Gke,Oh,J3=R(()=>{"use strict";Nh();Ro();Gke=xs(Jn,"Map"),Oh=Gke});function $ke(){this.size=0,this.__data__={hash:new L_,map:new(Oh||Ih),string:new L_}}var cq,uq=R(()=>{"use strict";ZW();rv();J3();o($ke,"mapCacheClear");cq=$ke});function Vke(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var hq,fq=R(()=>{"use strict";o(Vke,"isKeyable");hq=Vke});function Uke(t,e){var r=t.__data__;return hq(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ph,nv=R(()=>{"use strict";fq();o(Uke,"getMapData");Ph=Uke});function Hke(t){var e=Ph(this,t).delete(t);return this.size-=e?1:0,e}var dq,pq=R(()=>{"use strict";nv();o(Hke,"mapCacheDelete");dq=Hke});function Yke(t){return Ph(this,t).get(t)}var mq,gq=R(()=>{"use strict";nv();o(Yke,"mapCacheGet");mq=Yke});function Wke(t){return Ph(this,t).has(t)}var yq,vq=R(()=>{"use strict";nv();o(Wke,"mapCacheHas");yq=Wke});function qke(t,e){var r=Ph(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var xq,bq=R(()=>{"use strict";nv();o(qke,"mapCacheSet");xq=qke});function Wp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var bd,e5=R(()=>{"use strict";uq();pq();gq();vq();bq();o(Wp,"MapCache");Wp.prototype.clear=cq;Wp.prototype.delete=dq;Wp.prototype.get=mq;Wp.prototype.has=yq;Wp.prototype.set=xq;bd=Wp});function D_(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Xke);var r=o(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s},"memoized");return r.cache=new(D_.Cache||bd),r}var Xke,qp,R_=R(()=>{"use strict";e5();Xke="Expected a function";o(D_,"memoize");D_.Cache=bd;qp=D_});function jke(){this.__data__=new Ih,this.size=0}var wq,Tq=R(()=>{"use strict";rv();o(jke,"stackClear");wq=jke});function Kke(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var kq,Eq=R(()=>{"use strict";o(Kke,"stackDelete");kq=Kke});function Qke(t){return this.__data__.get(t)}var Cq,Sq=R(()=>{"use strict";o(Qke,"stackGet");Cq=Qke});function Zke(t){return this.__data__.has(t)}var Aq,_q=R(()=>{"use strict";o(Zke,"stackHas");Aq=Zke});function eEe(t,e){var r=this.__data__;if(r instanceof Ih){var n=r.__data__;if(!Oh||n.length<Jke-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bd(n)}return r.set(t,e),this.size=r.size,this}var Jke,Lq,Dq=R(()=>{"use strict";rv();J3();e5();Jke=200;o(eEe,"stackSet");Lq=eEe});function Xp(t){var e=this.__data__=new Ih(t);this.size=e.size}var uc,iv=R(()=>{"use strict";rv();Tq();Eq();Sq();_q();Dq();o(Xp,"Stack");Xp.prototype.clear=wq;Xp.prototype.delete=kq;Xp.prototype.get=Cq;Xp.prototype.has=Aq;Xp.prototype.set=Lq;uc=Xp});var tEe,jp,N_=R(()=>{"use strict";Nh();tEe=function(){try{var t=xs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),jp=tEe});function rEe(t,e,r){e=="__proto__"&&jp?jp(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var hc,Kp=R(()=>{"use strict";N_();o(rEe,"baseAssignValue");hc=rEe});function nEe(t,e,r){(r!==void 0&&!No(t[e],r)||r===void 0&&!(e in t))&&hc(t,e,r)}var av,M_=R(()=>{"use strict";Kp();xd();o(nEe,"assignMergeValue");av=nEe});function iEe(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),l=s.length;l--;){var u=s[t?l:++i];if(r(a[u],u,a)===!1)break}return e}}var Rq,Nq=R(()=>{"use strict";o(iEe,"createBaseFor");Rq=iEe});var aEe,Qp,t5=R(()=>{"use strict";Nq();aEe=Rq(),Qp=aEe});function oEe(t,e){if(e)return t.slice();var r=t.length,n=Oq?Oq(r):new t.constructor(r);return t.copy(n),n}var Pq,Mq,sEe,Iq,Oq,r5,I_=R(()=>{"use strict";Ro();Pq=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mq=Pq&&typeof module=="object"&&module&&!module.nodeType&&module,sEe=Mq&&Mq.exports===Pq,Iq=sEe?Jn.Buffer:void 0,Oq=Iq?Iq.allocUnsafe:void 0;o(oEe,"cloneBuffer");r5=oEe});var lEe,Zp,O_=R(()=>{"use strict";Ro();lEe=Jn.Uint8Array,Zp=lEe});function cEe(t){var e=new t.constructor(t.byteLength);return new Zp(e).set(new Zp(t)),e}var Jp,n5=R(()=>{"use strict";O_();o(cEe,"cloneArrayBuffer");Jp=cEe});function uEe(t,e){var r=e?Jp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var i5,P_=R(()=>{"use strict";n5();o(uEe,"cloneTypedArray");i5=uEe});function hEe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var a5,B_=R(()=>{"use strict";o(hEe,"copyArray");a5=hEe});var Bq,fEe,Fq,zq=R(()=>{"use strict";Js();Bq=Object.create,fEe=function(){function t(){}return o(t,"object"),function(e){if(!pn(e))return{};if(Bq)return Bq(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Fq=fEe});function dEe(t,e){return function(r){return t(e(r))}}var s5,F_=R(()=>{"use strict";o(dEe,"overArg");s5=dEe});var pEe,em,o5=R(()=>{"use strict";F_();pEe=s5(Object.getPrototypeOf,Object),em=pEe});function gEe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||mEe;return t===r}var mEe,fc,tm=R(()=>{"use strict";mEe=Object.prototype;o(gEe,"isPrototype");fc=gEe});function yEe(t){return typeof t.constructor=="function"&&!fc(t)?Fq(em(t)):{}}var l5,z_=R(()=>{"use strict";zq();o5();tm();o(yEe,"initCloneObject");l5=yEe});function vEe(t){return t!=null&&typeof t=="object"}var Wn,Mo=R(()=>{"use strict";o(vEe,"isObjectLike");Wn=vEe});function bEe(t){return Wn(t)&&fa(t)==xEe}var xEe,G_,Gq=R(()=>{"use strict";wu();Mo();xEe="[object Arguments]";o(bEe,"baseIsArguments");G_=bEe});var $q,wEe,TEe,kEe,kl,rm=R(()=>{"use strict";Gq();Mo();$q=Object.prototype,wEe=$q.hasOwnProperty,TEe=$q.propertyIsEnumerable,kEe=G_(function(){return arguments}())?G_:function(t){return Wn(t)&&wEe.call(t,"callee")&&!TEe.call(t,"callee")},kl=kEe});var EEe,wt,Bn=R(()=>{"use strict";EEe=Array.isArray,wt=EEe});function SEe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=CEe}var CEe,nm,c5=R(()=>{"use strict";CEe=9007199254740991;o(SEe,"isLength");nm=SEe});function AEe(t){return t!=null&&nm(t.length)&&!wi(t)}var ei,Io=R(()=>{"use strict";Jy();c5();o(AEe,"isArrayLike");ei=AEe});function _Ee(t){return Wn(t)&&ei(t)}var wd,u5=R(()=>{"use strict";Io();Mo();o(_Ee,"isArrayLikeObject");wd=_Ee});function LEe(){return!1}var Vq,Uq=R(()=>{"use strict";o(LEe,"stubFalse");Vq=LEe});var Wq,Hq,DEe,Yq,REe,NEe,El,im=R(()=>{"use strict";Ro();Uq();Wq=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hq=Wq&&typeof module=="object"&&module&&!module.nodeType&&module,DEe=Hq&&Hq.exports===Wq,Yq=DEe?Jn.Buffer:void 0,REe=Yq?Yq.isBuffer:void 0,NEe=REe||Vq,El=NEe});function FEe(t){if(!Wn(t)||fa(t)!=MEe)return!1;var e=em(t);if(e===null)return!0;var r=PEe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&qq.call(r)==BEe}var MEe,IEe,OEe,qq,PEe,BEe,Xq,jq=R(()=>{"use strict";wu();o5();Mo();MEe="[object Object]",IEe=Function.prototype,OEe=Object.prototype,qq=IEe.toString,PEe=OEe.hasOwnProperty,BEe=qq.call(Object);o(FEe,"isPlainObject");Xq=FEe});function c6e(t){return Wn(t)&&nm(t.length)&&!!Mn[fa(t)]}var zEe,GEe,$Ee,VEe,UEe,HEe,YEe,WEe,qEe,XEe,jEe,KEe,QEe,ZEe,JEe,e6e,t6e,r6e,n6e,i6e,a6e,s6e,o6e,l6e,Mn,Kq,Qq=R(()=>{"use strict";wu();c5();Mo();zEe="[object Arguments]",GEe="[object Array]",$Ee="[object Boolean]",VEe="[object Date]",UEe="[object Error]",HEe="[object Function]",YEe="[object Map]",WEe="[object Number]",qEe="[object Object]",XEe="[object RegExp]",jEe="[object Set]",KEe="[object String]",QEe="[object WeakMap]",ZEe="[object ArrayBuffer]",JEe="[object DataView]",e6e="[object Float32Array]",t6e="[object Float64Array]",r6e="[object Int8Array]",n6e="[object Int16Array]",i6e="[object Int32Array]",a6e="[object Uint8Array]",s6e="[object Uint8ClampedArray]",o6e="[object Uint16Array]",l6e="[object Uint32Array]",Mn={};Mn[e6e]=Mn[t6e]=Mn[r6e]=Mn[n6e]=Mn[i6e]=Mn[a6e]=Mn[s6e]=Mn[o6e]=Mn[l6e]=!0;Mn[zEe]=Mn[GEe]=Mn[ZEe]=Mn[$Ee]=Mn[JEe]=Mn[VEe]=Mn[UEe]=Mn[HEe]=Mn[YEe]=Mn[WEe]=Mn[qEe]=Mn[XEe]=Mn[jEe]=Mn[KEe]=Mn[QEe]=!1;o(c6e,"baseIsTypedArray");Kq=c6e});function u6e(t){return function(e){return t(e)}}var Oo,Td=R(()=>{"use strict";o(u6e,"baseUnary");Oo=u6e});var Zq,sv,h6e,$_,f6e,Po,ov=R(()=>{"use strict";A_();Zq=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sv=Zq&&typeof module=="object"&&module&&!module.nodeType&&module,h6e=sv&&sv.exports===Zq,$_=h6e&&Q3.process,f6e=function(){try{var t=sv&&sv.require&&sv.require("util").types;return t||$_&&$_.binding&&$_.binding("util")}catch{}}(),Po=f6e});var Jq,d6e,Bh,lv=R(()=>{"use strict";Qq();Td();ov();Jq=Po&&Po.isTypedArray,d6e=Jq?Oo(Jq):Kq,Bh=d6e});function p6e(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var cv,V_=R(()=>{"use strict";o(p6e,"safeGet");cv=p6e});function y6e(t,e,r){var n=t[e];(!(g6e.call(t,e)&&No(n,r))||r===void 0&&!(e in t))&&hc(t,e,r)}var m6e,g6e,dc,am=R(()=>{"use strict";Kp();xd();m6e=Object.prototype,g6e=m6e.hasOwnProperty;o(y6e,"assignValue");dc=y6e});function v6e(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var l=e[a],u=n?n(r[l],t[l],l,r,t):void 0;u===void 0&&(u=t[l]),i?hc(r,l,u):dc(r,l,u)}return r}var Bo,kd=R(()=>{"use strict";am();Kp();o(v6e,"copyObject");Bo=v6e});function x6e(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var eX,tX=R(()=>{"use strict";o(x6e,"baseTimes");eX=x6e});function T6e(t,e){var r=typeof t;return e=e??b6e,!!e&&(r=="number"||r!="symbol"&&w6e.test(t))&&t>-1&&t%1==0&&t<e}var b6e,w6e,Fh,uv=R(()=>{"use strict";b6e=9007199254740991,w6e=/^(?:0|[1-9]\d*)$/;o(T6e,"isIndex");Fh=T6e});function C6e(t,e){var r=wt(t),n=!r&&kl(t),i=!r&&!n&&El(t),a=!r&&!n&&!i&&Bh(t),s=r||n||i||a,l=s?eX(t.length,String):[],u=l.length;for(var h in t)(e||E6e.call(t,h))&&!(s&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Fh(h,u)))&&l.push(h);return l}var k6e,E6e,h5,U_=R(()=>{"use strict";tX();rm();Bn();im();uv();lv();k6e=Object.prototype,E6e=k6e.hasOwnProperty;o(C6e,"arrayLikeKeys");h5=C6e});function S6e(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var rX,nX=R(()=>{"use strict";o(S6e,"nativeKeysIn");rX=S6e});function L6e(t){if(!pn(t))return rX(t);var e=fc(t),r=[];for(var n in t)n=="constructor"&&(e||!_6e.call(t,n))||r.push(n);return r}var A6e,_6e,iX,aX=R(()=>{"use strict";Js();tm();nX();A6e=Object.prototype,_6e=A6e.hasOwnProperty;o(L6e,"baseKeysIn");iX=L6e});function D6e(t){return ei(t)?h5(t,!0):iX(t)}var bs,zh=R(()=>{"use strict";U_();aX();Io();o(D6e,"keysIn");bs=D6e});function R6e(t){return Bo(t,bs(t))}var sX,oX=R(()=>{"use strict";kd();zh();o(R6e,"toPlainObject");sX=R6e});function N6e(t,e,r,n,i,a,s){var l=cv(t,r),u=cv(e,r),h=s.get(u);if(h){av(t,r,h);return}var f=a?a(l,u,r+"",t,e,s):void 0,d=f===void 0;if(d){var p=wt(u),m=!p&&El(u),g=!p&&!m&&Bh(u);f=u,p||m||g?wt(l)?f=l:wd(l)?f=a5(l):m?(d=!1,f=r5(u,!0)):g?(d=!1,f=i5(u,!0)):f=[]:Xq(u)||kl(u)?(f=l,kl(l)?f=sX(l):(!pn(l)||wi(l))&&(f=l5(u))):d=!1}d&&(s.set(u,f),i(f,u,n,a,s),s.delete(u)),av(t,r,f)}var lX,cX=R(()=>{"use strict";M_();I_();P_();B_();z_();rm();Bn();u5();im();Jy();Js();jq();lv();V_();oX();o(N6e,"baseMergeDeep");lX=N6e});function uX(t,e,r,n,i){t!==e&&Qp(e,function(a,s){if(i||(i=new uc),pn(a))lX(t,e,s,r,uX,n,i);else{var l=n?n(cv(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),av(t,s,l)}},bs)}var hX,fX=R(()=>{"use strict";iv();M_();t5();cX();Js();zh();V_();o(uX,"baseMerge");hX=uX});function M6e(t){return t}var ea,Eu=R(()=>{"use strict";o(M6e,"identity");ea=M6e});function I6e(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var dX,pX=R(()=>{"use strict";o(I6e,"apply");dX=I6e});function O6e(t,e,r){return e=mX(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=mX(n.length-e,0),s=Array(a);++i<a;)s[i]=n[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=n[i];return l[e]=r(s),dX(t,this,l)}}var mX,f5,H_=R(()=>{"use strict";pX();mX=Math.max;o(O6e,"overRest");f5=O6e});function P6e(t){return function(){return t}}var ws,Y_=R(()=>{"use strict";o(P6e,"constant");ws=P6e});var B6e,gX,yX=R(()=>{"use strict";Y_();N_();Eu();B6e=jp?function(t,e){return jp(t,"toString",{configurable:!0,enumerable:!1,value:ws(e),writable:!0})}:ea,gX=B6e});function $6e(t){var e=0,r=0;return function(){var n=G6e(),i=z6e-(n-r);if(r=n,i>0){if(++e>=F6e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var F6e,z6e,G6e,vX,xX=R(()=>{"use strict";F6e=800,z6e=16,G6e=Date.now;o($6e,"shortOut");vX=$6e});var V6e,d5,W_=R(()=>{"use strict";yX();xX();V6e=vX(gX),d5=V6e});function U6e(t,e){return d5(f5(t,e,ea),t+"")}var pc,sm=R(()=>{"use strict";Eu();H_();W_();o(U6e,"baseRest");pc=U6e});function H6e(t,e,r){if(!pn(r))return!1;var n=typeof e;return(n=="number"?ei(r)&&Fh(e,r.length):n=="string"&&e in r)?No(r[e],t):!1}var eo,Ed=R(()=>{"use strict";xd();Io();uv();Js();o(H6e,"isIterateeCall");eo=H6e});function Y6e(t){return pc(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&eo(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var l=r[n];l&&t(e,l,n,a)}return e})}var p5,q_=R(()=>{"use strict";sm();Ed();o(Y6e,"createAssigner");p5=Y6e});var W6e,Gh,X_=R(()=>{"use strict";fX();q_();W6e=p5(function(t,e,r){hX(t,e,r)}),Gh=W6e});function om(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return q6e[r]??e}function Q6e(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,TX.sanitizeUrl)(r):r}function CX(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function J6e(t){let e,r=0;t.forEach(i=>{r+=CX(i,e),e=i});let n=r/2;return Q_(t,n)}function eCe(t){return t.length===1?t[0]:J6e(t)}function rCe(t,e,r){let n=structuredClone(r);V.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=Q_(n,i),s=10+t*.5,l=Math.atan2(n[0].y-a.y,n[0].x-a.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(l+Math.PI)*s+(n[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(u.x=Math.sin(l-Math.PI)*s+(n[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(u.x=Math.sin(l)*s+(n[0].x+a.x)/2-5,u.y=-Math.cos(l)*s+(n[0].y+a.y)/2-5):(u.x=Math.sin(l)*s+(n[0].x+a.x)/2,u.y=-Math.cos(l)*s+(n[0].y+a.y)/2),u}function lm(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function nCe(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}function g5(t,e){return t9(t,e).height}function Cl(t,e){return t9(t,e).width}function r9(t){return"str"in t}function Ts(t,e){return Gh({},t,e)}var TX,K_,q6e,X6e,j6e,kX,EX,K6e,Z6e,bX,Q_,tCe,wX,Z_,J_,iCe,aCe,e9,sCe,t9,j_,m5,oCe,lCe,mc,Lt,SX,to,y5,xr=R(()=>{"use strict";TX=Xi(Up(),1);Zt();rr();r7();ut();Hf();cp();R_();X_();Vb();K_="\u200B",q6e={curveBasis:vs,curveBasisClosed:B3,curveBasisOpen:F3,curveBumpX:s_,curveBumpY:o_,curveBundle:l_,curveCardinalClosed:u_,curveCardinalOpen:f_,curveCardinal:c_,curveCatmullRomClosed:m_,curveCatmullRomOpen:g_,curveCatmullRom:p_,curveLinear:xu,curveLinearClosed:U3,curveMonotoneX:v_,curveMonotoneY:x_,curveNatural:Y3,curveStep:q3,curveStepAfter:w_,curveStepBefore:b_},X6e=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,j6e=o(function(t,e){let r=kX(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(l=>l.args);fp(s),n=On(n,[...s])}else n=r.args;if(!n)return;let i=lp(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),kX=o(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${X6e.source})(?=[}][%]{2}).*
330 `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),V.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=Vf.exec(t))!==null;)if(n.index===Vf.lastIndex&&Vf.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return V.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),EX=o(function(t){return t.replace(Vf,"")},"removeDirectives"),K6e=o(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");o(om,"interpolateToCurve");o(Q6e,"formatUrl");Z6e=o((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a){V.error(`Function name: ${t} not found in window`);return}a[i](...e)},"runFunc");o(CX,"distance");o(J6e,"traverseEdge");o(eCe,"calcLabelPosition");bX=o((t,e=2)=>{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Q_=o((t,e)=>{let r,n=e;for(let i of t){if(r){let a=CX(i,r);if(a<n)n-=a;else{let s=n/a;if(s<=0)return r;if(s>=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:bX((1-s)*r.x+s*i.x,5),y:bX((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),tCe=o((t,e,r)=>{V.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=Q_(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(s)*a+(e[0].x+i.x)/2,l.y=-Math.cos(s)*a+(e[0].y+i.y)/2,l},"calcCardinalityPosition");o(rCe,"calcTerminalLabelPosition");o(lm,"getStylesFromArray");wX=0,Z_=o(()=>(wX++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wX),"generateId");o(nCe,"makeRandomHex");J_=o(t=>nCe(t.length),"random"),iCe=o(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"),aCe=o(function(t,e){let r=e.text.replace(We.lineBreakRegex," "),[,n]=mc(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),e9=qp((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),We.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,l)=>{let u=Cl(`${s} `,r),h=Cl(a,r);if(u>e){let{hyphenatedStrings:p,remainingWord:m}=sCe(s,e,"-",r);i.push(a,...p),a=m}else h+u>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sCe=qp((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((l,u)=>{let h=`${s}${l}`;if(Cl(h,n)>=e){let d=u+1,p=i.length===d,m=`${h}${r}`;a.push(p?h:m),s=""}else s=h}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);o(g5,"calculateTextHeight");o(Cl,"calculateTextWidth");t9=qp((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=mc(r),s=["sans-serif",n],l=t.split(We.lineBreakRegex),u=[],h=$e("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of s){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=iCe();v.text=y||K_;let x=aCe(f,v).style("font-size",a).style("font-weight",i).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)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),j_=class{constructor(e=!1,r){this.count=0;this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{o(this,"InitIDGenerator")}},oCe=o(function(t){return m5=m5||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),m5.innerHTML=t,unescape(m5.textContent)},"entityDecode");o(r9,"isDetailedError");lCe=o((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),mc=o(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");o(Ts,"cleanAndMerge");Lt={assignWithDepth:On,wrapLabel:e9,calculateTextHeight:g5,calculateTextWidth:Cl,calculateTextDimensions:t9,cleanAndMerge:Ts,detectInit:j6e,detectDirective:kX,isSubstringInArray:K6e,interpolateToCurve:om,calcLabelPosition:eCe,calcCardinalityPosition:tCe,calcTerminalLabelPosition:rCe,formatUrl:Q6e,getStylesFromArray:lm,generateId:Z_,random:J_,runFunc:Z6e,entityDecode:oCe,insertTitle:lCe,parseFontSize:mc,InitIDGenerator:j_},SX=o(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 n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),to=o(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),y5=o((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId")});function Sl(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=e9(e[t].text,i,n),e[t].textLines=e[t].text.split(We.lineBreakRegex).length,e[t].width=i,e[t].height=g5(e[t].text,n);else{let a=e[t].text.split(We.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let l of a)e[t].width=Math.max(Cl(l,n),e[t].width),s=g5(l,n),e[t].height=e[t].height+s}}function RX(t,e,r,n,i){let a=new w5(i);a.data.widthLimit=r.data.widthLimit/Math.min(n9,n.length);for(let[s,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&Nt.wrap,f=v5(Nt);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Sl("label",l,h,f,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=v5(Nt);Sl("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=v5(Nt);g.fontSize=g.fontSize-2,Sl("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(s==0||s%n9===0){let g=r.data.startx+Nt.diagramMarginX,y=r.data.stopy+Nt.diagramMarginY+u;a.setData(g,g,y,y)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Nt.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y)}a.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&DX(a,t,d,p),e=l.alias;let m=i.db.getBoundarys(e);m.length>0&&RX(t,e,a,m,i),l.alias!=="global"&&LX(t,l,a),r.data.stopy=Math.max(a.data.stopy+Nt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Nt.c4ShapeMargin,r.data.stopx),x5=Math.max(x5,r.data.stopx),b5=Math.max(b5,r.data.stopy)}}var x5,b5,_X,n9,Nt,w5,i9,hv,v5,cCe,LX,DX,ks,AX,uCe,hCe,fCe,a9,NX=R(()=>{"use strict";Zt();AW();ut();VC();rr();lS();_t();cp();xr();Yn();x5=0,b5=0,_X=4,n9=2;U1.yy=hy;Nt={},w5=class{static{o(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,i9(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>_X)&&(r=this.nextData.startx+e.margin+Nt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},i9(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},i9=o(function(t){On(Nt,t),t.fontFamily&&(Nt.personFontFamily=Nt.systemFontFamily=Nt.messageFontFamily=t.fontFamily),t.fontSize&&(Nt.personFontSize=Nt.systemFontSize=Nt.messageFontSize=t.fontSize),t.fontWeight&&(Nt.personFontWeight=Nt.systemFontWeight=Nt.messageFontWeight=t.fontWeight)},"setConf"),hv=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),v5=o(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),cCe=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");o(Sl,"calcC4ShapeTextWH");LX=o(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Nt.c4ShapeMargin-35;let n=e.wrap&&Nt.wrap,i=v5(Nt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=Cl(e.label.text,i);Sl("label",e,n,i,a),Tl.drawBoundary(t,e,Nt)},"drawBoundary"),DX=o(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],l=hv(Nt,s.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,s.typeC4Shape.width=Cl("\xAB"+s.typeC4Shape.text+"\xBB",l),s.typeC4Shape.height=l.fontSize+2,s.typeC4Shape.Y=Nt.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let u=s.wrap&&Nt.wrap,h=Nt.width-Nt.c4ShapePadding*2,f=hv(Nt,s.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Sl("label",s,u,f,h),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let m=hv(Nt,s.typeC4Shape.text);Sl("type",s,u,m,h),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let m=hv(Nt,s.techn.text);Sl("techn",s,u,m,h),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let d=i,p=s.label.width;if(s.descr&&s.descr.text!==""){let m=hv(Nt,s.typeC4Shape.text);Sl("descr",s,u,m,h),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,p=Math.max(s.label.width,s.descr.width),d=i-s.descr.textLines*5}p=p+Nt.c4ShapePadding,s.width=Math.max(s.width||Nt.width,p,Nt.width),s.height=Math.max(s.height||Nt.height,d,Nt.height),s.margin=s.margin||Nt.c4ShapeMargin,t.insert(s),Tl.drawC4Shape(e,s,Nt)}t.bumpLastMargin(Nt.c4ShapeMargin)},"drawC4ShapeArray"),ks=class{static{o(this,"Point")}constructor(e,r){this.x=e,this.y=r}},AX=o(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,l=n+t.height/2,u=Math.abs(r-i),h=Math.abs(n-a),f=h/u,d=t.height/t.width,p=null;return n==a&&r<i?p=new ks(r+t.width,l):n==a&&r>i?p=new ks(r,l):r==i&&n<a?p=new ks(s,n+t.height):r==i&&n>a&&(p=new ks(s,n)),r>i&&n<a?d>=f?p=new ks(r,l+f*t.width/2):p=new ks(s-u/h*t.height/2,n+t.height):r<i&&n<a?d>=f?p=new ks(r+t.width,l+f*t.width/2):p=new ks(s+u/h*t.height/2,n+t.height):r<i&&n>a?d>=f?p=new ks(r+t.width,l-f*t.width/2):p=new ks(s+t.height/2*u/h,n):r>i&&n>a&&(d>=f?p=new ks(r,l-t.width/2*f):p=new ks(s-t.height/2*u/h,n)),p},"getIntersectPoint"),uCe=o(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=AX(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=AX(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),hCe=o(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Nt.wrap,l=cCe(Nt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let h=Cl(a.label.text,l);Sl("label",a,s,l,h),a.techn&&a.techn.text!==""&&(h=Cl(a.techn.text,l),Sl("techn",a,s,l,h)),a.descr&&a.descr.text!==""&&(h=Cl(a.descr.text,l),Sl("descr",a,s,l,h));let f=r(a.from),d=r(a.to),p=uCe(f,d);a.startPoint=p.startPoint,a.endPoint=p.endPoint}Tl.drawRels(t,e,Nt)},"drawRels");o(RX,"drawInsideBoundary");fCe=o(function(t,e,r,n){Nt=de().c4;let i=de().securityLevel,a;i==="sandbox"&&(a=$e("#i"+e));let s=i==="sandbox"?$e(a.nodes()[0].contentDocument.body):$e("body"),l=n.db;n.db.setWrap(Nt.wrap),_X=l.getC4ShapeInRow(),n9=l.getC4BoundaryInRow(),V.debug(`C:${JSON.stringify(Nt,null,2)}`);let u=i==="sandbox"?s.select(`[id="${e}"]`):$e(`[id="${e}"]`);Tl.insertComputerIcon(u),Tl.insertDatabaseIcon(u),Tl.insertClockIcon(u);let h=new w5(n);h.setData(Nt.diagramMarginX,Nt.diagramMarginX,Nt.diagramMarginY,Nt.diagramMarginY),h.data.widthLimit=screen.availWidth,x5=Nt.diagramMarginX,b5=Nt.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundarys("");RX(u,"",h,d,n),Tl.insertArrowHead(u),Tl.insertArrowEnd(u),Tl.insertArrowCrossHead(u),Tl.insertArrowFilledHead(u),hCe(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=x5,h.data.stopy=b5;let p=h.data,g=p.stopy-p.starty+2*Nt.diagramMarginY,v=p.stopx-p.startx+2*Nt.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*Nt.diagramMarginX).attr("y",p.starty+Nt.diagramMarginY),Sr(u,g,v,Nt.useMaxWidth);let x=f?60:0;u.attr("viewBox",p.startx-Nt.diagramMarginX+" -"+(Nt.diagramMarginY+x)+" "+v+" "+(g+x)),V.debug("models:",p)},"draw"),a9={drawPersonOrSystemArray:DX,drawBoundary:LX,setConf:i9,draw:fCe}});var dCe,MX,IX=R(()=>{"use strict";dCe=o(t=>`.person {
334 `,"getStyles"),MX=dCe});var OX={};hr(OX,{diagram:()=>pCe});var pCe,PX=R(()=>{"use strict";VC();lS();NX();IX();pCe={parser:rz,db:hy,renderer:a9,styles:MX,init:o(({c4:t,wrap:e})=>{a9.setConf(t),hy.setWrap(e)},"init")}});function o9(t){let e=[];for(let r of t){let n=dv.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}var vCe,zX,cm,$h,Es,dv,Cu,l9,c9,T5,s9,Fo,k5,E5,C5,S5,xCe,bCe,wCe,TCe,kCe,ECe,CCe,u9,SCe,ACe,_Ce,GX,LCe,DCe,h9,$X,VX,RCe,UX,NCe,MCe,ICe,OCe,PCe,fv,HX,YX,BCe,FCe,WX,zCe,GCe,$Ce,VCe,UCe,qX,XX,HCe,YCe,WCe,qCe,XCe,jCe,A5,f9=R(()=>{"use strict";Zt();xr();_t();rr();ut();bi();vCe="flowchart-",zX=0,cm=de(),$h=new Map,Es=[],dv=new Map,Cu=[],l9=new Map,c9=new Map,T5=0,s9=!0,E5=[],C5=o(t=>We.sanitizeText(t,cm),"sanitizeText"),S5=o(function(t){for(let e of $h.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),xCe=o(function(t,e,r,n,i,a,s={}){if(!t||t.trim().length===0)return;let l,u=$h.get(t);u===void 0&&(u={id:t,labelType:"text",domId:vCe+t+"-"+zX,styles:[],classes:[]},$h.set(t,u)),zX++,e!==void 0?(cm=de(),l=C5(e.text.trim()),u.labelType=e.type,l.startsWith('"')&&l.endsWith('"')&&(l=l.substring(1,l.length-1)),u.text=l):u.text===void 0&&(u.text=t),r!==void 0&&(u.type=r),n?.forEach(function(h){u.styles.push(h)}),i?.forEach(function(h){u.classes.push(h)}),a!==void 0&&(u.dir=a),u.props===void 0?u.props=s:s!==void 0&&Object.assign(u.props,s)},"addVertex"),bCe=o(function(t,e,r){let a={start:t,end:e,type:void 0,text:"",labelType:"text"};V.info("abc78 Got edge...",a);let s=r.text;if(s!==void 0&&(a.text=C5(s.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=s.type),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),Es.length<(cm.maxEdges??500))V.info("Pushing edge..."),Es.push(a);else throw new Error(`Edge limit exceeded. ${Es.length} edges found, but the limit is ${cm.maxEdges}.
338 You have to call mermaid.initialize.`)},"addSingleLink"),wCe=o(function(t,e,r){V.info("addLink",t,e,r);for(let n of t)for(let i of e)bCe(n,i,r)},"addLink"),TCe=o(function(t,e){t.forEach(function(r){r==="default"?Es.defaultInterpolate=e:Es[r].interpolate=e})},"updateLinkInterpolate"),kCe=o(function(t,e){t.forEach(function(r){if(typeof r=="number"&&r>=Es.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${Es.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?Es.defaultStyle=e:(Es[r].style=e,(Es[r]?.style?.length??0)>0&&!Es[r]?.style?.some(n=>n?.startsWith("fill"))&&Es[r]?.style?.push("fill:none"))})},"updateLink"),ECe=o(function(t,e){t.split(",").forEach(function(r){let n=dv.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},dv.set(r,n)),e?.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})},"addClass"),CCe=o(function(t){Fo=t,/.*</.exec(Fo)&&(Fo="RL"),/.*\^/.exec(Fo)&&(Fo="BT"),/.*>/.exec(Fo)&&(Fo="LR"),/.*v/.exec(Fo)&&(Fo="TB"),Fo==="TD"&&(Fo="TB")},"setDirection"),u9=o(function(t,e){for(let r of t.split(",")){let n=$h.get(r);n&&n.classes.push(e);let i=l9.get(r);i&&i.classes.push(e)}},"setClass"),SCe=o(function(t,e){if(e!==void 0){e=C5(e);for(let r of t.split(","))c9.set(k5==="gen-1"?S5(r):r,e)}},"setTooltip"),ACe=o(function(t,e,r){let n=S5(t);if(de().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let l=i[s].trim();l.startsWith('"')&&l.endsWith('"')&&(l=l.substr(1,l.length-2)),i[s]=l}}i.length===0&&i.push(t);let a=$h.get(t);a&&(a.haveCallback=!0,E5.push(function(){let s=document.querySelector(`[id="${n}"]`);s!==null&&s.addEventListener("click",function(){Lt.runFunc(e,...i)},!1)}))},"setClickFun"),_Ce=o(function(t,e,r){t.split(",").forEach(function(n){let i=$h.get(n);i!==void 0&&(i.link=Lt.formatUrl(e,cm),i.linkTarget=r)}),u9(t,"clickable")},"setLink"),GX=o(function(t){return c9.get(t)},"getTooltip"),LCe=o(function(t,e,r){t.split(",").forEach(function(n){ACe(n,e,r)}),u9(t,"clickable")},"setClickEvent"),DCe=o(function(t){E5.forEach(function(e){e(t)})},"bindFunctions"),h9=o(function(){return Fo.trim()},"getDirection"),$X=o(function(){return $h},"getVertices"),VX=o(function(){return Es},"getEdges"),RCe=o(function(){return dv},"getClasses"),UX=o(function(t){let e=$e(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=$e("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),$e(t).select("svg").selectAll("g.node").on("mouseover",function(){let i=$e(this);if(i.attr("title")===null)return;let s=this?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.bottom+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),$e(this).classed("hover",!1)})},"setupToolTips");E5.push(UX);NCe=o(function(t="gen-1"){$h=new Map,dv=new Map,Es=[],E5=[UX],Cu=[],l9=new Map,T5=0,c9=new Map,s9=!0,k5=t,cm=de(),vr()},"clear"),MCe=o(t=>{k5=t||"gen-2"},"setGen"),ICe=o(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),OCe=o(function(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);function a(h){let f={boolean:{},number:{},string:{}},d=[],p;return{nodeList:h.filter(function(g){let y=typeof g;return g.stmt&&g.stmt==="dir"?(p=g.value,!1):g.trim()===""?!1:y in f?f[y].hasOwnProperty(g)?!1:f[y][g]=!0:d.includes(g)?!1:d.push(g)}),dir:p}}o(a,"uniq");let{nodeList:s,dir:l}=a(e.flat());if(k5==="gen-1")for(let h=0;h<s.length;h++)s[h]=S5(s[h]);n=n??"subGraph"+T5,i=i||"",i=C5(i),T5=T5+1;let u={id:n,nodes:s,title:i.trim(),classes:[],dir:l,labelType:r.type};return V.info("Adding",u.id,u.nodes,u.dir),u.nodes=XX(u,Cu).nodes,Cu.push(u),l9.set(n,u),n},"addSubGraph"),PCe=o(function(t){for(let[e,r]of Cu.entries())if(r.id===t)return e;return-1},"getPosForId"),fv=-1,HX=[],YX=o(function(t,e){let r=Cu[e].nodes;if(fv=fv+1,fv>2e3)return{result:!1,count:0};if(HX[fv]=e,Cu[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){let a=PCe(r[n]);if(a>=0){let s=YX(t,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}},"indexNodes2"),BCe=o(function(t){return HX[t]},"getDepthFirstPos"),FCe=o(function(){fv=-1,Cu.length>0&&YX("none",Cu.length-1)},"indexNodes"),WX=o(function(){return Cu},"getSubGraphs"),zCe=o(()=>s9?(s9=!1,!0):!1,"firstGraph"),GCe=o(t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),$Ce=o((t,e)=>{let r=e.length,n=0;for(let i=0;i<r;++i)e[i]===t&&++n;return n},"countChar"),VCe=o(t=>{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let s=$Ce(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}},"destructEndLink"),UCe=o((t,e)=>{let r=VCe(t),n;if(e){if(n=GCe(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},"destructLink"),qX=o((t,e)=>{for(let r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),XX=o((t,e)=>{let r=[];return t.nodes.forEach((n,i)=>{qX(e,n)||r.push(t.nodes[i])}),{nodes:r}},"makeUniq"),HCe={firstGraph:zCe},YCe=o(t=>t.type==="square"?"squareRect":t.type==="round"?"roundedRect":t.type??"squareRect","getTypeFromVertex"),WCe=o((t,e)=>t.find(r=>r.id===e),"findNode"),qCe=o(t=>{let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e;break}return{arrowTypeStart:e,arrowTypeEnd:r}},"destructEdgeType"),XCe=o((t,e,r,n,i,a)=>{let s=r.get(t.id),l=n.get(t.id)??!1,u=WCe(e,t.id);u?(u.cssStyles=t.styles,u.cssCompiledStyles=o9(t.classes),u.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:s,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:o9(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:YCe(t),dir:t.dir,domId:t.domId,isGroup:l,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:GX(t.id)})},"addNodeFromVertex");o(o9,"getCompiledStyles");jCe=o(()=>{let t=de(),e=[],r=[],n=WX(),i=new Map,a=new Map;for(let u=n.length-1;u>=0;u--){let h=n[u];h.nodes.length>0&&a.set(h.id,!0);for(let f of h.nodes)i.set(f,h.id)}for(let u=n.length-1;u>=0;u--){let h=n[u];e.push({id:h.id,label:h.title,labelStyle:"",parentId:i.get(h.id),padding:8,cssCompiledStyles:o9(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:t.look})}$X().forEach(u=>{XCe(u,e,i,a,t,t.look||"classic")});let l=VX();return l.forEach((u,h)=>{let{arrowTypeStart:f,arrowTypeEnd:d}=qCe(u.type),p=[...l.defaultStyle??[]];u.style&&p.push(...u.style);let m={id:y5(u.start,u.end,{counter:h,prefix:"L"}),start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"?"none":f,arrowTypeEnd:u?.stroke==="invisible"?"none":d,arrowheadStyle:"fill: #333",labelStyle:p,style:p,pattern:u.stroke,look:t.look};r.push(m)}),{nodes:e,edges:r,other:{},config:t}},"getData"),A5={defaultConfig:o(()=>_4.flowchart,"defaultConfig"),setAccTitle:kr,getAccTitle:Ar,getAccDescription:Lr,getData:jCe,setAccDescription:_r,addVertex:xCe,lookUpDomId:S5,addLink:wCe,updateLinkInterpolate:TCe,updateLink:kCe,addClass:ECe,setDirection:CCe,setClass:u9,setTooltip:SCe,getTooltip:GX,setClickEvent:LCe,setLink:_Ce,bindFunctions:DCe,getDirection:h9,getVertices:$X,getEdges:VX,getClasses:RCe,clear:NCe,setGen:MCe,defaultStyle:ICe,addSubGraph:OCe,getDepthFirstPos:BCe,indexNodes:FCe,getSubGraphs:WX,destructLink:UCe,lex:HCe,exists:qX,makeUniq:XX,setDiagramTitle:nn,getDiagramTitle:Xr}});var KCe,jX,KX=R(()=>{"use strict";KCe=o(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),jX=o((t,e,r)=>{let n=KCe(t),i=2,a=e.height+2*r.padding,s=a/i,l=e.width+2*s+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*u},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*u,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*u},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*u,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-u},{x:l-s,y:-u},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+u},{x:s,y:-a+u},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:s,y:-u},{x:s,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-s,y:-a+u},{x:l-s,y:-u},{x:l,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-u},{x:s,y:-u},{x:l-s,y:-u},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+u},{x:s,y:-a+u},{x:s,y:-a+u}]:n.has("left")?[{x:s,y:0},{x:s,y:-u},{x:l-s,y:-u},{x:l-s,y:-a+u},{x:s,y:-a+u},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-u},{x:s,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-s,y:-a+u},{x:l-s,y:-u}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:s,y:-u},{x:s,y:-a+u},{x:l-s,y:-a+u},{x:l-s,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints")});function m9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function rj(t){Sd=t}function ro(t,e){if(e){if(nj.test(t))return t.replace(QCe,QX)}else if(ij.test(t))return t.replace(ZCe,QX);return t}function t7e(t){return t.replace(e7e,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function ln(t,e){let r=typeof t=="string"?t:t.source;e=e||"";let n={replace:o((i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(r7e,"$1"),r=r.replace(i,s),n},"replace"),getRegex:o(()=>new RegExp(r,e),"getRegex")};return n}function ZX(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function JX(t,e){let r=t.replace(/\|/g,(a,s,l)=>{let u=!1,h=s;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function pv(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n;){let a=t.charAt(n-i-1);if(a===e&&!r)i++;else if(a!==e&&r)i++;else break}return t.slice(0,n-i)}function n7e(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function ej(t,e,r,n){let i=e.href,a=e.title?ro(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;let l={type:"link",raw:r,href:i,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}return{type:"image",raw:r,href:i,title:a,text:ro(s)}}function i7e(t,e){let r=t.match(/^(\s+)(?:```)/);if(r===null)return e;let n=r[1];return e.split(`
398 `),de()));let u=e.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),xj(h,e.labelStyle),h.attr("class",`${u} ${n}`),xj(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let f=s.node().getBoundingClientRect();return f.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),f=s.node().getBoundingClientRect()),a.node()}function T9(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function O7e(t,e,r){let n=t.append("text"),i=T9(n,1,e);k9(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function bj(t,e,r){let n=t.append("text"),i=T9(n,1,e);k9(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function P7e(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=o(p=>O7e(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:yj(h,f);for(let p of d){let m=T9(l,u,1.1);k9(m,p),u++}}if(n){let h=l.node().getBBox(),f=2;return s.attr("x",-f).attr("y",-f).attr("width",h.width+2*f).attr("height",h.height+2*f),a.node()}else return l.node()}function k9(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}function E9(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(":"," ")}'></i>`)}var ta,Al=R(()=>{"use strict";_t();rr();Zt();ut();mj();xr();vj();o(xj,"applyStyle");o(I7e,"addHtmlSpan");o(T9,"createTspan");o(O7e,"computeWidthOfText");o(bj,"computeDimensionOfText");o(P7e,"createFormattedText");o(k9,"updateTextContentAndStyles");o(E9,"replaceIconSubstring");ta=o(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(V.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",u),a){let f=pj(e,h),d=E9(to(f)),p=e.replace(/\\\\/g,"\\"),m={isNode:s,label:Ni(e)?p:d,labelStyle:r.replace("fill:","color:")};return await I7e(t,m,l,i,u)}else{let f=e.replace(/<br\s*\/?>/g,"<br/>"),d=dj(f.replace("<br>","<br/>"),h),p=P7e(l,t,d,e?u:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");$e(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");$e(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");$e(p).select("text").attr("style",g)}return p}},"createText")});function wj(t,e){e&&t.attr("style",e)}function B7e(t){let e=$e(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wj(a,t.labelStyle),a.attr("class",i),wj(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var F7e,ra,bv=R(()=>{"use strict";Zt();ut();_t();rr();xr();Al();o(wj,"applyStyle");o(B7e,"addHtmlLabel");F7e=o((t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),yr(de().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),V.debug("vertexText"+i);let a={isNode:n,label:E9(to(i)),labelStyle:e.replace("fill:","color:")};return B7e(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?s=i:s=[];for(let l of s){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),ra=F7e});function z7e(t,e){return t.intersect(e)}var Tj,kj=R(()=>{"use strict";o(z7e,"intersectNode");Tj=z7e});function G7e(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x<i&&(h=-h);var f=Math.abs(e*r*l/u);return n.y<a&&(f=-f),{x:i+h,y:a+f}}var R5,C9=R(()=>{"use strict";o(G7e,"intersectEllipse");R5=G7e});function $7e(t,e,r){return R5(t,e,e,r)}var Ej,Cj=R(()=>{"use strict";C9();o($7e,"intersectCircle");Ej=$7e});function V7e(t,e,r,n){var i,a,s,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+s*r.y+u,m=i*n.x+s*n.y+u,!(p!==0&&m!==0&&Sj(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&Sj(f,d))&&(g=i*l-a*s,g!==0)))return y=Math.abs(g/2),v=s*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function Sj(t,e){return t*e>0}var Aj,_j=R(()=>{"use strict";o(V7e,"intersectLine");o(Sj,"sameSign");Aj=V7e});function U7e(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){s=Math.min(s,g.x),l=Math.min(l,g.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var u=n-t.width/2-s,h=i-t.height/2-l,f=0;f<e.length;f++){var d=e[f],p=e[f<e.length-1?f+1:0],m=Aj(t,r,{x:u+d.x,y:h+d.y},{x:u+p.x,y:h+p.y});m&&a.push(m)}return a.length?(a.length>1&&a.sort(function(g,y){var v=g.x-r.x,x=g.y-r.y,b=Math.sqrt(v*v+x*x),w=y.x-r.x,S=y.y-r.y,T=Math.sqrt(w*w+S*S);return b<T?-1:b===T?0:1}),a[0]):t}var Lj,Dj=R(()=>{"use strict";_j();Lj=U7e;o(U7e,"intersectPolygon")});var H7e,Ad,S9=R(()=>{"use strict";H7e=o((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2,u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(s=-s),u=s,h=i===0?0:s*a/i),{x:r+u,y:n+h}},"intersectRect"),Ad=H7e});var Tn,A9=R(()=>{"use strict";kj();Cj();C9();Dj();S9();Tn={node:Tj,circle:Ej,ellipse:R5,polygon:Lj,rect:Ad}});function _l(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var Ti,kn,N5=R(()=>{"use strict";bv();Al();_t();Zt();rr();xr();Ti=o(async(t,e,r,n)=>{let i=de(),a,s=e.useHtmlLabels||yr(i.flowchart.htmlLabels);r?a=r:a="node default";let l=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=l.insert("g").attr("class","label").attr("style",e.labelStyle),h;e.labelText===void 0?h="":h=typeof e.labelText=="string"?e.labelText:e.labelText[0];let f=u.node(),d;e.labelType==="markdown"?d=ta(u,qr(to(h),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):d=f.appendChild(ra(qr(to(h),i),e.labelStyle,!1,n));let p=d.getBBox(),m=e.padding/2;if(yr(i.flowchart.htmlLabels)){let g=d.children[0],y=$e(d),v=g.getElementsByTagName("img");if(v){let x=h.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...v].map(b=>new Promise(w=>{function S(){if(b.style.display="flex",b.style.flexDirection="column",x){let T=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,_=parseInt(T,10)*5+"px";b.style.minWidth=_,b.style.maxWidth=_}else b.style.width="100%";w(b)}o(S,"setupImage"),setTimeout(()=>{b.complete&&S()}),b.addEventListener("error",S),b.addEventListener("load",S)})))}p=g.getBoundingClientRect(),y.attr("width",p.width),y.attr("height",p.height)}return s?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:m,label:u}},"labelHelper"),kn=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");o(_l,"insertPolygonShape")});var Y7e,Rj,Nj=R(()=>{"use strict";N5();ut();_t();A9();Y7e=o(async(t,e)=>{e.useHtmlLabels||de().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await Ti(t,e,"node "+e.classes,!0);V.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),kn(e,s),e.intersect=function(l){return Tn.rect(e,l)},n},"note"),Rj=Y7e});function _9(t,e,r,n){let i=[],a=o(l=>{i.push(l,0)},"addBorder"),s=o(l=>{i.push(0,l)},"skipBorder");e.includes("t")?(V.debug("add top border"),a(r)):s(r),e.includes("r")?(V.debug("add right border"),a(n)):s(n),e.includes("b")?(V.debug("add bottom border"),a(r)):s(r),e.includes("l")?(V.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}var Mj,no,Ij,W7e,q7e,X7e,j7e,K7e,Q7e,Z7e,J7e,eSe,tSe,rSe,nSe,iSe,aSe,sSe,oSe,lSe,cSe,uSe,Oj,hSe,fSe,Pj,dm,pm,Bj,Fj,wv,M5=R(()=>{"use strict";Zt();_t();rr();ut();KX();bv();A9();Nj();N5();Mj=o(t=>t?" "+t:"","formatClass"),no=o((t,e)=>`${e||"node default"}${Mj(t.classes)} ${Mj(t.class)}`,"getClassesFromNode"),Ij=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];V.info("Question main (Circle)");let u=_l(r,s,s,l);return u.attr("style",e.style),kn(e,u),e.intersect=function(h){return V.warn("Intersect called"),Tn.polygon(e,l,h)},r},"question"),W7e=o((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return Tn.circle(e,14,s)},r},"choice"),q7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,l=n.width+2*s+e.padding,u=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],h=_l(r,l,a,u);return h.attr("style",e.style),kn(e,h),e.intersect=function(f){return Tn.polygon(e,u,f)},r},"hexagon"),X7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,l=n.width+2*s+e.padding,u=jX(e.directions,n,e),h=_l(r,l,a,u);return h.attr("style",e.style),kn(e,h),e.intersect=function(f){return Tn.polygon(e,u,f)},r},"block_arrow"),j7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return _l(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(u){return Tn.polygon(e,s,u)},r},"rect_left_inv_arrow"),K7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=_l(r,i,a,s);return l.attr("style",e.style),kn(e,l),e.intersect=function(u){return Tn.polygon(e,s,u)},r},"lean_right"),Q7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=_l(r,i,a,s);return l.attr("style",e.style),kn(e,l),e.intersect=function(u){return Tn.polygon(e,s,u)},r},"lean_left"),Z7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=_l(r,i,a,s);return l.attr("style",e.style),kn(e,l),e.intersect=function(u){return Tn.polygon(e,s,u)},r},"trapezoid"),J7e=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=_l(r,i,a,s);return l.attr("style",e.style),kn(e,l),e.intersect=function(u){return Tn.polygon(e,s,u)},r},"inv_trapezoid"),eSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=_l(r,i,a,s);return l.attr("style",e.style),kn(e,l),e.intersect=function(u){return Tn.polygon(e,s,u)},r},"rect_right_inv_arrow"),tSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+e.padding,u="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,h=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return kn(e,h),e.intersect=function(f){let d=Tn.rect(e,f),p=d.x-e.x;if(a!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(d.y-e.y)>e.height/2-s)){let m=s*s*(1-p*p/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,f.y-e.y>0&&(m=-m),d.y+=m}return d},r},"cylinder"),rSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ti(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-s/2:-n.width/2-i,h=e.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",s).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(_9(a,e.props.borders,s,l),f.delete("borders")),f.forEach(d=>{V.warn(`Unknown node property ${d}`)})}return kn(e,a),e.intersect=function(f){return Tn.rect(e,f)},r},"rect"),nSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ti(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-s/2:-n.width/2-i,h=e.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",s).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(_9(a,e.props.borders,s,l),f.delete("borders")),f.forEach(d=>{V.warn(`Unknown node property ${d}`)})}return kn(e,a),e.intersect=function(f){return Tn.rect(e,f)},r},"composite"),iSe=o(async(t,e)=>{let{shapeSvg:r}=await Ti(t,e,"label",!0);V.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(_9(n,e.props.borders,i,a),s.delete("borders")),s.forEach(l=>{V.warn(`Unknown node property ${l}`)})}return kn(e,n),e.intersect=function(s){return Tn.rect(e,s)},r},"labelRect");o(_9,"applyNodePropertyBorders");aSe=o((t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,u="";typeof l=="object"?u=l[0]:u=l,V.info("Label text abc79",u,l,typeof l=="object");let h=s.node().appendChild(ra(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(yr(de().flowchart.htmlLabels)){let y=h.children[0],v=$e(h);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}V.info("Text 2",l);let d=l.slice(1,l.length),p=h.getBBox(),m=s.node().appendChild(ra(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(yr(de().flowchart.htmlLabels)){let y=m.children[0],v=$e(m);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}let g=e.padding/2;return $e(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+g+5)+")"),$e(h).attr("transform","translate( "+(f.width<p.width?0:-(p.width-f.width)/2)+", 0)"),f=s.node().getBBox(),s.attr("transform","translate("+-f.width/2+", "+(-f.height/2-g+3)+")"),i.attr("class","outer title-state").attr("x",-f.width/2-g).attr("y",-f.height/2-g).attr("width",f.width+e.padding).attr("height",f.height+e.padding),a.attr("class","divider").attr("x1",-f.width/2-g).attr("x2",f.width/2+g).attr("y1",-f.height/2-g+p.height+g).attr("y2",-f.height/2-g+p.height+g),kn(e,i),e.intersect=function(y){return Tn.rect(e,y)},n},"rectWithTitle"),sSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return kn(e,s),e.intersect=function(l){return Tn.rect(e,l)},r},"stadium"),oSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ti(t,e,no(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),V.info("Circle main"),kn(e,a),e.intersect=function(s){return V.info("Circle intersect",e,n.width/2+i,s),Tn.circle(e,n.width/2+i,s)},r},"circle"),lSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await Ti(t,e,no(e,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),u=s.insert("circle");return s.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),V.info("DoubleCircle main"),kn(e,l),e.intersect=function(h){return V.info("DoubleCircle intersect",e,n.width/2+i+a,h),Tn.circle(e,n.width/2+i+a,h)},r},"doublecircle"),cSe=o(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Ti(t,e,no(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=_l(r,i,a,s);return l.attr("style",e.style),kn(e,l),e.intersect=function(u){return Tn.polygon(e,s,u)},r},"subroutine"),uSe=o((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),kn(e,n),e.intersect=function(i){return Tn.circle(e,7,i)},r},"start"),Oj=o((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return kn(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(l){return Tn.rect(e,l)},n},"forkJoin"),hSe=o((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),kn(e,i),e.intersect=function(a){return Tn.circle(e,7,a)},r},"end"),fSe=o((t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=s.insert("rect",":first-child"),u=s.insert("line"),h=s.insert("line"),f=0,d=n,p=s.insert("g").attr("class","label"),m=0,g=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=p.node().appendChild(ra(y,e.labelStyle,!0,!0)),x=v.getBBox();if(yr(de().flowchart.htmlLabels)){let A=v.children[0],L=$e(v);x=A.getBoundingClientRect(),L.attr("width",x.width),L.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+n,f+=x.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(de().flowchart.htmlLabels?b+="&lt;"+e.classData.type+"&gt;":b+="<"+e.classData.type+">");let w=p.node().appendChild(ra(b,e.labelStyle,!0,!0));$e(w).attr("class","classTitle");let S=w.getBBox();if(yr(de().flowchart.htmlLabels)){let A=w.children[0],L=$e(w);S=A.getBoundingClientRect(),L.attr("width",S.width),L.attr("height",S.height)}d+=S.height+n,S.width>f&&(f=S.width);let T=[];e.classData.members.forEach(A=>{let L=A.getDisplayDetails(),M=L.displayText;de().flowchart.htmlLabels&&(M=M.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let N=p.node().appendChild(ra(M,L.cssStyle?L.cssStyle:e.labelStyle,!0,!0)),k=N.getBBox();if(yr(de().flowchart.htmlLabels)){let I=N.children[0],C=$e(N);k=I.getBoundingClientRect(),C.attr("width",k.width),C.attr("height",k.height)}k.width>f&&(f=k.width),d+=k.height+n,T.push(N)}),d+=i;let E=[];if(e.classData.methods.forEach(A=>{let L=A.getDisplayDetails(),M=L.displayText;de().flowchart.htmlLabels&&(M=M.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let N=p.node().appendChild(ra(M,L.cssStyle?L.cssStyle:e.labelStyle,!0,!0)),k=N.getBBox();if(yr(de().flowchart.htmlLabels)){let I=N.children[0],C=$e(N);k=I.getBoundingClientRect(),C.attr("width",k.width),C.attr("height",k.height)}k.width>f&&(f=k.width),d+=k.height+n,E.push(N)}),d+=i,g){let A=(f-x.width)/2;$e(v).attr("transform","translate( "+(-1*f/2+A)+", "+-1*d/2+")"),m=x.height+n}let _=(f-S.width)/2;return $e(w).attr("transform","translate( "+(-1*f/2+_)+", "+(-1*d/2+m)+")"),m+=S.height+n,u.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,T.forEach(A=>{$e(A).attr("transform","translate( "+-f/2+", "+(-1*d/2+m+i/2)+")");let L=A?.getBBox();m+=(L?.height??0)+n}),m+=i,h.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,E.forEach(A=>{$e(A).attr("transform","translate( "+-f/2+", "+(-1*d/2+m)+")");let L=A?.getBBox();m+=(L?.height??0)+n}),l.attr("style",e.style).attr("class","outer title-state").attr("x",-f/2-r).attr("y",-(d/2)-r).attr("width",f+e.padding).attr("height",d+e.padding),kn(e,l),e.intersect=function(A){return Tn.rect(e,A)},s},"class_box"),Pj={rhombus:Ij,composite:nSe,question:Ij,rect:rSe,labelRect:iSe,rectWithTitle:aSe,choice:W7e,circle:oSe,doublecircle:lSe,stadium:sSe,hexagon:q7e,block_arrow:X7e,rect_left_inv_arrow:j7e,lean_right:K7e,lean_left:Q7e,trapezoid:Z7e,inv_trapezoid:J7e,rect_right_inv_arrow:eSe,cylinder:tSe,start:uSe,end:hSe,note:Rj,subroutine:cSe,fork:Oj,join:Oj,class_box:fSe},dm={},pm=o(async(t,e,r)=>{let n,i;if(e.link){let a;de().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await Pj[e.shape](n,e,r)}else i=await Pj[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),dm[e.id]=n,e.haveCallback&&dm[e.id].attr("class",dm[e.id].attr("class")+" clickable"),n},"insertNode"),Bj=o((t,e)=>{dm[e.id]=t},"setNodeElem"),Fj=o(()=>{dm={}},"clear"),wv=o(t=>{let e=dm[t.id];V.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});var I5,L9=R(()=>{"use strict";Zt();M5();I5=o((t,e)=>{let r;return e==="sandbox"&&(r=$e("#i"+t)),(e==="sandbox"?$e(r.nodes()[0].contentDocument.body):$e("body")).select(`[id="${t}"]`)},"getDiagramElement")});var io,_d=R(()=>{"use strict";io=o(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});function D9(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),l=Math.sin(a);for(let u of t){let[h,f]=u;u[0]=(h-n)*s-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*s+i}}}function dSe(t,e){return t[0]===e[0]&&t[1]===e[1]}function pSe(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(let h of s)D9(h,l,i);let u=function(h,f,d){let p=[];for(let b of h){let w=[...b];dSe(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let w=0;w<b.length-1;w++){let S=b[w],T=b[w+1];if(S[1]!==T[1]){let E=Math.min(S[1],T[1]);g.push({ymin:E,ymax:Math.max(S[1],T[1]),x:E===S[1]?S[0]:T[0],islope:(T[0]-S[0])/(T[1]-S[1])})}}if(g.sort((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let w=0;w<g.length&&!(g[w].ymin>v);w++)b=w;g.splice(0,b+1).forEach(w=>{y.push({s:v,edge:w})})}if(y=y.filter(b=>!(b.edge.ymax<=v)),y.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(d!==1||x%f==0)&&y.length>1)for(let b=0;b<y.length;b+=2){let w=b+1;if(w>=y.length)break;let S=y[b].edge,T=y[w].edge;m.push([[Math.round(S.x),v],[Math.round(T.x),v]])}v+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),x++}return m}(s,a,n);if(i){for(let h of s)D9(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),D9(p,f,d)})(u,l,-i)}return u}function Cv(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),pSe(t,i,n,a||1)}function U5(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))}function N9(t,e){return t.type===e}function W9(t){let e=[],r=function(s){let l=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:mSe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:R9,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return l[l.length]={type:zj,text:""},l}(t),n="BOD",i=0,a=r[i];for(;!N9(a,zj);){let s=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return W9("M0,0"+t);i++,s=O5[a.text],n=a.text}else N9(a,R9)?s=O5[n]:(i++,s=O5[a.text],n=a.text);if(!(i+s<r.length))throw new Error("Path data ended short");for(let u=i;u<i+s;u++){let h=r[u];if(!N9(h,R9))throw new Error("Param not a number: "+n+","+h.text);l[l.length]=+h.text}if(typeof O5[n]!="number")throw new Error("Bad segment: "+n);{let u={key:n,data:l};e.push(u),i+=s,a=r[i],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function qj(t){let e=0,r=0,n=0,i=0,a=[];for(let{key:s,data:l}of t)switch(s){case"M":a.push({key:"M",data:[...l]}),[e,r]=l,[n,i]=l;break;case"m":e+=l[0],r+=l[1],a.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":a.push({key:"L",data:[...l]}),[e,r]=l;break;case"l":e+=l[0],r+=l[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...l]}),e=l[4],r=l[5];break;case"c":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function Xj(t){let e=[],r="",n=0,i=0,a=0,s=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,s]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(jj(n,i,v,x,d,p,m,g,y).forEach(function(b){e.push({key:"C",data:b})}),n=v,i=x);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=h}return e}function Tv(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function jj(t,e,r,n,i,a,s,l,u,h){let f=(d=s,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=Tv(t,e,-f),[r,n]=Tv(r,n,-f);let I=(t-r)/2,C=(e-n)/2,O=I*I/(i*i)+C*C/(a*a);O>1&&(O=Math.sqrt(O),i*=O,a*=O);let D=i*i,P=a*a,F=D*P-D*C*C-P*I*I,B=D*C*C+P*I*I,$=(l===u?-1:1)*Math.sqrt(Math.abs(F/B));y=$*i*C/a+(t+r)/2,v=$*-a*I/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),t<y&&(m=Math.PI-m),r<y&&(g=Math.PI-g),m<0&&(m=2*Math.PI+m),g<0&&(g=2*Math.PI+g),u&&m>g&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let I=g,C=r,O=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=jj(r=y+i*Math.cos(g),n=v+a*Math.sin(g),C,O,i,a,s,0,u,[g,I,y,v])}x=g-m;let b=Math.cos(m),w=Math.sin(m),S=Math.cos(g),T=Math.sin(g),E=Math.tan(x/4),_=4/3*i*E,A=4/3*a*E,L=[t,e],M=[t+_*w,e-A*b],N=[r+_*T,n-A*S],k=[r,n];if(M[0]=2*L[0]-M[0],M[1]=2*L[1]-M[1],h)return[M,N,k].concat(p);{p=[M,N,k].concat(p);let I=[];for(let C=0;C<p.length;C+=3){let O=Tv(p[C][0],p[C][1],f),D=Tv(p[C+1][0],p[C+1][1],f),P=Tv(p[C+2][0],p[C+2][1],f);I.push([O[0],O[1],D[0],D[1],P[0],P[1]])}return I}}function Kj(t,e,r,n,i){return{type:"path",ops:Vh(t,e,r,n,i)}}function F5(t,e,r){let n=(t||[]).length;if(n>2){let i=[];for(let a=0;a<n-1;a++)i.push(...Vh(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r));return e&&i.push(...Vh(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return n===2?Kj(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function ySe(t,e,r,n,i){return function(a,s){return F5(a,!0,s)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}function Gj(t,e){if(t.length){let r=typeof t[0][0]=="number"?[t]:t,n=P5(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:P5(r[0],1.5*(1+.22*e.roughness),Uj(e));for(let a=1;a<r.length;a++){let s=r[a];if(s.length){let l=P5(s,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:P5(s,1.5*(1+.22*e.roughness),Uj(e));for(let h of l)h.op!=="move"&&n.push(h);for(let h of u)h.op!=="move"&&i.push(h)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function Qj(t,e,r){let n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i,s=Math.abs(t/2),l=Math.abs(e/2),u=1-r.curveFitting;return s+=Yt(s*u,r),l+=Yt(l*u,r),{increment:a,rx:s,ry:l}}function $9(t,e,r,n){let[i,a]=Hj(n.increment,t,e,n.rx,n.ry,1,n.increment*G5(.1,G5(.4,1,r),r),r),s=$5(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){let[l]=Hj(n.increment,t,e,n.rx,n.ry,1.5,0,r),u=$5(l,null,r);s=s.concat(u)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function $j(t,e,r,n,i,a,s,l,u){let h=t,f=e,d=Math.abs(r/2),p=Math.abs(n/2);d+=Yt(.01*d,u),p+=Yt(.01*p,u);let m=i,g=a;for(;m<0;)m+=2*Math.PI,g+=2*Math.PI;g-m>2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=Yj(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=Yj(v,h,f,d,p,m,g,1.5,u);x.push(...b)}return s&&(l?x.push(...Vh(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Vh(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x}}function Vj(t,e){let r=Xj(qj(W9(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:l}of r)switch(s){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Vh(a[0],a[1],l[0],l[1],e)),a=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...vSe(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Vh(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function M9(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+Yt(i,e),n[0][1]+Yt(i,e)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[n[s][0]+Yt(i,e),n[s][1]+Yt(i,e)]})}}return{type:"fillPath",ops:r}}function mm(t,e){return function(r,n){let i=r.fillStyle||"hachure";if(!Cs[i])switch(i){case"zigzag":Cs[i]||(Cs[i]=new O9(n));break;case"cross-hatch":Cs[i]||(Cs[i]=new P9(n));break;case"dots":Cs[i]||(Cs[i]=new B9(n));break;case"dashed":Cs[i]||(Cs[i]=new F9(n));break;case"zigzag-line":Cs[i]||(Cs[i]=new z9(n));break;default:i="hachure",Cs[i]||(Cs[i]=new Ev(n))}return Cs[i]}(e,gSe).fillPolygons(t,e)}function Uj(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Zj(t){return t.randomizer||(t.randomizer=new G9(t.seed||0)),t.randomizer.next()}function G5(t,e,r,n=1){return r.roughness*n*(Zj(r)*(e-t)+t)}function Yt(t,e,r=1){return G5(-t,t,e,r)}function Vh(t,e,r,n,i,a=!1){let s=a?i.disableMultiStrokeFill:i.disableMultiStroke,l=V9(t,e,r,n,i,!0,!1);if(s)return l;let u=V9(t,e,r,n,i,!0,!0);return l.concat(u)}function V9(t,e,r,n,i,a,s){let l=Math.pow(t-r,2)+Math.pow(e-n,2),u=Math.sqrt(l),h=1;h=u<200?1:u>500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*Zj(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=Yt(m,i,h),g=Yt(g,i,h);let y=[],v=o(()=>Yt(d,i,h),"M"),x=o(()=>Yt(f,i,h),"k"),b=i.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:Yt(f,i,h)),e+(b?0:Yt(f,i,h))]})),s?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function P5(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+Yt(e,r),t[0][1]+Yt(e,r)]),n.push([t[0][0]+Yt(e,r),t[0][1]+Yt(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+Yt(e,r),t[i][1]+Yt(e,r)]),i===t.length-1&&n.push([t[i][0]+Yt(e,r),t[i][1]+Yt(e,r)]);return $5(n,null,r)}function $5(t,e,r){let n=t.length,i=[];if(n>3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+2<n;l++){let u=t[l];a[0]=[u[0],u[1]],a[1]=[u[0]+(s*t[l+1][0]-s*t[l-1][0])/6,u[1]+(s*t[l+1][1]-s*t[l-1][1])/6],a[2]=[t[l+1][0]+(s*t[l][0]-s*t[l+2][0])/6,t[l+1][1]+(s*t[l][1]-s*t[l+2][1])/6],a[3]=[t[l+1][0],t[l+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let l=r.maxRandomnessOffset;i.push({op:"lineTo",data:[e[0]+Yt(l,r),e[1]+Yt(l,r)]})}}else n===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&i.push(...V9(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function Hj(t,e,r,n,i,a,s,l){let u=[],h=[];if(l.roughness===0){t/=4,h.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let f=0;f<=2*Math.PI;f+=t){let d=[e+n*Math.cos(f),r+i*Math.sin(f)];u.push(d),h.push(d)}h.push([e+n*Math.cos(0),r+i*Math.sin(0)]),h.push([e+n*Math.cos(t),r+i*Math.sin(t)])}else{let f=Yt(.5,l)-Math.PI/2;h.push([Yt(a,l)+e+.9*n*Math.cos(f-t),Yt(a,l)+r+.9*i*Math.sin(f-t)]);let d=2*Math.PI+f-.01;for(let p=f;p<d;p+=t){let m=[Yt(a,l)+e+n*Math.cos(p),Yt(a,l)+r+i*Math.sin(p)];u.push(m),h.push(m)}h.push([Yt(a,l)+e+n*Math.cos(f+2*Math.PI+.5*s),Yt(a,l)+r+i*Math.sin(f+2*Math.PI+.5*s)]),h.push([Yt(a,l)+e+.98*n*Math.cos(f+s),Yt(a,l)+r+.98*i*Math.sin(f+s)]),h.push([Yt(a,l)+e+.9*n*Math.cos(f+.5*s),Yt(a,l)+r+.9*i*Math.sin(f+.5*s)])}return[h,u]}function Yj(t,e,r,n,i,a,s,l,u){let h=a+Yt(.1,u),f=[];f.push([Yt(l,u)+e+.9*n*Math.cos(h-t),Yt(l,u)+r+.9*i*Math.sin(h-t)]);for(let d=h;d<=s;d+=t)f.push([Yt(l,u)+e+n*Math.cos(d),Yt(l,u)+r+i*Math.sin(d)]);return f.push([e+n*Math.cos(s),r+i*Math.sin(s)]),f.push([e+n*Math.cos(s),r+i*Math.sin(s)]),$5(f,null,u)}function vSe(t,e,r,n,i,a,s,l){let u=[],h=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3],f=[0,0],d=l.disableMultiStroke?1:2,p=l.preserveVertices;for(let m=0;m<d;m++)m===0?u.push({op:"move",data:[s[0],s[1]]}):u.push({op:"move",data:[s[0]+(p?0:Yt(h[0],l)),s[1]+(p?0:Yt(h[0],l))]}),f=p?[i,a]:[i+Yt(h[m],l),a+Yt(h[m],l)],u.push({op:"bcurveTo",data:[t+Yt(h[m],l),e+Yt(h[m],l),r+Yt(h[m],l),n+Yt(h[m],l),f[0],f[1]]});return u}function kv(t){return[...t]}function Wj(t,e=0){let r=t.length;if(r<3)throw new Error("A curve must have at least three points.");let n=[];if(r===3)n.push(kv(t[0]),kv(t[1]),kv(t[2]),kv(t[2]));else{let i=[];i.push(t[0],t[0]);for(let l=1;l<t.length;l++)i.push(t[l]),l===t.length-1&&i.push(t[l]);let a=[],s=1-e;n.push(kv(i[0]));for(let l=1;l+2<i.length;l++){let u=i[l];a[0]=[u[0],u[1]],a[1]=[u[0]+(s*i[l+1][0]-s*i[l-1][0])/6,u[1]+(s*i[l+1][1]-s*i[l-1][1])/6],a[2]=[i[l+1][0]+(s*i[l][0]-s*i[l+2][0])/6,i[l+1][1]+(s*i[l][1]-s*i[l+2][1])/6],a[3]=[i[l+1][0],i[l+1][1]],n.push(a[1],a[2],a[3])}}return n}function z5(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function xSe(t,e,r){let n=z5(e,r);if(n===0)return z5(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),z5(t,Ld(e,r,i))}function Ld(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function U9(t,e,r,n){let i=n||[];if(function(l,u){let h=l[u+0],f=l[u+1],d=l[u+2],p=l[u+3],m=3*f[0]-2*h[0]-p[0];m*=m;let g=3*f[1]-2*h[1]-p[1];g*=g;let y=3*d[0]-2*p[0]-h[0];y*=y;let v=3*d[1]-2*p[1]-h[1];return v*=v,m<y&&(m=y),g<v&&(g=v),m+g}(t,e)<r){let l=t[e+0];i.length?(a=i[i.length-1],s=l,Math.sqrt(z5(a,s))>1&&i.push(l)):i.push(l),i.push(t[e+3])}else{let u=t[e+0],h=t[e+1],f=t[e+2],d=t[e+3],p=Ld(u,h,.5),m=Ld(h,f,.5),g=Ld(f,d,.5),y=Ld(p,m,.5),v=Ld(m,g,.5),x=Ld(y,v,.5);U9([u,p,y,x],0,r,i),U9([x,v,g,d],0,r,i)}var a,s;return i}function bSe(t,e){return V5(t,0,t.length,e)}function V5(t,e,r,n,i){let a=i||[],s=t[e],l=t[r-1],u=0,h=1;for(let f=e+1;f<r-1;++f){let d=xSe(t[f],s,l);d>u&&(u=d,h=f)}return Math.sqrt(u)>n?(V5(t,e,h+1,n,a),V5(t,h,r,n,a)):(a.length||a.push(s),a.push(l)),a}function I9(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a<i;a++)U9(t,3*a,e,n);return r&&r>0?V5(n,0,n.length,r):n}var Ev,O9,P9,B9,F9,z9,Cs,G9,mSe,R9,zj,O5,gSe,ao,gm,H9,B5,Y9,Jt,ti=R(()=>{"use strict";o(D9,"t");o(dSe,"e");o(pSe,"s");o(Cv,"n");Ev=class{static{o(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=Cv(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};o(U5,"a");O9=class extends Ev{static{o(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=Cv(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,f]of i)U5([h,f])&&s.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},P9=class extends Ev{static{o(this,"r")}fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},B9=class{static{o(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=Cv(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let l of e){let u=U5(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g<f;g++){let y=m+d+g*i,v=p-s+2*Math.random()*s,x=y-s+2*Math.random()*s,b=this.helper.ellipse(v,x,a,a,r);n.push(...b.ops)}}return{type:"fillSketch",ops:n}}},F9=class{static{o(this,"c")}constructor(e){this.helper=e}fillPolygons(e,r){let n=Cv(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){let n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return e.forEach(s=>{let l=U5(s),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=s[0],d=s[1];f[0]>d[0]&&(f=s[1],d=s[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m<u;m++){let g=m*(n+i),y=g+n,v=[f[0]+g*Math.cos(p)+h*Math.cos(p),f[1]+g*Math.sin(p)+h*Math.sin(p)],x=[f[0]+y*Math.cos(p)+h*Math.cos(p),f[1]+y*Math.sin(p)+h*Math.sin(p)];a.push(...this.helper.doubleLineOps(v[0],v[1],x[0],x[1],r))}}),a}},z9=class{static{o(this,"l")}constructor(e){this.helper=e}fillPolygons(e,r){let n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,a=Cv(e,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,r)}}zigzagLines(e,r,n){let i=[];return e.forEach(a=>{let s=U5(a),l=Math.round(s/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d<l;d++){let p=2*d*r,m=2*(d+1)*r,g=Math.sqrt(2*Math.pow(r,2)),y=[u[0]+p*Math.cos(f),u[1]+p*Math.sin(f)],v=[u[0]+m*Math.cos(f),u[1]+m*Math.sin(f)],x=[y[0]+g*Math.cos(f+Math.PI/4),y[1]+g*Math.sin(f+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],n),...this.helper.doubleLineOps(x[0],x[1],v[0],v[1],n))}}),i}},Cs={},G9=class{static{o(this,"p")}constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},mSe=0,R9=1,zj=2,O5={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};o(N9,"k");o(W9,"b");o(qj,"y");o(Xj,"m");o(Tv,"w");o(jj,"x");gSe={randOffset:o(function(t,e){return Yt(t,e)},"randOffset"),randOffsetWithRange:o(function(t,e,r){return G5(t,e,r)},"randOffsetWithRange"),ellipse:o(function(t,e,r,n,i){let a=Qj(r,n,i);return $9(t,e,i,a).opset},"ellipse"),doubleLineOps:o(function(t,e,r,n,i){return Vh(t,e,r,n,i,!0)},"doubleLineOps")};o(Kj,"v");o(F5,"S");o(ySe,"O");o(Gj,"L");o(Qj,"T");o($9,"D");o($j,"A");o(Vj,"_");o(M9,"I");o(mm,"C");o(Uj,"z");o(Zj,"W");o(G5,"E");o(Yt,"G");o(Vh,"$");o(V9,"R");o(P5,"j");o($5,"q");o(Hj,"F");o(Yj,"V");o(vSe,"Z");o(kv,"Q");o(Wj,"H");o(z5,"N");o(xSe,"B");o(Ld,"J");o(U9,"K");o(bSe,"U");o(V5,"X");o(I9,"Y");ao="none",gm=class{static{o(this,"et")}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,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,i,a){let s=this._o(a);return this._d("line",[Kj(e,r,n,i,s)],s)}rectangle(e,r,n,i,a){let s=this._o(a),l=[],u=ySe(e,r,n,i,s);if(s.fill){let h=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];s.fillStyle==="solid"?l.push(M9([h],s)):l.push(mm([h],s))}return s.stroke!==ao&&l.push(u),this._d("rectangle",l,s)}ellipse(e,r,n,i,a){let s=this._o(a),l=[],u=Qj(n,i,s),h=$9(e,r,s,u);if(s.fill)if(s.fillStyle==="solid"){let f=$9(e,r,s,u).opset;f.type="fillPath",l.push(f)}else l.push(mm([h.estimatedPoints],s));return s.stroke!==ao&&l.push(h.opset),this._d("ellipse",l,s)}circle(e,r,n,i){let a=this.ellipse(e,r,n,n,i);return a.shape="circle",a}linearPath(e,r){let n=this._o(r);return this._d("linearPath",[F5(e,!1,n)],n)}arc(e,r,n,i,a,s,l=!1,u){let h=this._o(u),f=[],d=$j(e,r,n,i,a,s,l,!0,h);if(l&&h.fill)if(h.fillStyle==="solid"){let p=Object.assign({},h);p.disableMultiStroke=!0;let m=$j(e,r,n,i,a,s,!0,!1,p);m.type="fillPath",f.push(m)}else f.push(function(p,m,g,y,v,x,b){let w=p,S=m,T=Math.abs(g/2),E=Math.abs(y/2);T+=Yt(.01*T,b),E+=Yt(.01*E,b);let _=v,A=x;for(;_<0;)_+=2*Math.PI,A+=2*Math.PI;A-_>2*Math.PI&&(_=0,A=2*Math.PI);let L=(A-_)/b.curveStepCount,M=[];for(let N=_;N<=A;N+=L)M.push([w+T*Math.cos(N),S+E*Math.sin(N)]);return M.push([w+T*Math.cos(A),S+E*Math.sin(A)]),M.push([w,S]),mm([M],b)}(e,r,n,i,a,s,h));return h.stroke!==ao&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=Gj(e,n);if(n.fill&&n.fill!==ao)if(n.fillStyle==="solid"){let s=Gj(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],l=e;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?s.push(...h):h.length===3?s.push(...I9(Wj([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...I9(Wj(h),10,(1+n.roughness)/2))}s.length&&i.push(mm([s],n))}return n.stroke!==ao&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=F5(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(M9([e],n)):i.push(mm([e],n))),n.stroke!==ao&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==ao,s=n.stroke!==ao,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=Xj(qj(W9(f))),g=[],y=[],v=[0,0],x=[],b=o(()=>{x.length>=4&&y.push(...I9(x,d)),x=[]},"i"),w=o(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:T,data:E}of m)switch(T){case"M":w(),v=[E[0],E[1]],y.push(v);break;case"L":b(),y.push([E[0],E[1]]);break;case"C":if(!x.length){let _=y.length?y[y.length-1]:v;x.push([_[0],_[1]])}x.push([E[0],E[1]]),x.push([E[2],E[3]]),x.push([E[4],E[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(w(),!p)return g;let S=[];for(let T of g){let E=bSe(T,p);E.length&&S.push(E)}return S}(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=Vj(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=Vj(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else i.push(M9(u,n));else i.push(mm(u,n));return s&&(l?u.forEach(f=>{i.push(F5(f,!1,n))}):i.push(h)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:ao};break;case"fillPath":s={d:this.opsToPath(a),stroke:ao,strokeWidth:0,fill:n.fill||ao};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||ao,strokeWidth:n,fill:ao}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},H9=class{static{o(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new gm(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,l),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map(l=>+l.toFixed(n)):a.data;switch(a.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(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h),h}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},B5="http://www.w3.org/2000/svg",Y9=class{static{o(this,"ot")}constructor(e,r){this.svg=e,this.gen=new gm(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(B5,"g"),s=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(B5,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(B5,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&a.appendChild(u)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(B5,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},Jt={canvas:o((t,e)=>new H9(t,e),"canvas"),svg:o((t,e)=>new Y9(t,e),"svg"),generator:o(t=>new gm(t),"generator"),newSeed:o(()=>gm.newSeed(),"newSeed")}});var wSe,Dd,q9=R(()=>{"use strict";wSe=o((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2,u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(s=-s),u=s,h=i===0?0:s*a/i),{x:r+u,y:n+h}},"intersectRect"),Dd=wSe});function TSe(t,e){e&&t.attr("style",e)}async function kSe(t){let e=$e(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&Ni(t.label)&&(n=await yh(t.label.replace(We.lineBreakRegex,`
399 `),de()));let i=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>"),TSe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var ESe,gc,H5=R(()=>{"use strict";Zt();ut();_t();rr();xr();o(TSe,"applyStyle");o(kSe,"addHtmlLabel");ESe=o(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),yr(de().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),V.info("vertexText"+i);let a={isNode:n,label:to(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>`<i class='${l.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await kSe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?s=i:s=[];for(let l of s){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),gc=ESe});var _u,Sv=R(()=>{"use strict";_u=o((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});var Lu,Jj,CSe,Br,Fr,ki=R(()=>{"use strict";_t();Lu=o(t=>{let{handDrawnSeed:e}=de();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Jj=o(t=>{let e=CSe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),CSe=o(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),Br=o(t=>{let{stylesArray:e}=Jj(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let l=s[0];l==="color"||l==="font-size"||l==="font-family"||l==="font-weight"||l==="font-style"||l==="text-decoration"||l==="text-align"||l==="text-transform"||l==="line-height"||l==="letter-spacing"||l==="word-spacing"||l==="text-shadow"||l==="text-overflow"||l==="white-space"||l==="word-wrap"||l==="word-break"||l==="overflow-wrap"||l==="hyphens"?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),l.includes("stroke")&&i.push(s.join(":")+" !important"),l==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Fr=o((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=de(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=Jj(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,stroke:s.get("stroke")||i,seed:n,strokeWidth:1.3},e)},"userNodeOverrides")});var eK,SSe,ASe,_Se,LSe,DSe,tK,Y5,rK,X9=R(()=>{"use strict";_t();rr();ut();_d();Zt();ti();Al();q9();H5();Sv();ki();eK=o(async(t,e)=>{V.info("Creating subgraph rect for ",e.id,e);let r=de(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=Br(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=yr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await ta(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(yr(r.flowchart.htmlLabels)){let _=g.children[0],A=$e(g);y=_.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,w=e.y-x/2;V.trace("Data ",e,JSON.stringify(e));let S;if(e.look==="handDrawn"){let _=Jt.svg(d),A=Fr(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),L=_.path(_u(b,w,v,x,0),A);S=d.insert(()=>(V.debug("Rough node insert CXC",L),L),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",f.join(";").replace("fill","stroke"))}else S=d.insert("rect",":first-child"),S.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:T}=io(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+T})`),l){let _=m.select("span");_&&_.attr("style",l)}let E=S.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=y.height-e.padding/2,e.intersect=function(_){return Dd(e,_)},{cluster:d,labelBBox:y}},"rect"),SSe=o((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(l){return Dd(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),ASe=o(async(t,e)=>{let r=de(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await gc(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(yr(r.flowchart.htmlLabels)){let L=m.children[0],M=$e(m);g=L.getBoundingClientRect(),M.attr("width",g.width),M.attr("height",g.height)}let y=0*e.padding,v=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,w=e.height+y-g.height-6,S=e.x-x/2,T=e.y-b/2;e.width=x;let E=e.y-e.height/2-v+g.height+2,_;if(e.look==="handDrawn"){let L=e.cssClasses.includes("statediagram-cluster-alt"),M=Jt.svg(h),N=e.rx||e.ry?M.path(_u(S,T,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):M.rectangle(S,T,x,b,{seed:i});_=h.insert(()=>N,":first-child");let k=M.rectangle(S,E,x,w,{fill:L?a:s,fillStyle:L?"hachure":"solid",stroke:u,seed:i});_=h.insert(()=>N,":first-child"),p=h.insert(()=>k)}else _=f.insert("rect",":first-child"),_.attr("class","outer").attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",S).attr("y",E).attr("width",x).attr("height",w);d.attr("transform",`translate(${e.x-g.width/2}, ${T+1-(yr(r.flowchart.htmlLabels)?0:3)})`);let A=_.node().getBBox();return e.height=A.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(L){return Dd(e,L)},{cluster:h,labelBBox:g}},"roundedWithTitle"),_Se=o((t,e)=>{let r=de(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=Jt.svg(s).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=s.insert(()=>v,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return Dd(e,y)},{cluster:s,labelBBox:{}}},"divider"),LSe=eK,DSe={rect:eK,squareRect:LSe,roundedWithTitle:ASe,noteGroup:SSe,divider:_Se},tK=new Map,Y5=o(async(t,e)=>{let r=e.shape||"rect",n=await DSe[r](t,e);return tK.set(e.id,n),n},"insertCluster"),rK=o(()=>{tK=new Map},"clear")});function W5(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=q5(t),e=q5(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,l=a-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}var Uh,q5,X5,j9=R(()=>{"use strict";Uh={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};o(W5,"calculateDeltaAndAngle");q5=o(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),X5=o(t=>({x:o(function(e,r,n){let i=0;if(r===0&&Object.hasOwn(Uh,t.arrowTypeStart)){let{angle:a,deltaX:s}=W5(n[0],n[1]);i=Uh[t.arrowTypeStart]*Math.cos(a)*(s>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Uh,t.arrowTypeEnd)){let{angle:a,deltaX:s}=W5(n[n.length-1],n[n.length-2]);i=Uh[t.arrowTypeEnd]*Math.cos(a)*(s>=0?1:-1)}return q5(e).x+i},"x"),y:o(function(e,r,n){let i=0;if(r===0&&Object.hasOwn(Uh,t.arrowTypeStart)){let{angle:a,deltaY:s}=W5(n[0],n[1]);i=Uh[t.arrowTypeStart]*Math.abs(Math.sin(a))*(s>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Uh,t.arrowTypeEnd)){let{angle:a,deltaY:s}=W5(n[n.length-1],n[n.length-2]);i=Uh[t.arrowTypeEnd]*Math.abs(Math.sin(a))*(s>=0?1:-1)}return q5(e).y+i},"y")}),"getLineFunctionsWithOffset")});var iK,RSe,nK,aK=R(()=>{"use strict";ut();iK=o((t,e,r,n,i)=>{e.arrowTypeStart&&nK(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&nK(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),RSe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},nK=o((t,e,r,n,i,a)=>{let s=RSe[r];if(!s){V.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker")});function j5(t,e){de().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function ISe(t){let e=[],r=[];for(let n=1;n<t.length-1;n++){let i=t[n-1],a=t[n],s=t[n+1];(i.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var K5,da,lK,Av,Q5,Z5,NSe,MSe,sK,oK,OSe,J5,K9=R(()=>{"use strict";_t();rr();ut();Al();xr();j9();_d();Zt();ti();H5();aK();K5=new Map,da=new Map,lK=o(()=>{K5.clear(),da.clear()},"clear"),Av=o(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),Q5=o(async(t,e)=>{let r=yr(de().flowchart.htmlLabels),n=await ta(t,e.label,{style:Av(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});V.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let u=n.children[0],h=$e(n);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),K5.set(e.id,i),e.width=s.width,e.height=s.height;let l;if(e.startLabelLeft){let u=await gc(e.startLabelLeft,Av(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),da.get(e.id)||da.set(e.id,{}),da.get(e.id).startLeft=h,j5(l,e.startLabelLeft)}if(e.startLabelRight){let u=await gc(e.startLabelRight,Av(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),da.get(e.id)||da.set(e.id,{}),da.get(e.id).startRight=h,j5(l,e.startLabelRight)}if(e.endLabelLeft){let u=await gc(e.endLabelLeft,Av(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),da.get(e.id)||da.set(e.id,{}),da.get(e.id).endLeft=h,j5(l,e.endLabelLeft)}if(e.endLabelRight){let u=await gc(e.endLabelRight,Av(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),da.get(e.id)||da.set(e.id,{}),da.get(e.id).endRight=h,j5(l,e.endLabelRight)}return n},"insertEdgeLabel");o(j5,"setTerminalWidth");Z5=o((t,e)=>{V.debug("Moving label abc88 ",t.id,t.label,K5.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=de(),{subGraphTitleTotalMargin:i}=io(n);if(t.label){let a=K5.get(t.id),s=t.x,l=t.y;if(r){let u=Lt.calcLabelPosition(r);V.debug("Moving label "+t.label+" from (",s,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,l=u.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(t.startLabelLeft){let a=da.get(t.id).startLeft,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.startLabelRight){let a=da.get(t.id).startRight,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelLeft){let a=da.get(t.id).endLeft,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelRight){let a=da.get(t.id).endRight,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),NSe=o((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,l=t.height/2;return i>=s||a>=l},"outsideNode"),MSe=o((t,e,r)=>{V.debug(`intersection calc abc89:
402 node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,l=r.x<e.x?s-a:s+a,u=t.height/2,h=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*u){let d=r.y<e.y?e.y-u-i:i-u-e.y;l=f*d/h;let p={x:r.x<e.x?r.x+l:r.x-f+l,y:r.y<e.y?r.y+h-d:r.y-h+d};return l===0&&(p.x=e.x,p.y=e.y),f===0&&(p.x=e.x),h===0&&(p.y=e.y),V.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${f}, r ${l}`,p),p}else{r.x<e.x?l=e.x-s-n:l=n-s-e.x;let d=h*l/f,p=r.x<e.x?r.x+f-l:r.x-f+l,m=r.y<e.y?r.y+d:r.y-d;return V.debug(`sides calc abc89, Q ${h}, q ${d}, R ${f}, r ${l}`,{_x:p,_y:m}),l===0&&(p=e.x,m=e.y),f===0&&(p=e.x),h===0&&(m=e.y),{x:p,y:m}}},"intersection"),sK=o((t,e)=>{V.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(V.info("abc88 checking point",a,e),!NSe(e,a)&&!i){let s=MSe(e,n,a);V.debug("abc88 inside",a,n,s),V.debug("abc88 intersection",s,e);let l=!1;r.forEach(u=>{l=l||u.x===s.x&&u.y===s.y}),r.some(u=>u.x===s.x&&u.y===s.y)?V.warn("abc88 no intersect",s,r):r.push(s),i=!0}else V.warn("abc88 outside",a,n),n=a,i||r.push(a)}),V.debug("returning points",r),r},"cutPathAtIntersect");o(ISe,"extractCornerPoints");oK=o(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),OSe=o(function(t){let{cornerPointPositions:e}=ISe(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){let i=t[n-1],a=t[n+1],s=t[n],l=oK(i,s,5),u=oK(a,s,5),h=u.x-l.x,f=u.y-l.y;r.push(l);let d=Math.sqrt(2)*2,p={x:s.x,y:s.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){V.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;s.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d}}else V.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(t[n]);return r},"fixCorners"),J5=o(function(t,e,r,n,i,a,s){let{handDrawnSeed:l}=de(),u=e.points,h=!1,f=i;var d=a;d.intersect&&f.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),V.debug("Last point APA12",e.start,"-->",e.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1]))),e.toCluster&&(V.info("to cluster abc88",r.get(e.toCluster)),u=sK(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(V.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=sK(u.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let p=u.filter(A=>!Number.isNaN(A.y));p=OSe(p);let m=p[p.length-1];if(p.length>1){m=p[p.length-1];let A=p[p.length-2],L=(m.x-A.x)/2,M=(m.y-A.y)/2,N={x:A.x+L,y:A.y+M};p.splice(-1,0,N)}let g=vs;e.curve&&(g=e.curve);let{x:y,y:v}=X5(e),x=ha().x(y).y(v).curve(g),b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let w,S=x(p),T=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){let A=Jt.svg(t);Object.assign([],p);let L=A.path(S,{roughness:.3,seed:l});b+=" transition",w=$e(L).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",T?T.reduce((N,k)=>N+";"+k,""):"");let M=w.attr("d");w.attr("d",M),t.node().appendChild(w.node())}else w=t.append("path").attr("d",S).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",T?T.reduce((A,L)=>A+";"+L,""):"");let E="";(de().flowchart.arrowMarkerAbsolute||de().state.arrowMarkerAbsolute)&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),V.info("arrowTypeStart",e.arrowTypeStart),V.info("arrowTypeEnd",e.arrowTypeEnd),iK(w,e,E,s,n);let _={};return h&&(_.updatedPath=u),_.originalPath=e.points,_},"insertEdge")});var PSe,BSe,FSe,zSe,GSe,$Se,VSe,USe,HSe,YSe,WSe,ew,Q9=R(()=>{"use strict";ut();PSe=o((t,e,r,n)=>{e.forEach(i=>{WSe[i](t,r,n)})},"insertMarkers"),BSe=o((t,e,r)=>{V.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"),FSe=o((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"),zSe=o((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"),GSe=o((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"),$Se=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),VSe=o((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"),USe=o((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"),HSe=o((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"),YSe=o((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"),WSe={extension:BSe,composition:FSe,aggregation:zSe,dependency:GSe,lollipop:$Se,point:VSe,circle:USe,cross:HSe,barb:YSe},ew=PSe});var zr,ar,En,ri=R(()=>{"use strict";Al();_t();Zt();rr();xr();zr=o(async(t,e,r)=>{let n,i=e.useHtmlLabels||yr(de().flowchart.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",e.labelStyle),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u;u=await ta(s,qr(to(l),de()),{useHtmlLabels:i,width:e.width||de().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle});let h=u.getBBox(),f=e.padding/2;if(yr(de().flowchart.htmlLabels)){let d=u.children[0],p=$e(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=de().fontSize?de().fontSize:window.getComputedStyle(document.body).fontSize,S=parseInt(b,10)*5+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";v(y)}o(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)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:s}},"labelHelper"),ar=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),En=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses")});function qSe(t,e){return t.intersect(e)}var cK,uK=R(()=>{"use strict";o(qSe,"intersectNode");cK=qSe});function XSe(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x<i&&(h=-h);var f=Math.abs(e*r*l/u);return n.y<a&&(f=-f),{x:i+h,y:a+f}}var tw,Z9=R(()=>{"use strict";o(XSe,"intersectEllipse");tw=XSe});function jSe(t,e,r){return tw(t,e,e,r)}var hK,fK=R(()=>{"use strict";Z9();o(jSe,"intersectCircle");hK=jSe});function KSe(t,e,r,n){var i,a,s,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+s*r.y+u,m=i*n.x+s*n.y+u,!(p!==0&&m!==0&&dK(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&dK(f,d))&&(g=i*l-a*s,g!==0)))return y=Math.abs(g/2),v=s*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function dK(t,e){return t*e>0}var pK,mK=R(()=>{"use strict";o(KSe,"intersectLine");o(dK,"sameSign");pK=KSe});function QSe(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){s=Math.min(s,f.x),l=Math.min(l,f.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let u=n-t.width/2-s,h=i-t.height/2-l;for(let f=0;f<e.length;f++){let d=e[f],p=e[f<e.length-1?f+1:0],m=pK(t,r,{x:u+d.x,y:h+d.y},{x:u+p.x,y:h+p.y});m&&a.push(m)}return a.length?(a.length>1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g<x?-1:g===x?0:1}),a[0]):t}var gK,yK=R(()=>{"use strict";mK();o(QSe,"intersectPolygon");gK=QSe});var sr,hi=R(()=>{"use strict";uK();fK();Z9();yK();q9();sr={node:cK,circle:hK,ellipse:tw,polygon:gK,rect:Dd}});var Rd,_v=R(()=>{"use strict";ri();hi();Sv();ki();ti();Rd=o(async(t,e,r)=>{let{labelStyles:n,nodeStyles:i}=Br(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await zr(t,e,En(e)),l=Math.max(s.width+r.labelPaddingX*2,e?.width||0),u=Math.max(s.height+r.labelPaddingY*2,e?.height||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),e.look==="handDrawn"){let y=Jt.svg(a),v=Fr(e,{}),x=p||m?y.path(_u(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",g)}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",p).attr("data-id","abc").attr("data-et","node").attr("ry",m).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return ar(e,d),e.intersect=function(y){return sr.rect(e,y)},a},"drawRect")});var vK,xK=R(()=>{"use strict";_v();vK=o(async(t,e)=>Rd(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state")});var bK,wK=R(()=>{"use strict";_v();bK=o(async(t,e)=>{let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return Rd(t,e,r)},"roundedRect")});var TK,kK=R(()=>{"use strict";_v();TK=o(async(t,e)=>{let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return Rd(t,e,r)},"squareRect")});var EK,CK=R(()=>{"use strict";ri();hi();ti();ki();_t();EK=o((t,e)=>{let{themeVariables:r}=de(),{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let l=Jt.svg(i).circle(0,0,14,Lu(n));a=i.insert(()=>l)}else a=i.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),ar(e,a),e.intersect=function(s){return sr.circle(e,7,s)},i},"stateStart")});var SK,AK=R(()=>{"use strict";ri();hi();ti();ki();_t();SK=o((t,e)=>{let{themeVariables:r}=de(),{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a,s;if(e.look==="handDrawn"){let l=Jt.svg(i),u=l.circle(0,0,14,{...Lu(n),roughness:.5}),h=l.circle(0,0,5,{...Lu(n),fillStyle:"solid"});a=i.insert(()=>u),s=i.insert(()=>h)}else s=i.insert("circle",":first-child"),a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return ar(e,a),e.intersect=function(l){return sr.circle(e,7,l)},i},"stateEnd")});var J9,_K=R(()=>{"use strict";ri();hi();ti();ki();_t();J9=o((t,e,r)=>{let{themeVariables:n}=de(),{lineColor:i}=n,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=70,l=10;r==="LR"&&(s=10,l=70);let u=-1*s/2,h=-1*l/2,f;if(e.look==="handDrawn"){let y=Jt.svg(a).rectangle(u,h,s,l,Lu(i));f=a.insert(()=>y)}else f=a.append("rect").attr("x",u).attr("y",h).attr("width",s).attr("height",l).attr("class","fork-join");ar(e,f);let d=0,p=0,m=10;return e.height&&(d=e.height),e.width&&(p=e.width),e.padding&&(m=e.padding),e.height=d+m/2,e.width=p+m/2,e.intersect=function(g){return sr.rect(e,g)},a},"forkJoin")});var LK,DK=R(()=>{"use strict";hi();ti();ki();_t();LK=o((t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{themeVariables:i}=de(),{lineColor:a}=i,s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),l=28,u=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h;if(e.look==="handDrawn"){let f=Jt.svg(s),d=u.map(function(m){return[m.x,m.y]}),p=f.polygon(d,Lu(a));h=s.insert(()=>p)}else h=s.insert("polygon",":first-child").attr("points",u.map(function(f){return f.x+","+f.y}).join(" "));return h.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",n),e.width=28,e.height=28,e.intersect=function(f){return sr.circle(e,14,f)},s},"choice")});var RK,NK=R(()=>{"use strict";ut();ri();hi();_t();ti();RK=o(async(t,e)=>{let{themeVariables:r,handDrawnSeed:n}=de(),{noteBorderColor:i,noteBkgColor:a}=r;e.useHtmlLabels||(e.centerLabel=!0);let{shapeSvg:l,bbox:u}=await zr(t,e,"node "+e.cssClasses);V.info("Classes = ",e.cssClasses);let{cssStyles:h}=e,f,d=u.width+e.padding,p=u.height+e.padding,m=-d/2,g=-p/2;if(e.look==="handDrawn"){let v=Jt.svg(l).rectangle(m,g,d,p,{roughness:.7,fill:a,fillWeight:3,seed:n,stroke:i});f=l.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",h)}else f=l.insert("rect",":first-child"),f.attr("rx",e.rx).attr("ry",e.ry).attr("x",m).attr("y",g).attr("width",d).attr("height",p);return ar(e,f),e.intersect=function(y){return sr.rect(e,y)},l},"note")});var MK,IK=R(()=>{"use strict";ri();hi();ki();ti();Sv();MK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.height+e.padding,l=a.width+s/4+e.padding,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Jt.svg(i),d=Fr(e,{}),p=_u(-l/2,-s/2,l,s,s/2),m=f.path(p,d);u=i.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",h)}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return ar(e,u),e.intersect=function(f){return sr.rect(e,f)},i},"stadium")});var OK,PK=R(()=>{"use strict";Zt();rr();ri();H5();hi();ki();ti();_t();Sv();ut();OK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await gc(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(yr(de()?.flowchart?.htmlLabels)){let A=f.children[0],L=$e(f);d=A.getBoundingClientRect(),L.attr("width",d.width),L.attr("height",d.height)}V.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await gc(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0)),y=g.children[0],v=$e(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;$e(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),$e(f).attr("transform","translate( "+(d.width<m.width?0:-(m.width-d.width)/2)+", 0)"),d=l.node().getBBox(),l.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");let b=d.width+(e.padding||0),w=d.height+(e.padding||0),S=-d.width/2-x,T=-d.height/2-x,E,_;if(e.look==="handDrawn"){let A=Jt.svg(a),L=Fr(e,{}),M=A.path(_u(S,T,b,w,e.rx||0),L),N=A.line(-d.width/2-x,-d.height/2-x+m.height+x,d.width/2+x,-d.height/2-x+m.height+x,L);_=a.insert(()=>(V.debug("Rough node insert CXC",M),N),":first-child"),E=a.insert(()=>(V.debug("Rough node insert CXC",M),M),":first-child")}else E=s.insert("rect",":first-child"),_=s.insert("line"),E.attr("class","outer title-state").attr("style",n).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)),_.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return ar(e,E),e.intersect=function(A){return sr.rect(e,A)},a},"rectWithTitle")});function Ma(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var Du=R(()=>{"use strict";o(Ma,"insertPolygonShape")});var BK,FK=R(()=>{"use strict";ri();hi();ki();ti();Du();BK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,h=-a.width/2-s,f=-a.height/2-s,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Jt.svg(i),m=Fr(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",b),ar(e,x)}else{let p=Ma(i,l,u,d);n&&p.attr("style",n),ar(e,p)}return e.intersect=function(p){return sr.polygon(e,d,p)},i},"subroutine")});var ZSe,JSe,eAe,zK,GK=R(()=>{"use strict";ri();hi();ki();ti();ZSe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),JSe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),eAe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),zK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=s/2,u=l/(2.5+s/50),h=a.height+u+e.padding,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Jt.svg(i),m=JSe(0,0,s,h,l,u),g=eAe(0,u,s,h,l,u),y=p.path(m,Fr(e,{})),v=p.path(g,Fr(e,{fill:"none"}));f=i.insert(()=>v,":first-child"),f=i.insert(()=>y,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=ZSe(0,0,s,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",d).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-s/2}, ${-(h/2+u)})`),ar(e,f),e.intersect=function(p){let m=sr.rect(e,p),g=m.x-(e.x??0);if(l!=0&&(Math.abs(g)<(e.width??0)/2||Math.abs(g)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-g*g/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,p.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i},"cylinder")});var $K,VK=R(()=>{"use strict";ut();ri();hi();ki();ti();$K=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await zr(t,e,En(e)),l=a.width/2+s,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Jt.svg(i),d=Fr(e,{}),p=f.circle(0,0,l*2,d);u=i.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",h)}else u=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0);return ar(e,u),e.intersect=function(f){return V.info("Circle intersect",e,l,f),sr.circle(e,l,f)},i},"circle")});var UK,HK=R(()=>{"use strict";ut();ri();hi();ki();ti();UK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await zr(t,e,En(e)),u=a.width/2+s+5,h=a.width/2+s,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Jt.svg(i),m=Fr(e,{roughness:.2,strokeWidth:2.5}),g=Fr(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",e.cssClasses).attr("style",d),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return ar(e,f),e.intersect=function(p){return V.info("DoubleCircle intersect",e,u,p),sr.circle(e,u,p)},i},"doublecircle")});var tAe,YK,WK=R(()=>{"use strict";ri();hi();ki();ti();Du();tAe=o((t,e,r,n)=>[`M${t-n/2},${e}`,`L${t+r},${e}`,`L${t+r},${e-n}`,`L${t-n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createPolygonPathD"),YK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Jt.svg(i),p=Fr(e,{}),m=tAe(0,0,s,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ma(i,s,l,u);return n&&h.attr("style",n),e.width=s+l,e.height=l,ar(e,h),e.intersect=function(d){return sr.polygon(e,u,d)},i},"rect_left_inv_arrow")});var rAe,qK,XK=R(()=>{"use strict";ut();ri();hi();ki();ti();Du();rAe=o((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"),qK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=a.height+e.padding,u=s+l,h=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Jt.svg(i),m=Fr(e,{}),g=rAe(0,0,u),y=p.path(g,m);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`),d&&f.attr("style",d)}else f=Ma(i,u,u,h);return n&&f.attr("style",n),ar(e,f),e.intersect=function(p){return V.debug(`APA12 Intersect called SPLIT
406 res:`,sr.polygon(e,h,p)),sr.polygon(e,h,p)},i},"question")});var nAe,jK,KK=R(()=>{"use strict";ri();hi();ki();ti();Du();nAe=o((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD"),jK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=4,l=a.height+e.padding,u=l/s,h=a.width+2*u+e.padding,f=[{x:u,y:0},{x:h-u,y:0},{x:h,y:-l/2},{x:h-u,y:-l},{x:u,y:-l},{x:0,y:-l/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Jt.svg(i),g=Fr(e,{}),y=nAe(0,0,h,l,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),p&&d.attr("style",p)}else d=Ma(i,h,l,f);return n&&d.attr("style",n),e.width=h,e.height=l,ar(e,d),e.intersect=function(m){return sr.polygon(e,f,m)},i},"hexagon")});var iAe,QK,ZK=R(()=>{"use strict";ri();hi();ki();ti();Du();iAe=o((t,e,r,n)=>[`M${t-2*n/6},${e}`,`L${t+r-n/6},${e}`,`L${t+r+2*n/6},${e-n}`,`L${t+n/6},${e-n}`,"Z"].join(" "),"createLeanRightPathD"),QK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Jt.svg(i),p=Fr(e,{}),m=iAe(0,0,s,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ma(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,ar(e,h),e.intersect=function(d){return sr.polygon(e,u,d)},i},"lean_right")});var aAe,JK,eQ=R(()=>{"use strict";ri();hi();ki();ti();Du();aAe=o((t,e,r,n)=>[`M${t+2*n/6},${e}`,`L${t+r+n/6},${e}`,`L${t+r-2*n/6},${e-n}`,`L${t-n/6},${e-n}`,"Z"].join(" "),"createLeanLeftPathD"),JK=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Jt.svg(i),p=Fr(e,{}),m=aAe(0,0,s,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ma(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,ar(e,h),e.intersect=function(d){return sr.polygon(e,u,d)},i},"lean_left")});var sAe,tQ,rQ=R(()=>{"use strict";ri();hi();ki();ti();Du();sAe=o((t,e,r,n)=>[`M${t-2*n/6},${e}`,`L${t+r+2*n/6},${e}`,`L${t+r-n/6},${e-n}`,`L${t+n/6},${e-n}`,"Z"].join(" "),"createTrapezoidPathD"),tQ=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Jt.svg(i),p=Fr(e,{}),m=sAe(0,0,s,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ma(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,ar(e,h),e.intersect=function(d){return sr.polygon(e,u,d)},i},"trapezoid")});var oAe,nQ,iQ=R(()=>{"use strict";ri();hi();ki();ti();Du();oAe=o((t,e,r,n)=>[`M${t+n/6},${e}`,`L${t+r-n/6},${e}`,`L${t+r+2*n/6},${e-n}`,`L${t-2*n/6},${e-n}`,"Z"].join(" "),"createInvertedTrapezoidPathD"),nQ=o(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Br(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await zr(t,e,En(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Jt.svg(i),p=Fr(e,{}),m=oAe(0,0,s,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ma(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,ar(e,h),e.intersect=function(d){return sr.polygon(e,u,d)},i},"inv_trapezoid")});var aQ,sQ=R(()=>{"use strict";_v();ri();hi();aQ=o(async(t,e)=>{let{shapeSvg:r}=await zr(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),ar(e,n),e.intersect=function(s){return sr.rect(e,s)},r},"labelRect")});var oQ,ym,rw,lQ,cQ,eL,tL=R(()=>{"use strict";ut();xK();wK();kK();CK();AK();_K();DK();NK();IK();PK();_t();FK();GK();VK();HK();WK();XK();KK();ZK();eQ();rQ();iQ();sQ();oQ={state:vK,stateStart:EK,stateEnd:SK,fork:J9,join:J9,choice:LK,note:RK,roundedRect:bK,rectWithTitle:OK,squareRect:TK,stadium:MK,subroutine:BK,cylinder:zK,circle:$K,doublecircle:UK,odd:YK,diamond:qK,hexagon:jK,lean_right:QK,lean_left:JK,trapezoid:tQ,inv_trapezoid:nQ,labelRect:aQ},ym=new Map,rw=o(async(t,e,r)=>{let n,i;if(e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),e.link){let a;de().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await oQ[e.shape](n,e,r)}else i=await oQ[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),ym.set(e.id,n),e.haveCallback&&ym.get(e.id).attr("class",ym.get(e.id).attr("class")+" clickable"),n},"insertNode"),lQ=o((t,e)=>{ym.set(e.id,t)},"setNodeElem"),cQ=o(()=>{ym.clear()},"clear"),eL=o(t=>{let e=ym.get(t.id);V.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});var uQ,hQ=R(()=>{"use strict";qs();rr();ut();X9();K9();Q9();tL();ri();xr();uQ={common:We,getConfig:Or,insertCluster:Y5,insertEdge:J5,insertEdgeLabel:Q5,insertMarkers:ew,insertNode:rw,interpolateToCurve:om,labelHelper:zr,log:V,positionEdgeLabel:Z5}});function cAe(t){return typeof t=="symbol"||Wn(t)&&fa(t)==lAe}var lAe,so,Nd=R(()=>{"use strict";wu();Mo();lAe="[object Symbol]";o(cAe,"isSymbol");so=cAe});function uAe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Ss,Md=R(()=>{"use strict";o(uAe,"arrayMap");Ss=uAe});function pQ(t){if(typeof t=="string")return t;if(wt(t))return Ss(t,pQ)+"";if(so(t))return dQ?dQ.call(t):"";var e=t+"";return e=="0"&&1/t==-hAe?"-0":e}var hAe,fQ,dQ,mQ,gQ=R(()=>{"use strict";vd();Md();Bn();Nd();hAe=1/0,fQ=Ji?Ji.prototype:void 0,dQ=fQ?fQ.toString:void 0;o(pQ,"baseToString");mQ=pQ});function dAe(t){for(var e=t.length;e--&&fAe.test(t.charAt(e)););return e}var fAe,yQ,vQ=R(()=>{"use strict";fAe=/\s/;o(dAe,"trimmedEndIndex");yQ=dAe});function mAe(t){return t&&t.slice(0,yQ(t)+1).replace(pAe,"")}var pAe,xQ,bQ=R(()=>{"use strict";vQ();pAe=/^\s+/;o(mAe,"baseTrim");xQ=mAe});function bAe(t){if(typeof t=="number")return t;if(so(t))return wQ;if(pn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=xQ(t);var r=yAe.test(t);return r||vAe.test(t)?xAe(t.slice(2),r?2:8):gAe.test(t)?wQ:+t}var wQ,gAe,yAe,vAe,xAe,TQ,kQ=R(()=>{"use strict";bQ();Js();Nd();wQ=NaN,gAe=/^[-+]0x[0-9a-f]+$/i,yAe=/^0b[01]+$/i,vAe=/^0o[0-7]+$/i,xAe=parseInt;o(bAe,"toNumber");TQ=bAe});function TAe(t){if(!t)return t===0?t:0;if(t=TQ(t),t===EQ||t===-EQ){var e=t<0?-1:1;return e*wAe}return t===t?t:0}var EQ,wAe,vm,rL=R(()=>{"use strict";kQ();EQ=1/0,wAe=17976931348623157e292;o(TAe,"toFinite");vm=TAe});function kAe(t){var e=vm(t),r=e%1;return e===e?r?e-r:e:0}var yc,xm=R(()=>{"use strict";rL();o(kAe,"toInteger");yc=kAe});var EAe,nw,CQ=R(()=>{"use strict";Nh();Ro();EAe=xs(Jn,"WeakMap"),nw=EAe});function CAe(){}var qn,nL=R(()=>{"use strict";o(CAe,"noop");qn=CAe});function SAe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var iw,iL=R(()=>{"use strict";o(SAe,"arrayEach");iw=SAe});function AAe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var aw,aL=R(()=>{"use strict";o(AAe,"baseFindIndex");aw=AAe});function _Ae(t){return t!==t}var SQ,AQ=R(()=>{"use strict";o(_Ae,"baseIsNaN");SQ=_Ae});function LAe(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var _Q,LQ=R(()=>{"use strict";o(LAe,"strictIndexOf");_Q=LAe});function DAe(t,e,r){return e===e?_Q(t,e,r):aw(t,SQ,r)}var bm,sw=R(()=>{"use strict";aL();AQ();LQ();o(DAe,"baseIndexOf");bm=DAe});function RAe(t,e){var r=t==null?0:t.length;return!!r&&bm(t,e,0)>-1}var ow,sL=R(()=>{"use strict";sw();o(RAe,"arrayIncludes");ow=RAe});var NAe,DQ,RQ=R(()=>{"use strict";F_();NAe=s5(Object.keys,Object),DQ=NAe});function OAe(t){if(!fc(t))return DQ(t);var e=[];for(var r in Object(t))IAe.call(t,r)&&r!="constructor"&&e.push(r);return e}var MAe,IAe,wm,lw=R(()=>{"use strict";tm();RQ();MAe=Object.prototype,IAe=MAe.hasOwnProperty;o(OAe,"baseKeys");wm=OAe});function PAe(t){return ei(t)?h5(t):wm(t)}var Dr,vc=R(()=>{"use strict";U_();lw();Io();o(PAe,"keys");Dr=PAe});var BAe,FAe,zAe,pa,NQ=R(()=>{"use strict";am();kd();q_();Io();tm();vc();BAe=Object.prototype,FAe=BAe.hasOwnProperty,zAe=p5(function(t,e){if(fc(e)||ei(e)){Bo(e,Dr(e),t);return}for(var r in e)FAe.call(e,r)&&dc(t,r,e[r])}),pa=zAe});function VAe(t,e){if(wt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||so(t)?!0:$Ae.test(t)||!GAe.test(t)||e!=null&&t in Object(e)}var GAe,$Ae,Tm,cw=R(()=>{"use strict";Bn();Nd();GAe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$Ae=/^\w*$/;o(VAe,"isKey");Tm=VAe});function HAe(t){var e=qp(t,function(n){return r.size===UAe&&r.clear(),n}),r=e.cache;return e}var UAe,MQ,IQ=R(()=>{"use strict";R_();UAe=500;o(HAe,"memoizeCapped");MQ=HAe});var YAe,WAe,qAe,OQ,PQ=R(()=>{"use strict";IQ();YAe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WAe=/\\(\\)?/g,qAe=MQ(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(YAe,function(r,n,i,a){e.push(i?a.replace(WAe,"$1"):n||r)}),e}),OQ=qAe});function XAe(t){return t==null?"":mQ(t)}var uw,oL=R(()=>{"use strict";gQ();o(XAe,"toString");uw=XAe});function jAe(t,e){return wt(t)?t:Tm(t,e)?[t]:OQ(uw(t))}var Hh,Lv=R(()=>{"use strict";Bn();cw();PQ();oL();o(jAe,"castPath");Hh=jAe});function QAe(t){if(typeof t=="string"||so(t))return t;var e=t+"";return e=="0"&&1/t==-KAe?"-0":e}var KAe,xc,km=R(()=>{"use strict";Nd();KAe=1/0;o(QAe,"toKey");xc=QAe});function ZAe(t,e){e=Hh(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[xc(e[r++])];return r&&r==n?t:void 0}var Yh,Dv=R(()=>{"use strict";Lv();km();o(ZAe,"baseGet");Yh=ZAe});function JAe(t,e,r){var n=t==null?void 0:Yh(t,e);return n===void 0?r:n}var BQ,FQ=R(()=>{"use strict";Dv();o(JAe,"get");BQ=JAe});function e8e(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var Em,hw=R(()=>{"use strict";o(e8e,"arrayPush");Em=e8e});function t8e(t){return wt(t)||kl(t)||!!(zQ&&t&&t[zQ])}var zQ,GQ,$Q=R(()=>{"use strict";vd();rm();Bn();zQ=Ji?Ji.isConcatSpreadable:void 0;o(t8e,"isFlattenable");GQ=t8e});function VQ(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=GQ),i||(i=[]);++a<s;){var l=t[a];e>0&&r(l)?e>1?VQ(l,e-1,r,n,i):Em(i,l):n||(i[i.length]=l)}return i}var bc,Cm=R(()=>{"use strict";hw();$Q();o(VQ,"baseFlatten");bc=VQ});function r8e(t){var e=t==null?0:t.length;return e?bc(t,1):[]}var Gr,fw=R(()=>{"use strict";Cm();o(r8e,"flatten");Gr=r8e});function n8e(t){return d5(f5(t,void 0,Gr),t+"")}var UQ,HQ=R(()=>{"use strict";fw();H_();W_();o(n8e,"flatRest");UQ=n8e});function i8e(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}var dw,lL=R(()=>{"use strict";o(i8e,"baseSlice");dw=i8e});function d8e(t){return f8e.test(t)}var a8e,s8e,o8e,l8e,c8e,u8e,h8e,f8e,YQ,WQ=R(()=>{"use strict";a8e="\\ud800-\\udfff",s8e="\\u0300-\\u036f",o8e="\\ufe20-\\ufe2f",l8e="\\u20d0-\\u20ff",c8e=s8e+o8e+l8e,u8e="\\ufe0e\\ufe0f",h8e="\\u200d",f8e=RegExp("["+h8e+a8e+c8e+u8e+"]");o(d8e,"hasUnicode");YQ=d8e});function p8e(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}var qQ,XQ=R(()=>{"use strict";o(p8e,"arrayReduce");qQ=p8e});function m8e(t,e){return t&&Bo(e,Dr(e),t)}var jQ,KQ=R(()=>{"use strict";kd();vc();o(m8e,"baseAssign");jQ=m8e});function g8e(t,e){return t&&Bo(e,bs(e),t)}var QQ,ZQ=R(()=>{"use strict";kd();zh();o(g8e,"baseAssignIn");QQ=g8e});function y8e(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}var Sm,pw=R(()=>{"use strict";o(y8e,"arrayFilter");Sm=y8e});function v8e(){return[]}var mw,cL=R(()=>{"use strict";o(v8e,"stubArray");mw=v8e});var x8e,b8e,JQ,w8e,Am,gw=R(()=>{"use strict";pw();cL();x8e=Object.prototype,b8e=x8e.propertyIsEnumerable,JQ=Object.getOwnPropertySymbols,w8e=JQ?function(t){return t==null?[]:(t=Object(t),Sm(JQ(t),function(e){return b8e.call(t,e)}))}:mw,Am=w8e});function T8e(t,e){return Bo(t,Am(t),e)}var eZ,tZ=R(()=>{"use strict";kd();gw();o(T8e,"copySymbols");eZ=T8e});var k8e,E8e,yw,uL=R(()=>{"use strict";hw();o5();gw();cL();k8e=Object.getOwnPropertySymbols,E8e=k8e?function(t){for(var e=[];t;)Em(e,Am(t)),t=em(t);return e}:mw,yw=E8e});function C8e(t,e){return Bo(t,yw(t),e)}var rZ,nZ=R(()=>{"use strict";kd();uL();o(C8e,"copySymbolsIn");rZ=C8e});function S8e(t,e,r){var n=e(t);return wt(t)?n:Em(n,r(t))}var vw,hL=R(()=>{"use strict";hw();Bn();o(S8e,"baseGetAllKeys");vw=S8e});function A8e(t){return vw(t,Dr,Am)}var Rv,fL=R(()=>{"use strict";hL();gw();vc();o(A8e,"getAllKeys");Rv=A8e});function _8e(t){return vw(t,bs,yw)}var xw,dL=R(()=>{"use strict";hL();uL();zh();o(_8e,"getAllKeysIn");xw=_8e});var L8e,bw,iZ=R(()=>{"use strict";Nh();Ro();L8e=xs(Jn,"DataView"),bw=L8e});var D8e,ww,aZ=R(()=>{"use strict";Nh();Ro();D8e=xs(Jn,"Promise"),ww=D8e});var R8e,Wh,pL=R(()=>{"use strict";Nh();Ro();R8e=xs(Jn,"Set"),Wh=R8e});var sZ,N8e,oZ,lZ,cZ,uZ,M8e,I8e,O8e,P8e,B8e,Id,oo,Od=R(()=>{"use strict";iZ();J3();aZ();pL();CQ();wu();__();sZ="[object Map]",N8e="[object Object]",oZ="[object Promise]",lZ="[object Set]",cZ="[object WeakMap]",uZ="[object DataView]",M8e=Tu(bw),I8e=Tu(Oh),O8e=Tu(ww),P8e=Tu(Wh),B8e=Tu(nw),Id=fa;(bw&&Id(new bw(new ArrayBuffer(1)))!=uZ||Oh&&Id(new Oh)!=sZ||ww&&Id(ww.resolve())!=oZ||Wh&&Id(new Wh)!=lZ||nw&&Id(new nw)!=cZ)&&(Id=o(function(t){var e=fa(t),r=e==N8e?t.constructor:void 0,n=r?Tu(r):"";if(n)switch(n){case M8e:return uZ;case I8e:return sZ;case O8e:return oZ;case P8e:return lZ;case B8e:return cZ}return e},"getTag"));oo=Id});function G8e(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&z8e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var F8e,z8e,hZ,fZ=R(()=>{"use strict";F8e=Object.prototype,z8e=F8e.hasOwnProperty;o(G8e,"initCloneArray");hZ=G8e});function $8e(t,e){var r=e?Jp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var dZ,pZ=R(()=>{"use strict";n5();o($8e,"cloneDataView");dZ=$8e});function U8e(t){var e=new t.constructor(t.source,V8e.exec(t));return e.lastIndex=t.lastIndex,e}var V8e,mZ,gZ=R(()=>{"use strict";V8e=/\w*$/;o(U8e,"cloneRegExp");mZ=U8e});function H8e(t){return vZ?Object(vZ.call(t)):{}}var yZ,vZ,xZ,bZ=R(()=>{"use strict";vd();yZ=Ji?Ji.prototype:void 0,vZ=yZ?yZ.valueOf:void 0;o(H8e,"cloneSymbol");xZ=H8e});function u_e(t,e,r){var n=t.constructor;switch(e){case J8e:return Jp(t);case Y8e:case W8e:return new n(+t);case e_e:return dZ(t,r);case t_e:case r_e:case n_e:case i_e:case a_e:case s_e:case o_e:case l_e:case c_e:return i5(t,r);case q8e:return new n;case X8e:case Q8e:return new n(t);case j8e:return mZ(t);case K8e:return new n;case Z8e:return xZ(t)}}var Y8e,W8e,q8e,X8e,j8e,K8e,Q8e,Z8e,J8e,e_e,t_e,r_e,n_e,i_e,a_e,s_e,o_e,l_e,c_e,wZ,TZ=R(()=>{"use strict";n5();pZ();gZ();bZ();P_();Y8e="[object Boolean]",W8e="[object Date]",q8e="[object Map]",X8e="[object Number]",j8e="[object RegExp]",K8e="[object Set]",Q8e="[object String]",Z8e="[object Symbol]",J8e="[object ArrayBuffer]",e_e="[object DataView]",t_e="[object Float32Array]",r_e="[object Float64Array]",n_e="[object Int8Array]",i_e="[object Int16Array]",a_e="[object Int32Array]",s_e="[object Uint8Array]",o_e="[object Uint8ClampedArray]",l_e="[object Uint16Array]",c_e="[object Uint32Array]";o(u_e,"initCloneByTag");wZ=u_e});function f_e(t){return Wn(t)&&oo(t)==h_e}var h_e,kZ,EZ=R(()=>{"use strict";Od();Mo();h_e="[object Map]";o(f_e,"baseIsMap");kZ=f_e});var CZ,d_e,SZ,AZ=R(()=>{"use strict";EZ();Td();ov();CZ=Po&&Po.isMap,d_e=CZ?Oo(CZ):kZ,SZ=d_e});function m_e(t){return Wn(t)&&oo(t)==p_e}var p_e,_Z,LZ=R(()=>{"use strict";Od();Mo();p_e="[object Set]";o(m_e,"baseIsSet");_Z=m_e});var DZ,g_e,RZ,NZ=R(()=>{"use strict";LZ();Td();ov();DZ=Po&&Po.isSet,g_e=DZ?Oo(DZ):_Z,RZ=g_e});function Tw(t,e,r,n,i,a){var s,l=e&y_e,u=e&v_e,h=e&x_e;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!pn(t))return t;var f=wt(t);if(f){if(s=hZ(t),!l)return a5(t,s)}else{var d=oo(t),p=d==IZ||d==E_e;if(El(t))return r5(t,l);if(d==OZ||d==MZ||p&&!i){if(s=u||p?{}:l5(t),!l)return u?rZ(t,QQ(s,t)):eZ(t,jQ(s,t))}else{if(!Cn[d])return i?t:{};s=wZ(t,d,l)}}a||(a=new uc);var m=a.get(t);if(m)return m;a.set(t,s),RZ(t)?t.forEach(function(v){s.add(Tw(v,e,r,v,t,a))}):SZ(t)&&t.forEach(function(v,x){s.set(x,Tw(v,e,r,x,t,a))});var g=h?u?xw:Rv:u?bs:Dr,y=f?void 0:g(t);return iw(y||t,function(v,x){y&&(x=v,v=t[x]),dc(s,x,Tw(v,e,r,x,t,a))}),s}var y_e,v_e,x_e,MZ,b_e,w_e,T_e,k_e,IZ,E_e,C_e,S_e,OZ,A_e,__e,L_e,D_e,R_e,N_e,M_e,I_e,O_e,P_e,B_e,F_e,z_e,G_e,$_e,V_e,Cn,kw,mL=R(()=>{"use strict";iv();iL();am();KQ();ZQ();I_();B_();tZ();nZ();fL();dL();Od();fZ();TZ();z_();Bn();im();AZ();Js();NZ();vc();zh();y_e=1,v_e=2,x_e=4,MZ="[object Arguments]",b_e="[object Array]",w_e="[object Boolean]",T_e="[object Date]",k_e="[object Error]",IZ="[object Function]",E_e="[object GeneratorFunction]",C_e="[object Map]",S_e="[object Number]",OZ="[object Object]",A_e="[object RegExp]",__e="[object Set]",L_e="[object String]",D_e="[object Symbol]",R_e="[object WeakMap]",N_e="[object ArrayBuffer]",M_e="[object DataView]",I_e="[object Float32Array]",O_e="[object Float64Array]",P_e="[object Int8Array]",B_e="[object Int16Array]",F_e="[object Int32Array]",z_e="[object Uint8Array]",G_e="[object Uint8ClampedArray]",$_e="[object Uint16Array]",V_e="[object Uint32Array]",Cn={};Cn[MZ]=Cn[b_e]=Cn[N_e]=Cn[M_e]=Cn[w_e]=Cn[T_e]=Cn[I_e]=Cn[O_e]=Cn[P_e]=Cn[B_e]=Cn[F_e]=Cn[C_e]=Cn[S_e]=Cn[OZ]=Cn[A_e]=Cn[__e]=Cn[L_e]=Cn[D_e]=Cn[z_e]=Cn[G_e]=Cn[$_e]=Cn[V_e]=!0;Cn[k_e]=Cn[IZ]=Cn[R_e]=!1;o(Tw,"baseClone");kw=Tw});function H_e(t){return kw(t,U_e)}var U_e,Qr,gL=R(()=>{"use strict";mL();U_e=4;o(H_e,"clone");Qr=H_e});function q_e(t){return kw(t,Y_e|W_e)}var Y_e,W_e,yL,PZ=R(()=>{"use strict";mL();Y_e=1,W_e=4;o(q_e,"cloneDeep");yL=q_e});function X_e(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}var wc,BZ=R(()=>{"use strict";o(X_e,"compact");wc=X_e});function K_e(t){return this.__data__.set(t,j_e),this}var j_e,FZ,zZ=R(()=>{"use strict";j_e="__lodash_hash_undefined__";o(K_e,"setCacheAdd");FZ=K_e});function Q_e(t){return this.__data__.has(t)}var GZ,$Z=R(()=>{"use strict";o(Q_e,"setCacheHas");GZ=Q_e});function Ew(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new bd;++e<r;)this.add(t[e])}var _m,Cw=R(()=>{"use strict";e5();zZ();$Z();o(Ew,"SetCache");Ew.prototype.add=Ew.prototype.push=FZ;Ew.prototype.has=GZ;_m=Ew});function Z_e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Sw,vL=R(()=>{"use strict";o(Z_e,"arraySome");Sw=Z_e});function J_e(t,e){return t.has(e)}var Lm,Aw=R(()=>{"use strict";o(J_e,"cacheHas");Lm=J_e});function r9e(t,e,r,n,i,a){var s=r&e9e,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=-1,p=!0,m=r&t9e?new _m:void 0;for(a.set(t,e),a.set(e,t);++d<l;){var g=t[d],y=e[d];if(n)var v=s?n(y,g,d,e,t,a):n(g,y,d,t,e,a);if(v!==void 0){if(v)continue;p=!1;break}if(m){if(!Sw(e,function(x,b){if(!Lm(m,b)&&(g===x||i(g,x,r,n,a)))return m.push(b)})){p=!1;break}}else if(!(g===y||i(g,y,r,n,a))){p=!1;break}}return a.delete(t),a.delete(e),p}var e9e,t9e,_w,xL=R(()=>{"use strict";Cw();vL();Aw();e9e=1,t9e=2;o(r9e,"equalArrays");_w=r9e});function n9e(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var VZ,UZ=R(()=>{"use strict";o(n9e,"mapToArray");VZ=n9e});function i9e(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Dm,Lw=R(()=>{"use strict";o(i9e,"setToArray");Dm=i9e});function v9e(t,e,r,n,i,a,s){switch(r){case y9e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case g9e:return!(t.byteLength!=e.byteLength||!a(new Zp(t),new Zp(e)));case o9e:case l9e:case h9e:return No(+t,+e);case c9e:return t.name==e.name&&t.message==e.message;case f9e:case p9e:return t==e+"";case u9e:var l=VZ;case d9e:var u=n&a9e;if(l||(l=Dm),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=s9e,s.set(t,e);var f=_w(l(t),l(e),n,i,a,s);return s.delete(t),f;case m9e:if(bL)return bL.call(t)==bL.call(e)}return!1}var a9e,s9e,o9e,l9e,c9e,u9e,h9e,f9e,d9e,p9e,m9e,g9e,y9e,HZ,bL,YZ,WZ=R(()=>{"use strict";vd();O_();xd();xL();UZ();Lw();a9e=1,s9e=2,o9e="[object Boolean]",l9e="[object Date]",c9e="[object Error]",u9e="[object Map]",h9e="[object Number]",f9e="[object RegExp]",d9e="[object Set]",p9e="[object String]",m9e="[object Symbol]",g9e="[object ArrayBuffer]",y9e="[object DataView]",HZ=Ji?Ji.prototype:void 0,bL=HZ?HZ.valueOf:void 0;o(v9e,"equalByTag");YZ=v9e});function T9e(t,e,r,n,i,a){var s=r&x9e,l=Rv(t),u=l.length,h=Rv(e),f=h.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in e:w9e.call(e,p)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=s;++d<u;){p=l[d];var x=t[p],b=e[p];if(n)var w=s?n(b,x,p,e,t,a):n(x,b,p,t,e,a);if(!(w===void 0?x===b||i(x,b,r,n,a):w)){y=!1;break}v||(v=p=="constructor")}if(y&&!v){var S=t.constructor,T=e.constructor;S!=T&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof T=="function"&&T instanceof T)&&(y=!1)}return a.delete(t),a.delete(e),y}var x9e,b9e,w9e,qZ,XZ=R(()=>{"use strict";fL();x9e=1,b9e=Object.prototype,w9e=b9e.hasOwnProperty;o(T9e,"equalObjects");qZ=T9e});function C9e(t,e,r,n,i,a){var s=wt(t),l=wt(e),u=s?KZ:oo(t),h=l?KZ:oo(e);u=u==jZ?Dw:u,h=h==jZ?Dw:h;var f=u==Dw,d=h==Dw,p=u==h;if(p&&El(t)){if(!El(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new uc),s||Bh(t)?_w(t,e,r,n,i,a):YZ(t,e,u,r,n,i,a);if(!(r&k9e)){var m=f&&QZ.call(t,"__wrapped__"),g=d&&QZ.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,v=g?e.value():e;return a||(a=new uc),i(y,v,r,n,a)}}return p?(a||(a=new uc),qZ(t,e,r,n,i,a)):!1}var k9e,jZ,KZ,Dw,E9e,QZ,ZZ,JZ=R(()=>{"use strict";iv();xL();WZ();XZ();Od();Bn();im();lv();k9e=1,jZ="[object Arguments]",KZ="[object Array]",Dw="[object Object]",E9e=Object.prototype,QZ=E9e.hasOwnProperty;o(C9e,"baseIsEqualDeep");ZZ=C9e});function eJ(t,e,r,n,i){return t===e?!0:t==null||e==null||!Wn(t)&&!Wn(e)?t!==t&&e!==e:ZZ(t,e,r,n,eJ,i)}var Rw,wL=R(()=>{"use strict";JZ();Mo();o(eJ,"baseIsEqual");Rw=eJ});function _9e(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i<a;){l=r[i];var u=l[0],h=t[u],f=l[1];if(s&&l[2]){if(h===void 0&&!(u in t))return!1}else{var d=new uc;if(n)var p=n(h,f,u,t,e,d);if(!(p===void 0?Rw(f,h,S9e|A9e,n,d):p))return!1}}return!0}var S9e,A9e,tJ,rJ=R(()=>{"use strict";iv();wL();S9e=1,A9e=2;o(_9e,"baseIsMatch");tJ=_9e});function L9e(t){return t===t&&!pn(t)}var Nw,TL=R(()=>{"use strict";Js();o(L9e,"isStrictComparable");Nw=L9e});function D9e(t){for(var e=Dr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Nw(i)]}return e}var nJ,iJ=R(()=>{"use strict";TL();vc();o(D9e,"getMatchData");nJ=D9e});function R9e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var Mw,kL=R(()=>{"use strict";o(R9e,"matchesStrictComparable");Mw=R9e});function N9e(t){var e=nJ(t);return e.length==1&&e[0][2]?Mw(e[0][0],e[0][1]):function(r){return r===t||tJ(r,t,e)}}var aJ,sJ=R(()=>{"use strict";rJ();iJ();kL();o(N9e,"baseMatches");aJ=N9e});function M9e(t,e){return t!=null&&e in Object(t)}var oJ,lJ=R(()=>{"use strict";o(M9e,"baseHasIn");oJ=M9e});function I9e(t,e,r){e=Hh(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var s=xc(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&nm(i)&&Fh(s,i)&&(wt(t)||kl(t)))}var Iw,EL=R(()=>{"use strict";Lv();rm();Bn();uv();c5();km();o(I9e,"hasPath");Iw=I9e});function O9e(t,e){return t!=null&&Iw(t,e,oJ)}var Ow,CL=R(()=>{"use strict";lJ();EL();o(O9e,"hasIn");Ow=O9e});function F9e(t,e){return Tm(t)&&Nw(e)?Mw(xc(t),e):function(r){var n=BQ(r,t);return n===void 0&&n===e?Ow(r,t):Rw(e,n,P9e|B9e)}}var P9e,B9e,cJ,uJ=R(()=>{"use strict";wL();FQ();CL();cw();TL();kL();km();P9e=1,B9e=2;o(F9e,"baseMatchesProperty");cJ=F9e});function z9e(t){return function(e){return e?.[t]}}var Pw,SL=R(()=>{"use strict";o(z9e,"baseProperty");Pw=z9e});function G9e(t){return function(e){return Yh(e,t)}}var hJ,fJ=R(()=>{"use strict";Dv();o(G9e,"basePropertyDeep");hJ=G9e});function $9e(t){return Tm(t)?Pw(xc(t)):hJ(t)}var dJ,pJ=R(()=>{"use strict";SL();fJ();cw();km();o($9e,"property");dJ=$9e});function V9e(t){return typeof t=="function"?t:t==null?ea:typeof t=="object"?wt(t)?cJ(t[0],t[1]):aJ(t):dJ(t)}var cn,Qa=R(()=>{"use strict";sJ();uJ();Eu();Bn();pJ();o(V9e,"baseIteratee");cn=V9e});function U9e(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;){var s=t[i];e(n,s,r(s),t)}return n}var mJ,gJ=R(()=>{"use strict";o(U9e,"arrayAggregator");mJ=U9e});function H9e(t,e){return t&&Qp(t,e,Dr)}var Rm,Bw=R(()=>{"use strict";t5();vc();o(H9e,"baseForOwn");Rm=H9e});function Y9e(t,e){return function(r,n){if(r==null)return r;if(!ei(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a<i)&&n(s[a],a,s)!==!1;);return r}}var yJ,vJ=R(()=>{"use strict";Io();o(Y9e,"createBaseEach");yJ=Y9e});var W9e,As,qh=R(()=>{"use strict";Bw();vJ();W9e=yJ(Rm),As=W9e});function q9e(t,e,r,n){return As(t,function(i,a,s){e(n,i,r(i),s)}),n}var xJ,bJ=R(()=>{"use strict";qh();o(q9e,"baseAggregator");xJ=q9e});function X9e(t,e){return function(r,n){var i=wt(r)?mJ:xJ,a=e?e():{};return i(r,t,cn(n,2),a)}}var wJ,TJ=R(()=>{"use strict";gJ();bJ();Qa();Bn();o(X9e,"createAggregator");wJ=X9e});var j9e,Fw,kJ=R(()=>{"use strict";Ro();j9e=o(function(){return Jn.Date.now()},"now"),Fw=j9e});var EJ,K9e,Q9e,Xh,CJ=R(()=>{"use strict";sm();xd();Ed();zh();EJ=Object.prototype,K9e=EJ.hasOwnProperty,Q9e=pc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&eo(e[0],e[1],i)&&(n=1);++r<n;)for(var a=e[r],s=bs(a),l=-1,u=s.length;++l<u;){var h=s[l],f=t[h];(f===void 0||No(f,EJ[h])&&!K9e.call(t,h))&&(t[h]=a[h])}return t}),Xh=Q9e});function Z9e(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var zw,AL=R(()=>{"use strict";o(Z9e,"arrayIncludesWith");zw=Z9e});function eLe(t,e,r,n){var i=-1,a=ow,s=!0,l=t.length,u=[],h=e.length;if(!l)return u;r&&(e=Ss(e,Oo(r))),n?(a=zw,s=!1):e.length>=J9e&&(a=Lm,s=!1,e=new _m(e));e:for(;++i<l;){var f=t[i],d=r==null?f:r(f);if(f=n||f!==0?f:0,s&&d===d){for(var p=h;p--;)if(e[p]===d)continue e;u.push(f)}else a(e,d,n)||u.push(f)}return u}var J9e,SJ,AJ=R(()=>{"use strict";Cw();sL();AL();Md();Td();Aw();J9e=200;o(eLe,"baseDifference");SJ=eLe});var tLe,jh,_J=R(()=>{"use strict";AJ();Cm();sm();u5();tLe=pc(function(t,e){return wd(t)?SJ(t,bc(e,1,wd,!0)):[]}),jh=tLe});function rLe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var ma,LJ=R(()=>{"use strict";o(rLe,"last");ma=rLe});function nLe(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:yc(e),dw(t,e<0?0:e,n)):[]}var fi,DJ=R(()=>{"use strict";lL();xm();o(nLe,"drop");fi=nLe});function iLe(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:yc(e),e=n-e,dw(t,0,e<0?0:e)):[]}var Ru,RJ=R(()=>{"use strict";lL();xm();o(iLe,"dropRight");Ru=iLe});function aLe(t){return typeof t=="function"?t:ea}var Nm,Gw=R(()=>{"use strict";Eu();o(aLe,"castFunction");Nm=aLe});function sLe(t,e){var r=wt(t)?iw:As;return r(t,Nm(e))}var Ee,$w=R(()=>{"use strict";iL();qh();Gw();Bn();o(sLe,"forEach");Ee=sLe});var NJ=R(()=>{"use strict";$w()});function oLe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var MJ,IJ=R(()=>{"use strict";o(oLe,"arrayEvery");MJ=oLe});function lLe(t,e){var r=!0;return As(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var OJ,PJ=R(()=>{"use strict";qh();o(lLe,"baseEvery");OJ=lLe});function cLe(t,e,r){var n=wt(t)?MJ:OJ;return r&&eo(t,e,r)&&(e=void 0),n(t,cn(e,3))}var Ia,BJ=R(()=>{"use strict";IJ();PJ();Qa();Bn();Ed();o(cLe,"every");Ia=cLe});function uLe(t,e){var r=[];return As(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var Vw,_L=R(()=>{"use strict";qh();o(uLe,"baseFilter");Vw=uLe});function hLe(t,e){var r=wt(t)?Sm:Vw;return r(t,cn(e,3))}var $r,LL=R(()=>{"use strict";pw();_L();Qa();Bn();o(hLe,"filter");$r=hLe});function fLe(t){return function(e,r,n){var i=Object(e);if(!ei(e)){var a=cn(r,3);e=Dr(e),r=o(function(l){return a(i[l],l,i)},"predicate")}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0}}var FJ,zJ=R(()=>{"use strict";Qa();Io();vc();o(fLe,"createFind");FJ=fLe});function pLe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:yc(r);return i<0&&(i=dLe(n+i,0)),aw(t,cn(e,3),i)}var dLe,GJ,$J=R(()=>{"use strict";aL();Qa();xm();dLe=Math.max;o(pLe,"findIndex");GJ=pLe});var mLe,Za,VJ=R(()=>{"use strict";zJ();$J();mLe=FJ(GJ),Za=mLe});function gLe(t){return t&&t.length?t[0]:void 0}var na,UJ=R(()=>{"use strict";o(gLe,"head");na=gLe});var HJ=R(()=>{"use strict";UJ()});function yLe(t,e){var r=-1,n=ei(t)?Array(t.length):[];return As(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var Uw,DL=R(()=>{"use strict";qh();Io();o(yLe,"baseMap");Uw=yLe});function vLe(t,e){var r=wt(t)?Ss:Uw;return r(t,cn(e,3))}var qe,Mm=R(()=>{"use strict";Md();Qa();DL();Bn();o(vLe,"map");qe=vLe});function xLe(t,e){return bc(qe(t,e),1)}var ga,RL=R(()=>{"use strict";Cm();Mm();o(xLe,"flatMap");ga=xLe});function bLe(t,e){return t==null?t:Qp(t,Nm(e),bs)}var NL,YJ=R(()=>{"use strict";t5();Gw();zh();o(bLe,"forIn");NL=bLe});function wLe(t,e){return t&&Rm(t,Nm(e))}var ML,WJ=R(()=>{"use strict";Bw();Gw();o(wLe,"forOwn");ML=wLe});var TLe,kLe,ELe,IL,qJ=R(()=>{"use strict";Kp();TJ();TLe=Object.prototype,kLe=TLe.hasOwnProperty,ELe=wJ(function(t,e,r){kLe.call(t,r)?t[r].push(e):hc(t,r,[e])}),IL=ELe});function CLe(t,e){return t>e}var XJ,jJ=R(()=>{"use strict";o(CLe,"baseGt");XJ=CLe});function _Le(t,e){return t!=null&&ALe.call(t,e)}var SLe,ALe,KJ,QJ=R(()=>{"use strict";SLe=Object.prototype,ALe=SLe.hasOwnProperty;o(_Le,"baseHas");KJ=_Le});function LLe(t,e){return t!=null&&Iw(t,e,KJ)}var Xe,ZJ=R(()=>{"use strict";QJ();EL();o(LLe,"has");Xe=LLe});function RLe(t){return typeof t=="string"||!wt(t)&&Wn(t)&&fa(t)==DLe}var DLe,di,Hw=R(()=>{"use strict";wu();Bn();Mo();DLe="[object String]";o(RLe,"isString");di=RLe});function NLe(t,e){return Ss(e,function(r){return t[r]})}var JJ,eee=R(()=>{"use strict";Md();o(NLe,"baseValues");JJ=NLe});function MLe(t){return t==null?[]:JJ(t,Dr(t))}var or,OL=R(()=>{"use strict";eee();vc();o(MLe,"values");or=MLe});function OLe(t,e,r,n){t=ei(t)?t:or(t),r=r&&!n?yc(r):0;var i=t.length;return r<0&&(r=ILe(i+r,0)),di(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&bm(t,e,r)>-1}var ILe,Fn,tee=R(()=>{"use strict";sw();Io();Hw();xm();OL();ILe=Math.max;o(OLe,"includes");Fn=OLe});function BLe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:yc(r);return i<0&&(i=PLe(n+i,0)),bm(t,e,i)}var PLe,Yw,ree=R(()=>{"use strict";sw();xm();PLe=Math.max;o(BLe,"indexOf");Yw=BLe});function VLe(t){if(t==null)return!0;if(ei(t)&&(wt(t)||typeof t=="string"||typeof t.splice=="function"||El(t)||Bh(t)||kl(t)))return!t.length;var e=oo(t);if(e==FLe||e==zLe)return!t.size;if(fc(t))return!wm(t).length;for(var r in t)if($Le.call(t,r))return!1;return!0}var FLe,zLe,GLe,$Le,Qt,Ww=R(()=>{"use strict";lw();Od();rm();Bn();Io();im();tm();lv();FLe="[object Map]",zLe="[object Set]",GLe=Object.prototype,$Le=GLe.hasOwnProperty;o(VLe,"isEmpty");Qt=VLe});function HLe(t){return Wn(t)&&fa(t)==ULe}var ULe,nee,iee=R(()=>{"use strict";wu();Mo();ULe="[object RegExp]";o(HLe,"baseIsRegExp");nee=HLe});var aee,YLe,zo,see=R(()=>{"use strict";iee();Td();ov();aee=Po&&Po.isRegExp,YLe=aee?Oo(aee):nee,zo=YLe});function WLe(t){return t===void 0}var er,oee=R(()=>{"use strict";o(WLe,"isUndefined");er=WLe});function qLe(t,e){return t<e}var qw,PL=R(()=>{"use strict";o(qLe,"baseLt");qw=qLe});function XLe(t,e){var r={};return e=cn(e,3),Rm(t,function(n,i,a){hc(r,i,e(n,i,a))}),r}var Pd,lee=R(()=>{"use strict";Kp();Bw();Qa();o(XLe,"mapValues");Pd=XLe});function jLe(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],s=e(a);if(s!=null&&(l===void 0?s===s&&!so(s):r(s,l)))var l=s,u=a}return u}var Im,Xw=R(()=>{"use strict";Nd();o(jLe,"baseExtremum");Im=jLe});function KLe(t){return t&&t.length?Im(t,ea,XJ):void 0}var _s,cee=R(()=>{"use strict";Xw();jJ();Eu();o(KLe,"max");_s=KLe});function QLe(t){return t&&t.length?Im(t,ea,qw):void 0}var Ll,BL=R(()=>{"use strict";Xw();PL();Eu();o(QLe,"min");Ll=QLe});function ZLe(t,e){return t&&t.length?Im(t,cn(e,2),qw):void 0}var Bd,uee=R(()=>{"use strict";Xw();Qa();PL();o(ZLe,"minBy");Bd=ZLe});function eDe(t){if(typeof t!="function")throw new TypeError(JLe);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var JLe,hee,fee=R(()=>{"use strict";JLe="Expected a function";o(eDe,"negate");hee=eDe});function tDe(t,e,r,n){if(!pn(t))return t;e=Hh(e,t);for(var i=-1,a=e.length,s=a-1,l=t;l!=null&&++i<a;){var u=xc(e[i]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(i!=s){var f=l[u];h=n?n(f,u,l):void 0,h===void 0&&(h=pn(f)?f:Fh(e[i+1])?[]:{})}dc(l,u,h),l=l[u]}return t}var dee,pee=R(()=>{"use strict";am();Lv();uv();Js();km();o(tDe,"baseSet");dee=tDe});function rDe(t,e,r){for(var n=-1,i=e.length,a={};++n<i;){var s=e[n],l=Yh(t,s);r(l,s)&&dee(a,Hh(s,t),l)}return a}var jw,FL=R(()=>{"use strict";Dv();pee();Lv();o(rDe,"basePickBy");jw=rDe});function nDe(t,e){if(t==null)return{};var r=Ss(xw(t),function(n){return[n]});return e=cn(e),jw(t,r,function(n,i){return e(n,i[0])})}var Ls,mee=R(()=>{"use strict";Md();Qa();FL();dL();o(nDe,"pickBy");Ls=nDe});function iDe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var gee,yee=R(()=>{"use strict";o(iDe,"baseSortBy");gee=iDe});function aDe(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=so(t),s=e!==void 0,l=e===null,u=e===e,h=so(e);if(!l&&!h&&!a&&t>e||a&&s&&u&&!l&&!h||n&&s&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&t<e||h&&r&&i&&!n&&!a||l&&r&&i||!s&&i||!u)return-1}return 0}var vee,xee=R(()=>{"use strict";Nd();o(aDe,"compareAscending");vee=aDe});function sDe(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,l=r.length;++n<s;){var u=vee(i[n],a[n]);if(u){if(n>=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return t.index-e.index}var bee,wee=R(()=>{"use strict";xee();o(sDe,"compareMultiple");bee=sDe});function oDe(t,e,r){e.length?e=Ss(e,function(a){return wt(a)?function(s){return Yh(s,a.length===1?a[0]:a)}:a}):e=[ea];var n=-1;e=Ss(e,Oo(cn));var i=Uw(t,function(a,s,l){var u=Ss(e,function(h){return h(a)});return{criteria:u,index:++n,value:a}});return gee(i,function(a,s){return bee(a,s,r)})}var Tee,kee=R(()=>{"use strict";Md();Dv();Qa();DL();yee();Td();wee();Eu();Bn();o(oDe,"baseOrderBy");Tee=oDe});var lDe,Eee,Cee=R(()=>{"use strict";SL();lDe=Pw("length"),Eee=lDe});function bDe(t){for(var e=See.lastIndex=0;See.test(t);)++e;return e}var Aee,cDe,uDe,hDe,fDe,dDe,pDe,zL,GL,mDe,_ee,Lee,Dee,gDe,Ree,Nee,yDe,vDe,xDe,See,Mee,Iee=R(()=>{"use strict";Aee="\\ud800-\\udfff",cDe="\\u0300-\\u036f",uDe="\\ufe20-\\ufe2f",hDe="\\u20d0-\\u20ff",fDe=cDe+uDe+hDe,dDe="\\ufe0e\\ufe0f",pDe="["+Aee+"]",zL="["+fDe+"]",GL="\\ud83c[\\udffb-\\udfff]",mDe="(?:"+zL+"|"+GL+")",_ee="[^"+Aee+"]",Lee="(?:\\ud83c[\\udde6-\\uddff]){2}",Dee="[\\ud800-\\udbff][\\udc00-\\udfff]",gDe="\\u200d",Ree=mDe+"?",Nee="["+dDe+"]?",yDe="(?:"+gDe+"(?:"+[_ee,Lee,Dee].join("|")+")"+Nee+Ree+")*",vDe=Nee+Ree+yDe,xDe="(?:"+[_ee+zL+"?",zL,Lee,Dee,pDe].join("|")+")",See=RegExp(GL+"(?="+GL+")|"+xDe+vDe,"g");o(bDe,"unicodeSize");Mee=bDe});function wDe(t){return YQ(t)?Mee(t):Eee(t)}var Oee,Pee=R(()=>{"use strict";Cee();WQ();Iee();o(wDe,"stringSize");Oee=wDe});function TDe(t,e){return jw(t,e,function(r,n){return Ow(t,n)})}var Bee,Fee=R(()=>{"use strict";FL();CL();o(TDe,"basePick");Bee=TDe});var kDe,Fd,zee=R(()=>{"use strict";Fee();HQ();kDe=UQ(function(t,e){return t==null?{}:Bee(t,e)}),Fd=kDe});function SDe(t,e,r,n){for(var i=-1,a=CDe(EDe((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var EDe,CDe,Gee,$ee=R(()=>{"use strict";EDe=Math.ceil,CDe=Math.max;o(SDe,"baseRange");Gee=SDe});function ADe(t){return function(e,r,n){return n&&typeof n!="number"&&eo(e,r,n)&&(r=n=void 0),e=vm(e),r===void 0?(r=e,e=0):r=vm(r),n=n===void 0?e<r?1:-1:vm(n),Gee(e,r,n,t)}}var Vee,Uee=R(()=>{"use strict";$ee();Ed();rL();o(ADe,"createRange");Vee=ADe});var _De,Go,Hee=R(()=>{"use strict";Uee();_De=Vee(),Go=_De});function LDe(t,e,r,n,i){return i(t,function(a,s,l){r=n?(n=!1,a):e(r,a,s,l)}),r}var Yee,Wee=R(()=>{"use strict";o(LDe,"baseReduce");Yee=LDe});function DDe(t,e,r){var n=wt(t)?qQ:Yee,i=arguments.length<3;return n(t,cn(e,4),r,i,As)}var Vr,$L=R(()=>{"use strict";XQ();qh();Qa();Wee();Bn();o(DDe,"reduce");Vr=DDe});function RDe(t,e){var r=wt(t)?Sm:Vw;return r(t,hee(cn(e,3)))}var Kh,qee=R(()=>{"use strict";pw();_L();Qa();Bn();fee();o(RDe,"reject");Kh=RDe});function IDe(t){if(t==null)return 0;if(ei(t))return di(t)?Oee(t):t.length;var e=oo(t);return e==NDe||e==MDe?t.size:wm(t).length}var NDe,MDe,VL,Xee=R(()=>{"use strict";lw();Od();Io();Hw();Pee();NDe="[object Map]",MDe="[object Set]";o(IDe,"size");VL=IDe});function ODe(t,e){var r;return As(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var jee,Kee=R(()=>{"use strict";qh();o(ODe,"baseSome");jee=ODe});function PDe(t,e,r){var n=wt(t)?Sw:jee;return r&&eo(t,e,r)&&(e=void 0),n(t,cn(e,3))}var Nv,Qee=R(()=>{"use strict";vL();Qa();Kee();Bn();Ed();o(PDe,"some");Nv=PDe});var BDe,Tc,Zee=R(()=>{"use strict";Cm();kee();sm();Ed();BDe=pc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&eo(t,e[0],e[1])?e=[]:r>2&&eo(e[0],e[1],e[2])&&(e=[e[0]]),Tee(t,bc(e,1),[])}),Tc=BDe});var FDe,zDe,Jee,ete=R(()=>{"use strict";pL();nL();Lw();FDe=1/0,zDe=Wh&&1/Dm(new Wh([,-0]))[1]==FDe?function(t){return new Wh(t)}:qn,Jee=zDe});function $De(t,e,r){var n=-1,i=ow,a=t.length,s=!0,l=[],u=l;if(r)s=!1,i=zw;else if(a>=GDe){var h=e?null:Jee(t);if(h)return Dm(h);s=!1,i=Lm,u=new _m}else u=e?[]:l;e:for(;++n<a;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,s&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;e&&u.push(d),l.push(f)}else i(u,d,r)||(u!==l&&u.push(d),l.push(f))}return l}var GDe,Om,Kw=R(()=>{"use strict";Cw();sL();AL();Aw();ete();Lw();GDe=200;o($De,"baseUniq");Om=$De});var VDe,UL,tte=R(()=>{"use strict";Cm();sm();Kw();u5();VDe=pc(function(t){return Om(bc(t,1,wd,!0))}),UL=VDe});function UDe(t){return t&&t.length?Om(t):[]}var Pm,rte=R(()=>{"use strict";Kw();o(UDe,"uniq");Pm=UDe});function HDe(t,e){return t&&t.length?Om(t,cn(e,2)):[]}var nte,ite=R(()=>{"use strict";Qa();Kw();o(HDe,"uniqBy");nte=HDe});function WDe(t){var e=++YDe;return uw(t)+e}var YDe,zd,ate=R(()=>{"use strict";oL();YDe=0;o(WDe,"uniqueId");zd=WDe});function qDe(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n<i;){var l=n<a?e[n]:void 0;r(s,t[n],l)}return s}var ste,ote=R(()=>{"use strict";o(qDe,"baseZipObject");ste=qDe});function XDe(t,e){return ste(t||[],e||[],dc)}var Qw,lte=R(()=>{"use strict";am();ote();o(XDe,"zipObject");Qw=XDe});var Pt=R(()=>{"use strict";NQ();gL();PZ();BZ();Y_();CJ();_J();DJ();RJ();NJ();BJ();LL();VJ();HJ();RL();fw();$w();YJ();WJ();qJ();ZJ();Eu();tee();ree();Bn();Ww();Jy();Js();see();Hw();oee();vc();LJ();Mm();lee();cee();X_();BL();uee();nL();kJ();zee();mee();Hee();$L();qee();Xee();Qee();Zee();tte();rte();ate();OL();lte();});function ute(t,e){t[e]?t[e]++:t[e]=1}function hte(t,e){--t[e]||delete t[e]}function Mv(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+cte+a+cte+(er(n)?jDe:n)}function KDe(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var l={v:i,w:a};return n&&(l.name=n),l}function HL(t,e){return Mv(t,e.v,e.w,e.name)}var jDe,Gd,cte,lr,Zw=R(()=>{"use strict";Pt();jDe="\0",Gd="\0",cte="",lr=class{static{o(this,"Graph")}constructor(e={}){this._isDirected=Xe(e,"directed")?e.directed:!0,this._isMultigraph=Xe(e,"multigraph")?e.multigraph:!1,this._isCompound=Xe(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ws(void 0),this._defaultEdgeLabelFn=ws(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Gd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return wi(e)||(e=ws(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Dr(this._nodes)}sources(){var e=this;return $r(this.nodes(),function(r){return Qt(e._in[r])})}sinks(){var e=this;return $r(this.nodes(),function(r){return Qt(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return Ee(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Xe(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Gd,this._children[e]={},this._children[Gd][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Xe(this._nodes,e)}removeNode(e){var r=this;if(Xe(this._nodes,e)){var n=o(function(i){r.removeEdge(r._edgeObjs[i])},"removeEdge");delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Ee(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),Ee(Dr(this._in[e]),n),delete this._in[e],delete this._preds[e],Ee(Dr(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(er(r))r=Gd;else{r+="";for(var n=r;!er(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==Gd)return r}}children(e){if(er(e)&&(e=Gd),this._isCompound){var r=this._children[e];if(r)return Dr(r)}else{if(e===Gd)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Dr(r)}successors(e){var r=this._sucs[e];if(r)return Dr(r)}neighbors(e){var r=this.predecessors(e);if(r)return UL(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Ee(this._nodes,function(s,l){e(l)&&r.setNode(l,s)}),Ee(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var i={};function a(s){var l=n.parent(s);return l===void 0||r.hasNode(l)?(i[s]=l,l):l in i?i[l]:a(l)}return o(a,"findParent"),this._isCompound&&Ee(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(e){return wi(e)||(e=ws(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return or(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Vr(e,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s}),this}setEdge(){var e,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,er(n)||(n=""+n);var l=Mv(this._isDirected,e,r,n);if(Xe(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!er(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(e,r,n);var u=KDe(this._isDirected,e,r,n);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,ute(this._preds[r],e),ute(this._sucs[e],r),this._in[r][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?HL(this._isDirected,arguments[0]):Mv(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?HL(this._isDirected,arguments[0]):Mv(this._isDirected,e,r,n);return Xe(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?HL(this._isDirected,arguments[0]):Mv(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],hte(this._preds[r],e),hte(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=or(n);return r?$r(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=or(n);return r?$r(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};lr.prototype._nodeCount=0;lr.prototype._edgeCount=0;o(ute,"incrementOrInitEntry");o(hte,"decrementOrRemoveEntry");o(Mv,"edgeArgsToId");o(KDe,"edgeArgsToObj");o(HL,"edgeObjToId")});var ya=R(()=>{"use strict";Zw()});function fte(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function QDe(t,e){if(t!=="_next"&&t!=="_prev")return e}var Jw,dte=R(()=>{"use strict";Jw=class{static{o(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return fte(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&fte(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,QDe)),n=n._prev;return"["+e.join(", ")+"]"}};o(fte,"unlink");o(QDe,"filterOutLinks")});function pte(t,e){if(t.nodeCount()<=1)return[];var r=eRe(t,e||ZDe),n=JDe(r.graph,r.buckets,r.zeroIdx);return Gr(qe(n,function(i){return t.outEdges(i.v,i.w)}))}function JDe(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],s;t.nodeCount();){for(;s=a.dequeue();)YL(t,e,r,s);for(;s=i.dequeue();)YL(t,e,r,s);if(t.nodeCount()){for(var l=e.length-2;l>0;--l)if(s=e[l].dequeue(),s){n=n.concat(YL(t,e,r,s,!0));break}}}return n}function YL(t,e,r,n,i){var a=i?[]:void 0;return Ee(t.inEdges(n.v),function(s){var l=t.edge(s),u=t.node(s.v);i&&a.push({v:s.v,w:s.w}),u.out-=l,WL(e,r,u)}),Ee(t.outEdges(n.v),function(s){var l=t.edge(s),u=s.w,h=t.node(u);h.in-=l,WL(e,r,h)}),t.removeNode(n.v),a}function eRe(t,e){var r=new lr,n=0,i=0;Ee(t.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),Ee(t.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=e(l),f=u+h;r.setEdge(l.v,l.w,f),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var a=Go(i+n+3).map(function(){return new Jw}),s=n+1;return Ee(r.nodes(),function(l){WL(a,s,r.node(l))}),{graph:r,buckets:a,zeroIdx:s}}function WL(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var ZDe,mte=R(()=>{"use strict";Pt();ya();dte();ZDe=ws(1);o(pte,"greedyFAS");o(JDe,"doGreedyFAS");o(YL,"removeNode");o(eRe,"buildState");o(WL,"assignBucket")});function gte(t){var e=t.graph().acyclicer==="greedy"?pte(t,r(t)):tRe(t);Ee(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,zd("rev"))});function r(n){return function(i){return n.edge(i).weight}}o(r,"weightFn")}function tRe(t){var e=[],r={},n={};function i(a){Xe(n,a)||(n[a]=!0,r[a]=!0,Ee(t.outEdges(a),function(s){Xe(r,s.w)?e.push(s):i(s.w)}),delete r[a])}return o(i,"dfs"),Ee(t.nodes(),i),e}function yte(t){Ee(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var qL=R(()=>{"use strict";Pt();mte();o(gte,"run");o(tRe,"dfsFAS");o(yte,"undo")});function kc(t,e,r,n){var i;do i=zd(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function xte(t){var e=new lr().setGraph(t.graph());return Ee(t.nodes(),function(r){e.setNode(r,t.node(r))}),Ee(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function eT(t){var e=new lr({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ee(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),Ee(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function XL(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(s=-s),u=s,h=s*a/i),{x:r+u,y:n+h}}function Qh(t){var e=qe(Go(KL(t)+1),function(){return[]});return Ee(t.nodes(),function(r){var n=t.node(r),i=n.rank;er(i)||(e[i][n.order]=r)}),e}function bte(t){var e=Ll(qe(t.nodes(),function(r){return t.node(r).rank}));Ee(t.nodes(),function(r){var n=t.node(r);Xe(n,"rank")&&(n.rank-=e)})}function wte(t){var e=Ll(qe(t.nodes(),function(a){return t.node(a).rank})),r=[];Ee(t.nodes(),function(a){var s=t.node(a).rank-e;r[s]||(r[s]=[]),r[s].push(a)});var n=0,i=t.graph().nodeRankFactor;Ee(r,function(a,s){er(a)&&s%i!==0?--n:n&&Ee(a,function(l){t.node(l).rank+=n})})}function jL(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),kc(t,"border",i,e)}function KL(t){return _s(qe(t.nodes(),function(e){var r=t.node(e).rank;if(!er(r))return r}))}function Tte(t,e){var r={lhs:[],rhs:[]};return Ee(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function kte(t,e){var r=Fw();try{return e()}finally{console.log(t+" time: "+(Fw()-r)+"ms")}}function Ete(t,e){return e()}var Ec=R(()=>{"use strict";Pt();ya();o(kc,"addDummyNode");o(xte,"simplify");o(eT,"asNonCompoundGraph");o(XL,"intersectRect");o(Qh,"buildLayerMatrix");o(bte,"normalizeRanks");o(wte,"removeEmptyRanks");o(jL,"addBorderNode");o(KL,"maxRank");o(Tte,"partition");o(kte,"time");o(Ete,"notime")});function Ste(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&Ee(n,e),Xe(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a<s;++a)Cte(t,"borderLeft","_bl",r,i,a),Cte(t,"borderRight","_br",r,i,a)}}o(e,"dfs"),Ee(t.children(),e)}function Cte(t,e,r,n,i,a){var s={width:0,height:0,rank:a,borderType:e},l=i[e][a-1],u=kc(t,"border",s,r);i[e][a]=u,t.setParent(u,n),l&&t.setEdge(l,u,{weight:1})}var Ate=R(()=>{"use strict";Pt();Ec();o(Ste,"addBorderSegments");o(Cte,"addBorderNode")});function Lte(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Rte(t)}function Dte(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&rRe(t),(e==="lr"||e==="rl")&&(nRe(t),Rte(t))}function Rte(t){Ee(t.nodes(),function(e){_te(t.node(e))}),Ee(t.edges(),function(e){_te(t.edge(e))})}function _te(t){var e=t.width;t.width=t.height,t.height=e}function rRe(t){Ee(t.nodes(),function(e){QL(t.node(e))}),Ee(t.edges(),function(e){var r=t.edge(e);Ee(r.points,QL),Xe(r,"y")&&QL(r)})}function QL(t){t.y=-t.y}function nRe(t){Ee(t.nodes(),function(e){ZL(t.node(e))}),Ee(t.edges(),function(e){var r=t.edge(e);Ee(r.points,ZL),Xe(r,"x")&&ZL(r)})}function ZL(t){var e=t.x;t.x=t.y,t.y=e}var Nte=R(()=>{"use strict";Pt();o(Lte,"adjust");o(Dte,"undo");o(Rte,"swapWidthHeight");o(_te,"swapWidthHeightOne");o(rRe,"reverseY");o(QL,"reverseYOne");o(nRe,"swapXY");o(ZL,"swapXYOne")});function Mte(t){t.graph().dummyChains=[],Ee(t.edges(),function(e){aRe(t,e)})}function aRe(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,l=t.edge(e),u=l.labelRank;if(a!==n+1){t.removeEdge(e);var h,f,d;for(d=0,++n;n<a;++d,++n)l.points=[],f={width:0,height:0,edgeLabel:l,edgeObj:e,rank:n},h=kc(t,"edge",f,"_d"),n===u&&(f.width=l.width,f.height=l.height,f.dummy="edge-label",f.labelpos=l.labelpos),t.setEdge(r,h,{weight:l.weight},s),d===0&&t.graph().dummyChains.push(h),r=h;t.setEdge(r,i,{weight:l.weight},s)}}function Ite(t){Ee(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e)})}var JL=R(()=>{"use strict";Pt();Ec();o(Mte,"run");o(aRe,"normalizeEdge");o(Ite,"undo")});function Iv(t){var e={};function r(n){var i=t.node(n);if(Xe(e,n))return i.rank;e[n]=!0;var a=Ll(qe(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}o(r,"dfs"),Ee(t.sources(),r)}function $d(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var tT=R(()=>{"use strict";Pt();o(Iv,"longestPath");o($d,"slack")});function rT(t){var e=new lr({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;sRe(e,t)<n;)i=oRe(e,t),a=e.hasNode(i.v)?$d(t,i):-$d(t,i),lRe(e,t,a);return e}function sRe(t,e){function r(n){Ee(e.nodeEdges(n),function(i){var a=i.v,s=n===a?i.w:a;!t.hasNode(s)&&!$d(e,i)&&(t.setNode(s,{}),t.setEdge(n,s,{}),r(s))})}return o(r,"dfs"),Ee(t.nodes(),r),t.nodeCount()}function oRe(t,e){return Bd(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return $d(e,r)})}function lRe(t,e,r){Ee(t.nodes(),function(n){e.node(n).rank+=r})}var eD=R(()=>{"use strict";Pt();ya();tT();o(rT,"feasibleTree");o(sRe,"tightTree");o(oRe,"findMinSlackEdge");o(lRe,"shiftRanks")});var Pte=R(()=>{"use strict"});var tD=R(()=>{"use strict"});var tGt,rD=R(()=>{"use strict";Pt();tD();tGt=ws(1)});var Bte=R(()=>{"use strict";rD()});var nD=R(()=>{"use strict"});var Fte=R(()=>{"use strict";nD()});var fGt,zte=R(()=>{"use strict";Pt();fGt=ws(1)});function iD(t){var e={},r={},n=[];function i(a){if(Xe(r,a))throw new Ov;Xe(e,a)||(r[a]=!0,e[a]=!0,Ee(t.predecessors(a),i),delete r[a],n.push(a))}if(o(i,"visit"),Ee(t.sinks(),i),VL(e)!==t.nodeCount())throw new Ov;return n}function Ov(){}var aD=R(()=>{"use strict";Pt();iD.CycleException=Ov;o(iD,"topsort");o(Ov,"CycleException");Ov.prototype=new Error});var Gte=R(()=>{"use strict";aD()});function nT(t,e,r){wt(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return Ee(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);$te(t,s,r==="post",a,n,i)}),i}function $te(t,e,r,n,i,a){Xe(n,e)||(n[e]=!0,r||a.push(e),Ee(i(e),function(s){$te(t,s,r,n,i,a)}),r&&a.push(e))}var sD=R(()=>{"use strict";Pt();o(nT,"dfs");o($te,"doDfs")});function oD(t,e){return nT(t,e,"post")}var Vte=R(()=>{"use strict";sD();o(oD,"postorder")});function lD(t,e){return nT(t,e,"pre")}var Ute=R(()=>{"use strict";sD();o(lD,"preorder")});var Hte=R(()=>{"use strict";tD();Zw()});var Yte=R(()=>{"use strict";Pte();rD();Bte();Fte();zte();Gte();Vte();Ute();Hte();nD();aD()});function Jh(t){t=xte(t),Iv(t);var e=rT(t);uD(e),cD(e,t);for(var r,n;r=jte(e);)n=Kte(e,t,r),Qte(e,t,r,n)}function cD(t,e){var r=oD(t,t.nodes());r=r.slice(0,r.length-1),Ee(r,function(n){dRe(t,e,n)})}function dRe(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=qte(t,e,r)}function qte(t,e,r){var n=t.node(r),i=n.parent,a=!0,s=e.edge(r,i),l=0;return s||(a=!1,s=e.edge(i,r)),l=s.weight,Ee(e.nodeEdges(r),function(u){var h=u.v===r,f=h?u.w:u.v;if(f!==i){var d=h===a,p=e.edge(u).weight;if(l+=d?p:-p,mRe(t,r,f)){var m=t.edge(r,f).cutvalue;l+=d?-m:m}}}),l}function uD(t,e){arguments.length<2&&(e=t.nodes()[0]),Xte(t,{},1,e)}function Xte(t,e,r,n,i){var a=r,s=t.node(n);return e[n]=!0,Ee(t.neighbors(n),function(l){Xe(e,l)||(r=Xte(t,e,r,l,n))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function jte(t){return Za(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Kte(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),s=t.node(i),l=a,u=!1;a.lim>s.lim&&(l=s,u=!0);var h=$r(e.edges(),function(f){return u===Wte(t,t.node(f.v),l)&&u!==Wte(t,t.node(f.w),l)});return Bd(h,function(f){return $d(e,f)})}function Qte(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),uD(t),cD(t,e),pRe(t,e)}function pRe(t,e){var r=Za(t.nodes(),function(i){return!e.node(i).parent}),n=lD(t,r);n=n.slice(1),Ee(n,function(i){var a=t.node(i).parent,s=e.edge(i,a),l=!1;s||(s=e.edge(a,i),l=!0),e.node(i).rank=e.node(a).rank+(l?s.minlen:-s.minlen)})}function mRe(t,e,r){return t.hasEdge(e,r)}function Wte(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var Zte=R(()=>{"use strict";Pt();Yte();Ec();eD();tT();Jh.initLowLimValues=uD;Jh.initCutValues=cD;Jh.calcCutValue=qte;Jh.leaveEdge=jte;Jh.enterEdge=Kte;Jh.exchangeEdges=Qte;o(Jh,"networkSimplex");o(cD,"initCutValues");o(dRe,"assignCutValue");o(qte,"calcCutValue");o(uD,"initLowLimValues");o(Xte,"dfsAssignLowLim");o(jte,"leaveEdge");o(Kte,"enterEdge");o(Qte,"exchangeEdges");o(pRe,"updateRanks");o(mRe,"isTreeEdge");o(Wte,"isDescendant")});function hD(t){switch(t.graph().ranker){case"network-simplex":Jte(t);break;case"tight-tree":yRe(t);break;case"longest-path":gRe(t);break;default:Jte(t)}}function yRe(t){Iv(t),rT(t)}function Jte(t){Jh(t)}var gRe,fD=R(()=>{"use strict";eD();Zte();tT();o(hD,"rank");gRe=Iv;o(yRe,"tightTreeRanker");o(Jte,"networkSimplexRanker")});function ere(t){var e=kc(t,"root",{},"_root"),r=vRe(t),n=_s(or(r))-1,i=2*n+1;t.graph().nestingRoot=e,Ee(t.edges(),function(s){t.edge(s).minlen*=i});var a=xRe(t)+1;Ee(t.children(),function(s){tre(t,e,i,a,n,r,s)}),t.graph().nodeRankFactor=i}function tre(t,e,r,n,i,a,s){var l=t.children(s);if(!l.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var u=jL(t,"_bt"),h=jL(t,"_bb"),f=t.node(s);t.setParent(u,s),f.borderTop=u,t.setParent(h,s),f.borderBottom=h,Ee(l,function(d){tre(t,e,r,n,i,a,d);var p=t.node(d),m=p.borderTop?p.borderTop:d,g=p.borderBottom?p.borderBottom:d,y=p.borderTop?n:2*n,v=m!==g?1:i-a[s]+1;t.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,u,{weight:0,minlen:i+a[s]})}function vRe(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&Ee(a,function(s){r(s,i+1)}),e[n]=i}return o(r,"dfs"),Ee(t.children(),function(n){r(n,1)}),e}function xRe(t){return Vr(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function rre(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Ee(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var nre=R(()=>{"use strict";Pt();Ec();o(ere,"run");o(tre,"dfs");o(vRe,"treeDepths");o(xRe,"sumWeights");o(rre,"cleanup")});function ire(t,e,r){var n={},i;Ee(r,function(a){for(var s=t.parent(a),l,u;s;){if(l=t.parent(s),l?(u=n[l],n[l]=s):(u=i,i=s),u&&u!==s){e.setEdge(u,s);return}s=l}})}var are=R(()=>{"use strict";Pt();o(ire,"addSubgraphConstraints")});function sre(t,e,r){var n=wRe(t),i=new lr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return Ee(t.nodes(),function(a){var s=t.node(a),l=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,l||n),Ee(t[r](a),function(u){var h=u.v===a?u.w:u.v,f=i.edge(h,a),d=er(f)?0:f.weight;i.setEdge(h,a,{weight:t.edge(u).weight+d})}),Xe(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),i}function wRe(t){for(var e;t.hasNode(e=zd("_root")););return e}var ore=R(()=>{"use strict";Pt();ya();o(sre,"buildLayerGraph");o(wRe,"createRootNode")});function lre(t,e){for(var r=0,n=1;n<e.length;++n)r+=TRe(t,e[n-1],e[n]);return r}function TRe(t,e,r){for(var n=Qw(r,qe(r,function(h,f){return f})),i=Gr(qe(e,function(h){return Tc(qe(t.outEdges(h),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var s=2*a-1;a-=1;var l=qe(new Array(s),function(){return 0}),u=0;return Ee(i.forEach(function(h){var f=h.pos+a;l[f]+=h.weight;for(var d=0;f>0;)f%2&&(d+=l[f+1]),f=f-1>>1,l[f]+=h.weight;u+=h.weight*d})),u}var cre=R(()=>{"use strict";Pt();o(lre,"crossCount");o(TRe,"twoLayerCrossCount")});function ure(t){var e={},r=$r(t.nodes(),function(l){return!t.children(l).length}),n=_s(qe(r,function(l){return t.node(l).rank})),i=qe(Go(n+1),function(){return[]});function a(l){if(!Xe(e,l)){e[l]=!0;var u=t.node(l);i[u.rank].push(l),Ee(t.successors(l),a)}}o(a,"dfs");var s=Tc(r,function(l){return t.node(l).rank});return Ee(s,a),i}var hre=R(()=>{"use strict";Pt();o(ure,"initOrder")});function fre(t,e){return qe(e,function(r){var n=t.inEdges(r);if(n.length){var i=Vr(n,function(a,s){var l=t.edge(s),u=t.node(s.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var dre=R(()=>{"use strict";Pt();o(fre,"barycenter")});function pre(t,e){var r={};Ee(t,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};er(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),Ee(e.edges(),function(i){var a=r[i.v],s=r[i.w];!er(a)&&!er(s)&&(s.indegree++,a.out.push(r[i.w]))});var n=$r(r,function(i){return!i.indegree});return kRe(n)}function kRe(t){var e=[];function r(a){return function(s){s.merged||(er(s.barycenter)||er(a.barycenter)||s.barycenter>=a.barycenter)&&ERe(a,s)}}o(r,"handleIn");function n(a){return function(s){s.in.push(a),--s.indegree===0&&t.push(s)}}for(o(n,"handleOut");t.length;){var i=t.pop();e.push(i),Ee(i.in.reverse(),r(i)),Ee(i.out,n(i))}return qe($r(e,function(a){return!a.merged}),function(a){return Fd(a,["vs","i","barycenter","weight"])})}function ERe(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var mre=R(()=>{"use strict";Pt();o(pre,"resolveConflicts");o(kRe,"doResolveConflicts");o(ERe,"mergeEntries")});function yre(t,e){var r=Tte(t,function(f){return Xe(f,"barycenter")}),n=r.lhs,i=Tc(r.rhs,function(f){return-f.i}),a=[],s=0,l=0,u=0;n.sort(CRe(!!e)),u=gre(a,i,u),Ee(n,function(f){u+=f.vs.length,a.push(f.vs),s+=f.barycenter*f.weight,l+=f.weight,u=gre(a,i,u)});var h={vs:Gr(a)};return l&&(h.barycenter=s/l,h.weight=l),h}function gre(t,e,r){for(var n;e.length&&(n=ma(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function CRe(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}var vre=R(()=>{"use strict";Pt();Ec();o(yre,"sort");o(gre,"consumeUnsortable");o(CRe,"compareWithBias")});function dD(t,e,r,n){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};s&&(i=$r(i,function(g){return g!==s&&g!==l}));var h=fre(t,i);Ee(h,function(g){if(t.children(g.v).length){var y=dD(t,g.v,r,n);u[g.v]=y,Xe(y,"barycenter")&&ARe(g,y)}});var f=pre(h,r);SRe(f,u);var d=yre(f,n);if(s&&(d.vs=Gr([s,d.vs,l]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(l)[0]);Xe(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+p.order+m.order)/(d.weight+2),d.weight+=2}return d}function SRe(t,e){Ee(t,function(r){r.vs=Gr(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function ARe(t,e){er(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var xre=R(()=>{"use strict";Pt();dre();mre();vre();o(dD,"sortSubgraph");o(SRe,"expandSubgraphs");o(ARe,"mergeBarycenters")});function Tre(t){var e=KL(t),r=bre(t,Go(1,e+1),"inEdges"),n=bre(t,Go(e-1,-1,-1),"outEdges"),i=ure(t);wre(t,i);for(var a=Number.POSITIVE_INFINITY,s,l=0,u=0;u<4;++l,++u){_Re(l%2?r:n,l%4>=2),i=Qh(t);var h=lre(t,i);h<a&&(u=0,s=yL(i),a=h)}wre(t,s)}function bre(t,e,r){return qe(e,function(n){return sre(t,n,r)})}function _Re(t,e){var r=new lr;Ee(t,function(n){var i=n.graph().root,a=dD(n,i,r,e);Ee(a.vs,function(s,l){n.node(s).order=l}),ire(n,r,a.vs)})}function wre(t,e){Ee(e,function(r){Ee(r,function(n,i){t.node(n).order=i})})}var kre=R(()=>{"use strict";Pt();ya();Ec();are();ore();cre();hre();xre();o(Tre,"order");o(bre,"buildLayerGraphs");o(_Re,"sweepLayerGraphs");o(wre,"assignOrder")});function Ere(t){var e=DRe(t);Ee(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=LRe(t,e,i.v,i.w),s=a.path,l=a.lca,u=0,h=s[u],f=!0;r!==i.w;){if(n=t.node(r),f){for(;(h=s[u])!==l&&t.node(h).maxRank<n.rank;)u++;h===l&&(f=!1)}if(!f){for(;u<s.length-1&&t.node(h=s[u+1]).minRank<=n.rank;)u++;h=s[u]}t.setParent(r,h),r=t.successors(r)[0]}})}function LRe(t,e,r,n){var i=[],a=[],s=Math.min(e[r].low,e[n].low),l=Math.max(e[r].lim,e[n].lim),u,h;u=r;do u=t.parent(u),i.push(u);while(u&&(e[u].low>s||l>e[u].lim));for(h=u,u=n;(u=t.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h}}function DRe(t){var e={},r=0;function n(i){var a=r;Ee(t.children(i),n),e[i]={low:a,lim:r++}}return o(n,"dfs"),Ee(t.children(),n),e}var Cre=R(()=>{"use strict";Pt();o(Ere,"parentDummyChains");o(LRe,"findPath");o(DRe,"postorder")});function RRe(t,e){var r={};function n(i,a){var s=0,l=0,u=i.length,h=ma(a);return Ee(a,function(f,d){var p=MRe(t,f),m=p?t.node(p).order:u;(p||f===h)&&(Ee(a.slice(l,d+1),function(g){Ee(t.predecessors(g),function(y){var v=t.node(y),x=v.order;(x<s||m<x)&&!(v.dummy&&t.node(g).dummy)&&Sre(r,y,g)})}),l=d+1,s=m)}),a}return o(n,"visitLayer"),Vr(e,n),r}function NRe(t,e){var r={};function n(a,s,l,u,h){var f;Ee(Go(s,l),function(d){f=a[d],t.node(f).dummy&&Ee(t.predecessors(f),function(p){var m=t.node(p);m.dummy&&(m.order<u||m.order>h)&&Sre(r,p,f)})})}o(n,"scan");function i(a,s){var l=-1,u,h=0;return Ee(s,function(f,d){if(t.node(f).dummy==="border"){var p=t.predecessors(f);p.length&&(u=t.node(p[0]).order,n(s,h,d,l,u),h=d,l=u)}n(s,h,s.length,u,a.length)}),s}return o(i,"visitLayer"),Vr(e,i),r}function MRe(t,e){if(t.node(e).dummy)return Za(t.predecessors(e),function(r){return t.node(r).dummy})}function Sre(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function IRe(t,e,r){if(e>r){var n=e;e=r,r=n}return Xe(t[e],r)}function ORe(t,e,r,n){var i={},a={},s={};return Ee(e,function(l){Ee(l,function(u,h){i[u]=u,a[u]=u,s[u]=h})}),Ee(e,function(l){var u=-1;Ee(l,function(h){var f=n(h);if(f.length){f=Tc(f,function(y){return s[y]});for(var d=(f.length-1)/2,p=Math.floor(d),m=Math.ceil(d);p<=m;++p){var g=f[p];a[h]===h&&u<s[g]&&!IRe(r,h,g)&&(a[g]=h,a[h]=i[h]=i[g],u=s[g])}}})}),{root:i,align:a}}function PRe(t,e,r,n,i){var a={},s=BRe(t,e,r,i),l=i?"borderLeft":"borderRight";function u(d,p){for(var m=s.nodes(),g=m.pop(),y={};g;)y[g]?d(g):(y[g]=!0,m.push(g),m=m.concat(p(g))),g=m.pop()}o(u,"iterate");function h(d){a[d]=s.inEdges(d).reduce(function(p,m){return Math.max(p,a[m.v]+s.edge(m))},0)}o(h,"pass1");function f(d){var p=s.outEdges(d).reduce(function(g,y){return Math.min(g,a[y.w]-s.edge(y))},Number.POSITIVE_INFINITY),m=t.node(d);p!==Number.POSITIVE_INFINITY&&m.borderType!==l&&(a[d]=Math.max(a[d],p))}return o(f,"pass2"),u(h,s.predecessors.bind(s)),u(f,s.successors.bind(s)),Ee(n,function(d){a[d]=a[r[d]]}),a}function BRe(t,e,r,n){var i=new lr,a=t.graph(),s=$Re(a.nodesep,a.edgesep,n);return Ee(e,function(l){var u;Ee(l,function(h){var f=r[h];if(i.setNode(f),u){var d=r[u],p=i.edge(d,f);i.setEdge(d,f,Math.max(s(t,h,u),p||0))}u=h})}),i}function FRe(t,e){return Bd(or(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return NL(r,function(a,s){var l=VRe(t,s)/2;n=Math.max(a+l,n),i=Math.min(a-l,i)}),n-i})}function zRe(t,e){var r=or(e),n=Ll(r),i=_s(r);Ee(["u","d"],function(a){Ee(["l","r"],function(s){var l=a+s,u=t[l],h;if(u!==e){var f=or(u);h=s==="l"?n-Ll(f):i-_s(f),h&&(t[l]=Pd(u,function(d){return d+h}))}})})}function GRe(t,e){return Pd(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=Tc(qe(t,n));return(i[1]+i[2])/2})}function Are(t){var e=Qh(t),r=Gh(RRe(t,e),NRe(t,e)),n={},i;Ee(["u","d"],function(s){i=s==="u"?e:or(e).reverse(),Ee(["l","r"],function(l){l==="r"&&(i=qe(i,function(d){return or(d).reverse()}));var u=(s==="u"?t.predecessors:t.successors).bind(t),h=ORe(t,i,r,u),f=PRe(t,i,h.root,h.align,l==="r");l==="r"&&(f=Pd(f,function(d){return-d})),n[s+l]=f})});var a=FRe(t,n);return zRe(n,a),GRe(n,t.graph().align)}function $Re(t,e,r){return function(n,i,a){var s=n.node(i),l=n.node(a),u=0,h;if(u+=s.width/2,Xe(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":h=-s.width/2;break;case"r":h=s.width/2;break}if(h&&(u+=r?h:-h),h=0,u+=(s.dummy?e:t)/2,u+=(l.dummy?e:t)/2,u+=l.width/2,Xe(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":h=l.width/2;break;case"r":h=-l.width/2;break}return h&&(u+=r?h:-h),h=0,u}}function VRe(t,e){return t.node(e).width}var _re=R(()=>{"use strict";Pt();ya();Ec();o(RRe,"findType1Conflicts");o(NRe,"findType2Conflicts");o(MRe,"findOtherInnerSegmentNode");o(Sre,"addConflict");o(IRe,"hasConflict");o(ORe,"verticalAlignment");o(PRe,"horizontalCompaction");o(BRe,"buildBlockGraph");o(FRe,"findSmallestWidthAlignment");o(zRe,"alignCoordinates");o(GRe,"balance");o(Are,"positionX");o($Re,"sep");o(VRe,"width")});function Lre(t){t=eT(t),URe(t),ML(Are(t),function(e,r){t.node(r).x=e})}function URe(t){var e=Qh(t),r=t.graph().ranksep,n=0;Ee(e,function(i){var a=_s(qe(i,function(s){return t.node(s).height}));Ee(i,function(s){t.node(s).y=n+a/2}),n+=a+r})}var Dre=R(()=>{"use strict";Pt();Ec();_re();o(Lre,"position");o(URe,"positionY")});function lo(t,e){var r=e&&e.debugTiming?kte:Ete;r("layout",function(){var n=r(" buildLayoutGraph",function(){return eNe(t)});r(" runLayout",function(){HRe(n,r)}),r(" updateInputGraph",function(){YRe(t,n)})})}function HRe(t,e){e(" makeSpaceForEdgeLabels",function(){tNe(t)}),e(" removeSelfEdges",function(){uNe(t)}),e(" acyclic",function(){gte(t)}),e(" nestingGraph.run",function(){ere(t)}),e(" rank",function(){hD(eT(t))}),e(" injectEdgeLabelProxies",function(){rNe(t)}),e(" removeEmptyRanks",function(){wte(t)}),e(" nestingGraph.cleanup",function(){rre(t)}),e(" normalizeRanks",function(){bte(t)}),e(" assignRankMinMax",function(){nNe(t)}),e(" removeEdgeLabelProxies",function(){iNe(t)}),e(" normalize.run",function(){Mte(t)}),e(" parentDummyChains",function(){Ere(t)}),e(" addBorderSegments",function(){Ste(t)}),e(" order",function(){Tre(t)}),e(" insertSelfEdges",function(){hNe(t)}),e(" adjustCoordinateSystem",function(){Lte(t)}),e(" position",function(){Lre(t)}),e(" positionSelfEdges",function(){fNe(t)}),e(" removeBorderNodes",function(){cNe(t)}),e(" normalize.undo",function(){Ite(t)}),e(" fixupEdgeLabelCoords",function(){oNe(t)}),e(" undoCoordinateSystem",function(){Dte(t)}),e(" translateGraph",function(){aNe(t)}),e(" assignNodeIntersects",function(){sNe(t)}),e(" reversePoints",function(){lNe(t)}),e(" acyclic.undo",function(){yte(t)})}function YRe(t,e){Ee(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),Ee(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Xe(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function eNe(t){var e=new lr({multigraph:!0,compound:!0}),r=mD(t.graph());return e.setGraph(Gh({},qRe,pD(r,WRe),Fd(r,XRe))),Ee(t.nodes(),function(n){var i=mD(t.node(n));e.setNode(n,Xh(pD(i,jRe),KRe)),e.setParent(n,t.parent(n))}),Ee(t.edges(),function(n){var i=mD(t.edge(n));e.setEdge(n,Gh({},ZRe,pD(i,QRe),Fd(i,JRe)))}),e}function tNe(t){var e=t.graph();e.ranksep/=2,Ee(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function rNe(t){Ee(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};kc(t,"edge-proxy",a,"_ep")}})}function nNe(t){var e=0;Ee(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=_s(e,n.maxRank))}),t.graph().maxRank=e}function iNe(t){Ee(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function aNe(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,l=a.marginy||0;function u(h){var f=h.x,d=h.y,p=h.width,m=h.height;e=Math.min(e,f-p/2),r=Math.max(r,f+p/2),n=Math.min(n,d-m/2),i=Math.max(i,d+m/2)}o(u,"getExtremes"),Ee(t.nodes(),function(h){u(t.node(h))}),Ee(t.edges(),function(h){var f=t.edge(h);Xe(f,"x")&&u(f)}),e-=s,n-=l,Ee(t.nodes(),function(h){var f=t.node(h);f.x-=e,f.y-=n}),Ee(t.edges(),function(h){var f=t.edge(h);Ee(f.points,function(d){d.x-=e,d.y-=n}),Xe(f,"x")&&(f.x-=e),Xe(f,"y")&&(f.y-=n)}),a.width=r-e+s,a.height=i-n+l}function sNe(t){Ee(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(XL(n,a)),r.points.push(XL(i,s))})}function oNe(t){Ee(t.edges(),function(e){var r=t.edge(e);if(Xe(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function lNe(t){Ee(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function cNe(t){Ee(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(ma(r.borderLeft)),s=t.node(ma(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),Ee(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function uNe(t){Ee(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function hNe(t){var e=Qh(t);Ee(e,function(r){var n=0;Ee(r,function(i,a){var s=t.node(i);s.order=a+n,Ee(s.selfEdges,function(l){kc(t,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:a+ ++n,e:l.e,label:l.label},"_se")}),delete s.selfEdges})})}function fNe(t){Ee(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,l=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-l},{x:i+5*s/6,y:a-l},{x:i+s,y:a},{x:i+5*s/6,y:a+l},{x:i+2*s/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function pD(t,e){return Pd(Fd(t,e),Number)}function mD(t){var e={};return Ee(t,function(r,n){e[n.toLowerCase()]=r}),e}var WRe,qRe,XRe,jRe,KRe,QRe,ZRe,JRe,Rre=R(()=>{"use strict";Pt();ya();Ate();Nte();qL();JL();fD();nre();kre();Cre();Dre();Ec();o(lo,"layout");o(HRe,"runLayout");o(YRe,"updateInputGraph");WRe=["nodesep","edgesep","ranksep","marginx","marginy"],qRe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},XRe=["acyclicer","ranker","rankdir","align"],jRe=["width","height"],KRe={width:0,height:0},QRe=["minlen","weight","width","height","labeloffset"],ZRe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},JRe=["labelpos"];o(eNe,"buildLayoutGraph");o(tNe,"makeSpaceForEdgeLabels");o(rNe,"injectEdgeLabelProxies");o(nNe,"assignRankMinMax");o(iNe,"removeEdgeLabelProxies");o(aNe,"translateGraph");o(sNe,"assignNodeIntersects");o(oNe,"fixupEdgeLabelCoords");o(lNe,"reversePointsForReversedEdges");o(cNe,"removeBorderNodes");o(uNe,"removeSelfEdges");o(hNe,"insertSelfEdges");o(fNe,"positionSelfEdges");o(pD,"selectNumberAttrs");o(mD,"canonicalize")});var Vd=R(()=>{"use strict";qL();Rre();JL();fD()});function zn(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:dNe(t),edges:pNe(t)};return er(t.graph())||(e.value=Qr(t.graph())),e}function dNe(t){return qe(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return er(r)||(i.value=r),er(n)||(i.parent=n),i})}function pNe(t){return qe(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return er(e.name)||(n.name=e.name),er(r)||(n.value=r),n})}var Pv=R(()=>{"use strict";Pt();Zw();o(zn,"write");o(dNe,"writeNodes");o(pNe,"writeEdges")});var cr,Ud,Mre,Ire,aT,mNe,Ore,Pre,gNe,Bm,Nre,Bre,Fre,zre,Gre,$re=R(()=>{"use strict";ut();ya();Pv();cr=new Map,Ud=new Map,Mre=new Map,Ire=o(()=>{Ud.clear(),Mre.clear(),cr.clear()},"clear"),aT=o((t,e)=>{let r=Ud.get(e)||[];return V.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),mNe=o((t,e)=>{let r=Ud.get(e)||[];return V.info("Descendants of ",e," is ",r),V.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||aT(t.v,e)||aT(t.w,e)||r.includes(t.w):(V.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),Ore=o((t,e,r,n)=>{V.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),V.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)Ore(a,e,r,n);else{let s=e.node(a);V.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(V.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(V.debug("Setting parent",a,t),r.setParent(a,t)):(V.info("In copy ",t,"root",n,"data",e.node(t),n),V.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);V.debug("Copying Edges",l),l.forEach(u=>{V.info("Edge",u);let h=e.edge(u.v,u.w,u.name);V.info("Edge data",h,n);try{mNe(u,n)?(V.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),V.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):V.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(f){V.error(f)}})}V.debug("Removing node",a),e.removeNode(a)})},"copy"),Pre=o((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)Mre.set(i,t),n=[...n,...Pre(i,e)];return n},"extractDescendants"),gNe=o((t,e,r)=>{let n=t.edges().filter(u=>u.v===e||u.w===e),i=t.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===e?r:u.v,w:u.w===e?e:u.w})),s=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>s.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),Bm=o((t,e,r)=>{let n=e.children(t);if(V.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=Bm(a,e,r),l=gNe(e,r,s);if(s)if(l.length>0)i=s;else return s}return i},"findNonClusterChild"),Nre=o(t=>!cr.has(t)||!cr.get(t).externalConnections?t:cr.has(t)?cr.get(t).id:t,"getAnchorId"),Bre=o((t,e)=>{if(!t||e>10){V.debug("Opting out, no graph ");return}else V.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(V.warn("Cluster identified",r," Replacement id in edges: ",Bm(r,t,r)),Ud.set(r,Pre(r,t)),cr.set(r,{id:Bm(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(V.debug("Cluster identified",r,Ud),i.forEach(a=>{let s=aT(a.v,r),l=aT(a.w,r);s^l&&(V.warn("Edge: ",a," leaves cluster ",r),V.warn("Descendants of XXX ",r,": ",Ud.get(r)),cr.get(r).externalConnections=!0)})):V.debug("Not a cluster ",r,Ud)});for(let r of cr.keys()){let n=cr.get(r).id,i=t.parent(n);i!==r&&cr.has(i)&&!cr.get(i).externalConnections&&(cr.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(V.warn("Fix XXX",cr,"ids:",r.v,r.w,"Translating: ",cr.get(r.v)," --- ",cr.get(r.w)),cr.get(r.v)||cr.get(r.w)){if(V.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Nre(r.v),a=Nre(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);cr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);cr.get(s).externalConnections=!0,n.toCluster=r.w}V.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),V.warn("Adjusted Graph",zn(t)),Fre(t,0),V.trace(cr)},"adjustClustersAndEdges"),Fre=o((t,e)=>{if(V.warn("extractor - ",e,zn(t),t.children("D")),e>10){V.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){V.debug("Done, no node has children",t.nodes());return}V.debug("Nodes = ",r,e);for(let i of r)if(V.debug("Extracting node",i,cr,cr.has(i)&&!cr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!cr.has(i))V.debug("Not a cluster",i,e);else if(!cr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){V.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";cr.get(i)?.clusterData?.dir&&(s=cr.get(i).clusterData.dir,V.warn("Fixing dir",cr.get(i).clusterData.dir,s));let l=new lr({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});V.warn("Old graph before copy",zn(t)),Ore(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:cr.get(i).clusterData,label:cr.get(i).label,graph:l}),V.warn("New graph after copy node: (",i,")",zn(l)),V.debug("Old graph after copy",zn(t))}else V.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!cr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),V.debug(cr);r=t.nodes(),V.warn("New list of nodes",r);for(let i of r){let a=t.node(i);V.warn(" Now next level",i,a),a?.clusterNode&&Fre(a.graph,e+1)}},"extractor"),zre=o((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=zre(t,i);r=[...r,...a]}),r},"sorter"),Gre=o(t=>zre(t,t.children()),"sortNodesByHierarchy")});var Ure={};hr(Ure,{render:()=>yNe});var Vre,yNe,Hre=R(()=>{"use strict";Vd();Pv();ya();Q9();ri();$re();tL();X9();K9();ut();_d();_t();Vre=o(async(t,e,r,n,i,a)=>{V.warn("Graph in recursive render:XAX",zn(e),i);let s=e.graph().rankdir;V.trace("Dir in recursive render - dir:",s);let l=t.insert("g").attr("class","root");e.nodes()?V.info("Recursive render XXX",e.nodes()):V.info("No nodes found for",e),e.edges().length>0&&V.info("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));V.trace(`Setting data for parent cluster XXX
409 Parent cluster`,i.height),e.setNode(i.id,x),e.parent(y)||(V.trace("Setting parent",y,i.id),e.setParent(y,i.id,x))}if(V.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){V.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:x,nodesep:b}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let w=await Vre(d,v.graph,r,n,e.node(y),a),S=w.elem;ar(v,S),v.diff=w.diff||0,V.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),lQ(S,v)}else e.children(y).length>0?(V.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),V.trace(Bm(v.id,e)),cr.set(v.id,{id:Bm(v.id,e),node:v})):(V.trace("Node - the non recursive path XAX",y,d,e.node(y),s),await rw(d,e.node(y),s))})),await o(async()=>{let y=e.edges().map(async function(v){let x=e.edge(v.v,v.w,v.name);V.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),V.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),V.info("Fix",cr,"ids:",v.v,v.w,"Translating: ",cr.get(v.v),cr.get(v.w)),await Q5(f,x)});await Promise.all(y)},"processEdges")(),V.info("Graph before layout:",JSON.stringify(zn(e))),V.info("############################################# XXX"),V.info("### Layout ### XXX"),V.info("############################################# XXX"),lo(e),V.info("Graph after layout:",JSON.stringify(zn(e)));let m=0,{subGraphTitleTotalMargin:g}=io(a);return await Promise.all(Gre(e).map(async function(y){let v=e.node(y);if(V.info("Position XBX => "+y+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=g,V.info("A tainted cluster node XBX1",y,v.id,v.width,v.height,v.x,v.y,e.parent(y)),cr.get(v.id).node=v,eL(v);else if(e.children(y).length>0){V.info("A pure cluster node XBX1",y,v.id,v.x,v.y,v.width,v.height,e.parent(y)),v.height+=g,e.node(v.parentId);let x=v?.padding/2||0,b=v?.labelBBox?.height||0,w=b-x||0;V.debug("OffsetY",w,"labelHeight",b,"halfPadding",x),await Y5(u,v),cr.get(v.id).node=v}else{let x=e.node(v.parentId);v.y+=g/2,V.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",x,x?.offsetY,v),eL(v)}})),e.edges().forEach(function(y){let v=e.edge(y);V.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(v),v),v.points.forEach(S=>S.y+=g/2);let x=e.node(y.v);var b=e.node(y.w);let w=J5(h,v,cr,r,x,b,n);Z5(v,w)}),e.nodes().forEach(function(y){let v=e.node(y);V.info(y,v.type,v.diff),v.isGroup&&(m=v.diff)}),V.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m}},"recursiveRender"),yNe=o(async(t,e)=>{let r=new lr({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");ew(n,t.markers,t.type,t.diagramId),cQ(),lK(),rK(),Ire(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),V.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,l=s+"---"+s+"---1",u=s+"---"+s+"---2",h=r.node(s);r.setNode(l,{domId:l,id:l,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(l,h.parentId),r.setNode(u,{domId:u,id:u,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(u,h.parentId);let f=structuredClone(a),d=structuredClone(a),p=structuredClone(a);f.label="",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-1",d.arrowTypeEnd="none",d.id=s+"-cyclic-special-mid",p.label="",h.isGroup&&(f.fromCluster=s,p.toCluster=s),p.id=s+"-cyclic-special-2",r.setEdge(s,l,f,s+"-cyclic-special-0"),r.setEdge(l,u,d,s+"-cyclic-special-1"),r.setEdge(u,s,p,s+"-cyc<lic-special-2")}else r.setEdge(a.start,a.end,{...a},a.id)}),V.warn("Graph at first:",JSON.stringify(zn(r))),Bre(r),V.warn("Graph after XAX:",JSON.stringify(zn(r)));let i=de();await Vre(n,r,t.type,t.diagramId,void 0,i)},"render")});var Bv,gD,vNe,sT,Yre,oT=R(()=>{"use strict";hQ();ut();Bv={},gD=o(t=>{for(let e of t)Bv[e.name]=e},"registerLayoutLoaders"),vNe=o(()=>{gD([{name:"dagre",loader:o(async()=>await Promise.resolve().then(()=>(Hre(),Ure)),"loader")}])},"registerDefaultLayoutLoaders");vNe();sT=o(async(t,e)=>{if(!(t.layoutAlgorithm in Bv))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=Bv[t.layoutAlgorithm];return(await r.loader()).render(t,e,uQ,{algorithm:r.algorithm})},"render"),Yre=o((t="",{fallback:e="dagre"}={})=>{if(t in Bv)return t;if(e in Bv)return V.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")});var lT,xNe,bNe,yD=R(()=>{"use strict";Yn();ut();lT=o((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:s,y:l}=xNe(t,e);Sr(t,a,i,n);let u=bNe(s,l,i,a,e);t.attr("viewBox",u),V.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),xNe=o((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),bNe=o((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var wNe,TNe,Wre,qre=R(()=>{"use strict";Zt();_t();ut();L9();oT();yD();xr();f9();wNe=o(function(t,e){return e.db.getClasses()},"getClasses"),TNe=o(async function(t,e,r,n){V.info("REF0:"),V.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=de(),l;i==="sandbox"&&(l=$e("#i"+e));let u=i==="sandbox"?l.nodes()[0].contentDocument:document;V.debug("Before getData: ");let h=n.db.getData();V.debug("Data: ",h);let f=I5(e,i),d=h9();h.type=n.type,h.layoutAlgorithm=Yre(s),h.layoutAlgorithm==="dagre"&&s==="elk"&&V.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=e,V.debug("REF1:",h),await sT(h,f);let p=h.config.flowchart?.diagramPadding??8;Lt.insertTitle(f,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),lT(f,p,"flowchart",a?.useMaxWidth||!1);for(let m of h.nodes){let g=$e(`#${e} [id="${m.id}"]`);if(!g||!m.link)continue;let y=u.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",m.cssClasses),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):m.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",m.linkTarget);let v=g.insert(function(){return y},":first-child"),x=g.select(".label-container");x&&v.append(function(){return x.node()});let b=g.select(".label");b&&v.append(function(){return b.node()})}},"draw"),Wre={getClasses:wNe,draw:TNe}});var vD,Xre,jre=R(()=>{"use strict";vD=function(){var t=o(function(qi,ht,At,$t){for(At=At||{},$t=qi.length;$t--;At[qi[$t]]=ht);return At},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],a=[2,2],s=[1,13],l=[1,14],u=[1,15],h=[1,16],f=[1,23],d=[1,25],p=[1,26],m=[1,27],g=[1,49],y=[1,48],v=[1,29],x=[1,30],b=[1,31],w=[1,32],S=[1,33],T=[1,44],E=[1,46],_=[1,42],A=[1,47],L=[1,43],M=[1,50],N=[1,45],k=[1,51],I=[1,52],C=[1,34],O=[1,35],D=[1,36],P=[1,37],F=[1,57],B=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],$=[1,61],z=[1,60],Y=[1,62],Q=[8,9,11,73,75],X=[1,88],ie=[1,93],j=[1,92],J=[1,89],Z=[1,85],H=[1,91],q=[1,87],K=[1,94],se=[1,90],ce=[1,95],ue=[1,86],te=[8,9,10,11,73,75],De=[8,9,10,11,44,73,75],oe=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],ke=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],Ie=[42,58,86,99,102,103,106,108,111,112,113],Se=[1,121],Ue=[1,120],Pe=[1,128],_e=[1,142],me=[1,143],W=[1,144],fe=[1,145],ge=[1,130],re=[1,132],he=[1,136],ne=[1,137],ae=[1,138],we=[1,139],Te=[1,140],Ce=[1,141],Ae=[1,146],Ge=[1,147],Me=[1,126],ye=[1,127],He=[1,134],ze=[1,129],Ze=[1,133],gt=[1,131],yt=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],tt=[1,149],Ye=[8,9,11],Je=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],Ve=[1,169],je=[1,165],kt=[1,166],at=[1,170],xt=[1,167],it=[1,168],dt=[75,113,116],lt=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],It=[10,103],mt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],St=[1,235],gr=[1,233],xn=[1,237],jt=[1,231],rn=[1,232],Er=[1,234],Kn=[1,236],hn=[1,238],Qn=[1,255],on=[8,9,11,103],Rn=[8,9,10,11,58,81,102,103,106,107,108,109],Ha={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:o(function(ht,At,$t,rt,Ot,pe,ur){var be=pe.length-1;switch(Ot){case 2:this.$=[];break;case 3:(!Array.isArray(pe[be])||pe[be].length>0)&&pe[be-1].push(pe[be]),this.$=pe[be-1];break;case 4:case 176:this.$=pe[be];break;case 11:rt.setDirection("TB"),this.$="TB";break;case 12:rt.setDirection(pe[be-1]),this.$=pe[be-1];break;case 27:this.$=pe[be-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=rt.addSubGraph(pe[be-6],pe[be-1],pe[be-4]);break;case 34:this.$=rt.addSubGraph(pe[be-3],pe[be-1],pe[be-3]);break;case 35:this.$=rt.addSubGraph(void 0,pe[be-1],void 0);break;case 37:this.$=pe[be].trim(),rt.setAccTitle(this.$);break;case 38:case 39:this.$=pe[be].trim(),rt.setAccDescription(this.$);break;case 43:rt.addLink(pe[be-2].stmt,pe[be],pe[be-1]),this.$={stmt:pe[be],nodes:pe[be].concat(pe[be-2].nodes)};break;case 44:rt.addLink(pe[be-3].stmt,pe[be-1],pe[be-2]),this.$={stmt:pe[be-1],nodes:pe[be-1].concat(pe[be-3].nodes)};break;case 45:this.$={stmt:pe[be-1],nodes:pe[be-1]};break;case 46:this.$={stmt:pe[be],nodes:pe[be]};break;case 47:this.$=[pe[be]];break;case 48:this.$=pe[be-4].concat(pe[be]);break;case 49:this.$=pe[be];break;case 50:this.$=pe[be-2],rt.setClass(pe[be-2],pe[be]);break;case 51:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"square");break;case 52:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"doublecircle");break;case 53:this.$=pe[be-5],rt.addVertex(pe[be-5],pe[be-2],"circle");break;case 54:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"ellipse");break;case 55:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"stadium");break;case 56:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"subroutine");break;case 57:this.$=pe[be-7],rt.addVertex(pe[be-7],pe[be-1],"rect",void 0,void 0,void 0,Object.fromEntries([[pe[be-5],pe[be-3]]]));break;case 58:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"cylinder");break;case 59:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"round");break;case 60:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"diamond");break;case 61:this.$=pe[be-5],rt.addVertex(pe[be-5],pe[be-2],"hexagon");break;case 62:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"odd");break;case 63:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"trapezoid");break;case 64:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"inv_trapezoid");break;case 65:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"lean_right");break;case 66:this.$=pe[be-3],rt.addVertex(pe[be-3],pe[be-1],"lean_left");break;case 67:this.$=pe[be],rt.addVertex(pe[be]);break;case 68:pe[be-1].text=pe[be],this.$=pe[be-1];break;case 69:case 70:pe[be-2].text=pe[be-1],this.$=pe[be-2];break;case 71:this.$=pe[be];break;case 72:var Ir=rt.destructLink(pe[be],pe[be-2]);this.$={type:Ir.type,stroke:Ir.stroke,length:Ir.length,text:pe[be-1]};break;case 73:this.$={text:pe[be],type:"text"};break;case 74:this.$={text:pe[be-1].text+""+pe[be],type:pe[be-1].type};break;case 75:this.$={text:pe[be],type:"string"};break;case 76:this.$={text:pe[be],type:"markdown"};break;case 77:var Ir=rt.destructLink(pe[be]);this.$={type:Ir.type,stroke:Ir.stroke,length:Ir.length};break;case 78:this.$=pe[be-1];break;case 79:this.$={text:pe[be],type:"text"};break;case 80:this.$={text:pe[be-1].text+""+pe[be],type:pe[be-1].type};break;case 81:this.$={text:pe[be],type:"string"};break;case 82:case 97:this.$={text:pe[be],type:"markdown"};break;case 94:this.$={text:pe[be],type:"text"};break;case 95:this.$={text:pe[be-1].text+""+pe[be],type:pe[be-1].type};break;case 96:this.$={text:pe[be],type:"text"};break;case 98:this.$=pe[be-4],rt.addClass(pe[be-2],pe[be]);break;case 99:this.$=pe[be-4],rt.setClass(pe[be-2],pe[be]);break;case 100:case 108:this.$=pe[be-1],rt.setClickEvent(pe[be-1],pe[be]);break;case 101:case 109:this.$=pe[be-3],rt.setClickEvent(pe[be-3],pe[be-2]),rt.setTooltip(pe[be-3],pe[be]);break;case 102:this.$=pe[be-2],rt.setClickEvent(pe[be-2],pe[be-1],pe[be]);break;case 103:this.$=pe[be-4],rt.setClickEvent(pe[be-4],pe[be-3],pe[be-2]),rt.setTooltip(pe[be-4],pe[be]);break;case 104:this.$=pe[be-2],rt.setLink(pe[be-2],pe[be]);break;case 105:this.$=pe[be-4],rt.setLink(pe[be-4],pe[be-2]),rt.setTooltip(pe[be-4],pe[be]);break;case 106:this.$=pe[be-4],rt.setLink(pe[be-4],pe[be-2],pe[be]);break;case 107:this.$=pe[be-6],rt.setLink(pe[be-6],pe[be-4],pe[be]),rt.setTooltip(pe[be-6],pe[be-2]);break;case 110:this.$=pe[be-1],rt.setLink(pe[be-1],pe[be]);break;case 111:this.$=pe[be-3],rt.setLink(pe[be-3],pe[be-2]),rt.setTooltip(pe[be-3],pe[be]);break;case 112:this.$=pe[be-3],rt.setLink(pe[be-3],pe[be-2],pe[be]);break;case 113:this.$=pe[be-5],rt.setLink(pe[be-5],pe[be-4],pe[be]),rt.setTooltip(pe[be-5],pe[be-2]);break;case 114:this.$=pe[be-4],rt.addVertex(pe[be-2],void 0,void 0,pe[be]);break;case 115:this.$=pe[be-4],rt.updateLink([pe[be-2]],pe[be]);break;case 116:this.$=pe[be-4],rt.updateLink(pe[be-2],pe[be]);break;case 117:this.$=pe[be-8],rt.updateLinkInterpolate([pe[be-6]],pe[be-2]),rt.updateLink([pe[be-6]],pe[be]);break;case 118:this.$=pe[be-8],rt.updateLinkInterpolate(pe[be-6],pe[be-2]),rt.updateLink(pe[be-6],pe[be]);break;case 119:this.$=pe[be-6],rt.updateLinkInterpolate([pe[be-4]],pe[be]);break;case 120:this.$=pe[be-6],rt.updateLinkInterpolate(pe[be-4],pe[be]);break;case 121:case 123:this.$=[pe[be]];break;case 122:case 124:pe[be-2].push(pe[be]),this.$=pe[be-2];break;case 126:this.$=pe[be-1]+pe[be];break;case 174:this.$=pe[be];break;case 175:this.$=pe[be-1]+""+pe[be];break;case 177:this.$=pe[be-1]+""+pe[be];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:w,85:S,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I,118:C,119:O,120:D,121:P},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:F,15:53,18:56},t(B,[2,3]),t(B,[2,4]),t(B,[2,5]),t(B,[2,6]),t(B,[2,7]),t(B,[2,8]),{8:$,9:z,11:Y,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:$,9:z,11:Y,21:66},{8:$,9:z,11:Y,21:67},{8:$,9:z,11:Y,21:68},{8:$,9:z,11:Y,21:69},{8:$,9:z,11:Y,21:70},{8:$,9:z,10:[1,71],11:Y,21:72},t(B,[2,36]),{35:[1,73]},{37:[1,74]},t(B,[2,39]),t(Q,[2,46],{18:75,10:F}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:X,42:ie,58:j,77:[1,83],86:J,92:[1,80],94:[1,81],98:82,102:Z,103:H,106:q,108:K,111:se,112:ce,113:ue,117:84},t(B,[2,178]),t(B,[2,179]),t(B,[2,180]),t(B,[2,181]),t(te,[2,47]),t(te,[2,49],{44:[1,96]}),t(De,[2,67],{110:109,29:[1,97],42:g,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:y,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:T,99:E,102:_,103:A,106:L,108:M,111:N,112:k,113:I}),t(oe,[2,174]),t(oe,[2,135]),t(oe,[2,136]),t(oe,[2,137]),t(oe,[2,138]),t(oe,[2,139]),t(oe,[2,140]),t(oe,[2,141]),t(oe,[2,142]),t(oe,[2,143]),t(oe,[2,144]),t(oe,[2,145]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,110]},t(ke,[2,26],{18:111,10:F}),t(B,[2,27]),{40:112,41:38,42:g,43:39,45:40,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},t(B,[2,40]),t(B,[2,41]),t(B,[2,42]),t(Ie,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:Se,116:Ue},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(B,[2,28]),t(B,[2,29]),t(B,[2,30]),t(B,[2,31]),t(B,[2,32]),{10:Pe,12:_e,14:me,27:W,28:122,32:fe,42:ge,58:re,73:he,77:[1,124],78:[1,125],80:135,81:ne,82:ae,83:we,84:Te,85:Ce,86:Ae,87:Ge,88:123,102:Me,106:ye,108:He,111:ze,112:Ze,113:gt},t(yt,a,{5:148}),t(B,[2,37]),t(B,[2,38]),t(Q,[2,45],{42:tt}),{42:g,45:150,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},{99:[1,151],100:152,102:[1,153]},{42:g,45:154,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},{42:g,45:155,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},t(Ye,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(Ye,[2,108],{117:160,10:[1,159],14:X,42:ie,58:j,86:J,102:Z,103:H,106:q,108:K,111:se,112:ce,113:ue}),t(Ye,[2,110],{10:[1,161]}),t(Je,[2,176]),t(Je,[2,163]),t(Je,[2,164]),t(Je,[2,165]),t(Je,[2,166]),t(Je,[2,167]),t(Je,[2,168]),t(Je,[2,169]),t(Je,[2,170]),t(Je,[2,171]),t(Je,[2,172]),t(Je,[2,173]),{42:g,45:162,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},{30:163,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:171,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:173,48:[1,172],65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:174,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:175,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:176,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{106:[1,177]},{30:178,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:179,63:[1,180],65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:181,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:182,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{30:183,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},t(oe,[2,175]),t(i,[2,20]),t(ke,[2,25]),t(Q,[2,43],{18:184,10:F}),t(Ie,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{75:[1,188],76:189,113:Se,116:Ue},t(dt,[2,73]),t(dt,[2,75]),t(dt,[2,76]),t(dt,[2,161]),t(dt,[2,162]),{8:$,9:z,10:Pe,11:Y,12:_e,14:me,21:191,27:W,29:[1,190],32:fe,42:ge,58:re,73:he,80:135,81:ne,82:ae,83:we,84:Te,85:Ce,86:Ae,87:Ge,88:192,102:Me,106:ye,108:He,111:ze,112:Ze,113:gt},t(lt,[2,94]),t(lt,[2,96]),t(lt,[2,97]),t(lt,[2,150]),t(lt,[2,151]),t(lt,[2,152]),t(lt,[2,153]),t(lt,[2,154]),t(lt,[2,155]),t(lt,[2,156]),t(lt,[2,157]),t(lt,[2,158]),t(lt,[2,159]),t(lt,[2,160]),t(lt,[2,83]),t(lt,[2,84]),t(lt,[2,85]),t(lt,[2,86]),t(lt,[2,87]),t(lt,[2,88]),t(lt,[2,89]),t(lt,[2,90]),t(lt,[2,91]),t(lt,[2,92]),t(lt,[2,93]),{6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,193],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:w,85:S,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I,118:C,119:O,120:D,121:P},{10:F,18:194},{10:[1,195],42:g,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:109,111:N,112:k,113:I},{10:[1,196]},{10:[1,197],103:[1,198]},t(It,[2,121]),{10:[1,199],42:g,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:109,111:N,112:k,113:I},{10:[1,200],42:g,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:109,111:N,112:k,113:I},{77:[1,201]},t(Ye,[2,102],{10:[1,202]}),t(Ye,[2,104],{10:[1,203]}),{77:[1,204]},t(Je,[2,177]),{77:[1,205],95:[1,206]},t(te,[2,50],{110:109,42:g,58:y,86:T,99:E,102:_,103:A,106:L,108:M,111:N,112:k,113:I}),{31:[1,207],65:Ve,79:208,113:at,114:xt,115:it},t(mt,[2,79]),t(mt,[2,81]),t(mt,[2,82]),t(mt,[2,146]),t(mt,[2,147]),t(mt,[2,148]),t(mt,[2,149]),{47:[1,209],65:Ve,79:208,113:at,114:xt,115:it},{30:210,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{49:[1,211],65:Ve,79:208,113:at,114:xt,115:it},{51:[1,212],65:Ve,79:208,113:at,114:xt,115:it},{53:[1,213],65:Ve,79:208,113:at,114:xt,115:it},{55:[1,214],65:Ve,79:208,113:at,114:xt,115:it},{58:[1,215]},{62:[1,216],65:Ve,79:208,113:at,114:xt,115:it},{64:[1,217],65:Ve,79:208,113:at,114:xt,115:it},{30:218,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},{31:[1,219],65:Ve,79:208,113:at,114:xt,115:it},{65:Ve,67:[1,220],69:[1,221],79:208,113:at,114:xt,115:it},{65:Ve,67:[1,223],69:[1,222],79:208,113:at,114:xt,115:it},t(Q,[2,44],{42:tt}),t(Ie,[2,70]),t(Ie,[2,69]),{60:[1,224],65:Ve,79:208,113:at,114:xt,115:it},t(Ie,[2,72]),t(dt,[2,74]),{30:225,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},t(yt,a,{5:226}),t(lt,[2,95]),t(B,[2,35]),{41:227,42:g,43:39,45:40,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},{10:St,58:gr,81:xn,89:228,102:jt,104:229,105:230,106:rn,107:Er,108:Kn,109:hn},{10:St,58:gr,81:xn,89:239,101:[1,240],102:jt,104:229,105:230,106:rn,107:Er,108:Kn,109:hn},{10:St,58:gr,81:xn,89:241,101:[1,242],102:jt,104:229,105:230,106:rn,107:Er,108:Kn,109:hn},{102:[1,243]},{10:St,58:gr,81:xn,89:244,102:jt,104:229,105:230,106:rn,107:Er,108:Kn,109:hn},{42:g,45:245,58:y,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I},t(Ye,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(Ye,[2,109]),t(Ye,[2,111],{10:[1,249]}),t(Ye,[2,112]),t(De,[2,51]),t(mt,[2,80]),t(De,[2,52]),{49:[1,250],65:Ve,79:208,113:at,114:xt,115:it},t(De,[2,59]),t(De,[2,54]),t(De,[2,55]),t(De,[2,56]),{106:[1,251]},t(De,[2,58]),t(De,[2,60]),{64:[1,252],65:Ve,79:208,113:at,114:xt,115:it},t(De,[2,62]),t(De,[2,63]),t(De,[2,65]),t(De,[2,64]),t(De,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:Ve,79:208,113:at,114:xt,115:it},{6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,254],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:w,85:S,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I,118:C,119:O,120:D,121:P},t(te,[2,48]),t(Ye,[2,114],{103:Qn}),t(on,[2,123],{105:256,10:St,58:gr,81:xn,102:jt,106:rn,107:Er,108:Kn,109:hn}),t(Rn,[2,125]),t(Rn,[2,127]),t(Rn,[2,128]),t(Rn,[2,129]),t(Rn,[2,130]),t(Rn,[2,131]),t(Rn,[2,132]),t(Rn,[2,133]),t(Rn,[2,134]),t(Ye,[2,115],{103:Qn}),{10:[1,257]},t(Ye,[2,116],{103:Qn}),{10:[1,258]},t(It,[2,122]),t(Ye,[2,98],{103:Qn}),t(Ye,[2,99],{110:109,42:g,58:y,86:T,99:E,102:_,103:A,106:L,108:M,111:N,112:k,113:I}),t(Ye,[2,103]),t(Ye,[2,105],{10:[1,259]}),t(Ye,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:$,9:z,11:Y,21:264},t(B,[2,34]),{10:St,58:gr,81:xn,102:jt,104:265,105:230,106:rn,107:Er,108:Kn,109:hn},t(Rn,[2,126]),{14:X,42:ie,58:j,86:J,98:266,102:Z,103:H,106:q,108:K,111:se,112:ce,113:ue,117:84},{14:X,42:ie,58:j,86:J,98:267,102:Z,103:H,106:q,108:K,111:se,112:ce,113:ue,117:84},{95:[1,268]},t(Ye,[2,113]),t(De,[2,53]),{30:269,65:Ve,77:je,78:kt,79:164,113:at,114:xt,115:it},t(De,[2,61]),t(yt,a,{5:270}),t(on,[2,124],{105:256,10:St,58:gr,81:xn,102:jt,106:rn,107:Er,108:Kn,109:hn}),t(Ye,[2,119],{117:160,10:[1,271],14:X,42:ie,58:j,86:J,102:Z,103:H,106:q,108:K,111:se,112:ce,113:ue}),t(Ye,[2,120],{117:160,10:[1,272],14:X,42:ie,58:j,86:J,102:Z,103:H,106:q,108:K,111:se,112:ce,113:ue}),t(Ye,[2,107]),{31:[1,273],65:Ve,79:208,113:at,114:xt,115:it},{6:11,7:12,8:s,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,274],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:w,85:S,86:T,99:E,102:_,103:A,106:L,108:M,110:41,111:N,112:k,113:I,118:C,119:O,120:D,121:P},{10:St,58:gr,81:xn,89:275,102:jt,104:229,105:230,106:rn,107:Er,108:Kn,109:hn},{10:St,58:gr,81:xn,89:276,102:jt,104:229,105:230,106:rn,107:Er,108:Kn,109:hn},t(De,[2,57]),t(B,[2,33]),t(Ye,[2,117],{103:Qn}),t(Ye,[2,118],{103:Qn})],defaultActions:{},parseError:o(function(ht,At){if(At.recoverable)this.trace(ht);else{var $t=new Error(ht);throw $t.hash=At,$t}},"parseError"),parse:o(function(ht){var At=this,$t=[0],rt=[],Ot=[null],pe=[],ur=this.table,be="",Ir=0,Xc=0,M1=0,_b=2,I1=1,O1=pe.slice.call(arguments,1),ci=Object.create(this.lexer),ko={yy:{}};for(var ih in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ih)&&(ko.yy[ih]=this.yy[ih]);ci.setInput(ht,ko.yy),ko.yy.lexer=ci,ko.yy.parser=this,typeof ci.yylloc>"u"&&(ci.yylloc={});var Us=ci.yylloc;pe.push(Us);var ah=ci.options&&ci.options.ranges;typeof ko.yy.parseError=="function"?this.parseError=ko.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Lb(La){$t.length=$t.length-2*La,Ot.length=Ot.length-La,pe.length=pe.length-La}o(Lb,"popStack");function P1(){var La;return La=rt.pop()||ci.lex()||I1,typeof La!="number"&&(La instanceof Array&&(rt=La,La=rt.pop()),La=At.symbols_[La]||La),La}o(P1,"lex");for(var sa,jc,Kc,us,_i,Wl,sh={},zf,Hs,B1,Gf;;){if(Kc=$t[$t.length-1],this.defaultActions[Kc]?us=this.defaultActions[Kc]:((sa===null||typeof sa>"u")&&(sa=P1()),us=ur[Kc]&&ur[Kc][sa]),typeof us>"u"||!us.length||!us[0]){var F1="";Gf=[];for(zf in ur[Kc])this.terminals_[zf]&&zf>_b&&Gf.push("'"+this.terminals_[zf]+"'");ci.showPosition?F1="Parse error on line "+(Ir+1)+`:
539 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var M=this.next();return M||this.lex()},"lex"),begin:o(function(M){this.conditionStack.push(M)},"begin"),popState:o(function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},"topState"),pushState:o(function(M){this.begin(M)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(M,N,k,I){var C=I;switch(k){case 0:return this.begin("acc_title"),22;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),24;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;break;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;break;case 22:return N.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return N.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return A}();T.lexer=E;function _(){this.yy={}}return o(_,"Parser"),_.prototype=T,T.Parser=_,new _}();xD.parser=xD;rne=xD});var Hd,bD,NNe,MNe,ine,INe,ONe,PNe,BNe,FNe,ane,sne=R(()=>{"use strict";ut();_t();bi();Hd=new Map,bD=[],NNe={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},MNe={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},ine=o(function(t,e=void 0){return Hd.has(t)?!Hd.get(t).alias&&e&&(Hd.get(t).alias=e,V.info(`Add alias '${e}' to entity '${t}'`)):(Hd.set(t,{attributes:[],alias:e}),V.info("Added new entity :",t)),Hd.get(t)},"addEntity"),INe=o(()=>Hd,"getEntities"),ONe=o(function(t,e){let r=ine(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),V.debug("Added attribute ",e[n].attributeName)},"addAttributes"),PNe=o(function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};bD.push(i),V.debug("Added new relationship :",i)},"addRelationship"),BNe=o(()=>bD,"getRelationships"),FNe=o(function(){Hd=new Map,bD=[],vr()},"clear"),ane={Cardinality:NNe,Identification:MNe,getConfig:o(()=>de().er,"getConfig"),addEntity:ine,addAttributes:ONe,getEntities:INe,addRelationship:PNe,getRelationships:BNe,clear:FNe,setAccTitle:kr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,setDiagramTitle:nn,getDiagramTitle:Xr}});var Dl,zNe,$o,one=R(()=>{"use strict";Dl={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},zNe=o(function(t,e){let r;t.append("defs").append("marker").attr("id",Dl.MD_PARENT_START).attr("refX",0).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",Dl.MD_PARENT_END).attr("refX",19).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"),t.append("defs").append("marker").attr("id",Dl.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Dl.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",Dl.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",Dl.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Dl.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").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",Dl.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",Dl.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",Dl.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),$o={ERMarkers:Dl,insertMarkers:zNe}});var lne,cne=R(()=>{"use strict";lne=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function GNe(t){return typeof t=="string"&&lne.test(t)}var une,hne=R(()=>{"use strict";cne();o(GNe,"validate");une=GNe});function fne(t,e=0){return va[t[e+0]]+va[t[e+1]]+va[t[e+2]]+va[t[e+3]]+"-"+va[t[e+4]]+va[t[e+5]]+"-"+va[t[e+6]]+va[t[e+7]]+"-"+va[t[e+8]]+va[t[e+9]]+"-"+va[t[e+10]]+va[t[e+11]]+va[t[e+12]]+va[t[e+13]]+va[t[e+14]]+va[t[e+15]]}var va,dne=R(()=>{"use strict";va=[];for(let t=0;t<256;++t)va.push((t+256).toString(16).slice(1));o(fne,"unsafeStringify")});function $Ne(t){if(!une(t))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var pne,mne=R(()=>{"use strict";hne();o($Ne,"parse");pne=$Ne});function VNe(t){t=unescape(encodeURIComponent(t));let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}function wD(t,e,r){function n(i,a,s,l){var u;if(typeof i=="string"&&(i=VNe(i)),typeof a=="string"&&(a=pne(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+i.length);if(h.set(a),h.set(i,a.length),h=r(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,s){l=l||0;for(let f=0;f<16;++f)s[l+f]=h[f];return s}return fne(h)}o(n,"generateUUID");try{n.name=t}catch{}return n.DNS=UNe,n.URL=HNe,n}var UNe,HNe,gne=R(()=>{"use strict";dne();mne();o(VNe,"stringToBytes");UNe="6ba7b810-9dad-11d1-80b4-00c04fd430c8",HNe="6ba7b811-9dad-11d1-80b4-00c04fd430c8";o(wD,"v35")});function YNe(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function TD(t,e){return t<<e|t>>>32-e}function WNe(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){let s=unescape(encodeURIComponent(t));t=[];for(let l=0;l<s.length;++l)t.push(s.charCodeAt(l))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);let n=t.length/4+2,i=Math.ceil(n/16),a=new Array(i);for(let s=0;s<i;++s){let l=new Uint32Array(16);for(let u=0;u<16;++u)l[u]=t[s*64+u*4]<<24|t[s*64+u*4+1]<<16|t[s*64+u*4+2]<<8|t[s*64+u*4+3];a[s]=l}a[i-1][14]=(t.length-1)*8/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=(t.length-1)*8&4294967295;for(let s=0;s<i;++s){let l=new Uint32Array(80);for(let m=0;m<16;++m)l[m]=a[s][m];for(let m=16;m<80;++m)l[m]=TD(l[m-3]^l[m-8]^l[m-14]^l[m-16],1);let u=r[0],h=r[1],f=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let g=Math.floor(m/20),y=TD(u,5)+YNe(g,h,f,d)+p+e[g]+l[m]>>>0;p=d,d=f,f=TD(h,30)>>>0,h=u,u=y}r[0]=r[0]+u>>>0,r[1]=r[1]+h>>>0,r[2]=r[2]+f>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var yne,vne=R(()=>{"use strict";o(YNe,"f");o(TD,"ROTL");o(WNe,"sha1");yne=WNe});var qNe,kD,xne=R(()=>{"use strict";gne();vne();qNe=wD("v5",80,yne),kD=qNe});var bne=R(()=>{"use strict";xne()});function nMe(t="",e=""){let r=t.replace(XNe,"");return`${Tne(e)}${Tne(r)}${kD(t,rMe)}`}function Tne(t=""){return t.length>0?`${t}-`:""}var XNe,Ii,Fv,jNe,KNe,QNe,ZNe,kne,JNe,wne,eMe,tMe,rMe,Ene,Cne=R(()=>{"use strict";ya();Zt();Vd();_t();ut();xr();one();Yn();rr();bne();XNe=/[^\dA-Za-z](\W)*/g,Ii={},Fv=new Map,jNe=o(function(t){let e=Object.keys(t);for(let r of e)Ii[r]=t[r]},"setConf"),KNe=o((t,e,r)=>{let n=Ii.entityPadding/3,i=Ii.entityPadding/3,a=Ii.fontSize*.85,s=e.node().getBBox(),l=[],u=!1,h=!1,f=0,d=0,p=0,m=0,g=s.height+n*2,y=1;r.forEach(w=>{w.attributeKeyTypeList!==void 0&&w.attributeKeyTypeList.length>0&&(u=!0),w.attributeComment!==void 0&&(h=!0)}),r.forEach(w=>{let S=`${e.node().id}-attr-${y}`,T=0,E=gh(w.attributeType),_=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",de().fontFamily).style("font-size",a+"px").text(E),A=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",de().fontFamily).style("font-size",a+"px").text(w.attributeName),L={};L.tn=_,L.nn=A;let M=_.node().getBBox(),N=A.node().getBBox();if(f=Math.max(f,M.width),d=Math.max(d,N.width),T=Math.max(M.height,N.height),u){let k=w.attributeKeyTypeList!==void 0?w.attributeKeyTypeList.join(","):"",I=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",de().fontFamily).style("font-size",a+"px").text(k);L.kn=I;let C=I.node().getBBox();p=Math.max(p,C.width),T=Math.max(T,C.height)}if(h){let k=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",de().fontFamily).style("font-size",a+"px").text(w.attributeComment||"");L.cn=k;let I=k.node().getBBox();m=Math.max(m,I.width),T=Math.max(T,I.height)}L.height=T,l.push(L),g+=T+n*2,y+=1});let v=4;u&&(v+=2),h&&(v+=2);let x=f+d+p+m,b={width:Math.max(Ii.minEntityWidth,Math.max(s.width+Ii.entityPadding*2,x+i*v)),height:r.length>0?g:Math.max(Ii.minEntityHeight,s.height+Ii.entityPadding*2)};if(r.length>0){let w=Math.max(0,(b.width-x-i*v)/(v/2));e.attr("transform","translate("+b.width/2+","+(n+s.height/2)+")");let S=s.height+n*2,T="attributeBoxOdd";l.forEach(E=>{let _=S+n+E.height/2;E.tn.attr("transform","translate("+i+","+_+")");let A=t.insert("rect","#"+E.tn.node().id).classed(`er ${T}`,!0).attr("x",0).attr("y",S).attr("width",f+i*2+w).attr("height",E.height+n*2),L=parseFloat(A.attr("x"))+parseFloat(A.attr("width"));E.nn.attr("transform","translate("+(L+i)+","+_+")");let M=t.insert("rect","#"+E.nn.node().id).classed(`er ${T}`,!0).attr("x",L).attr("y",S).attr("width",d+i*2+w).attr("height",E.height+n*2),N=parseFloat(M.attr("x"))+parseFloat(M.attr("width"));if(u){E.kn.attr("transform","translate("+(N+i)+","+_+")");let k=t.insert("rect","#"+E.kn.node().id).classed(`er ${T}`,!0).attr("x",N).attr("y",S).attr("width",p+i*2+w).attr("height",E.height+n*2);N=parseFloat(k.attr("x"))+parseFloat(k.attr("width"))}h&&(E.cn.attr("transform","translate("+(N+i)+","+_+")"),t.insert("rect","#"+E.cn.node().id).classed(`er ${T}`,"true").attr("x",N).attr("y",S).attr("width",m+i*2+w).attr("height",E.height+n*2)),S+=E.height+n*2,T=T==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else b.height=Math.max(Ii.minEntityHeight,g),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b},"drawAttributes"),QNe=o(function(t,e,r){let n=[...e.keys()],i;return n.forEach(function(a){let s=nMe(a,"entity");Fv.set(a,s);let l=t.append("g").attr("id",s);i=i===void 0?s:i;let u="text-"+s,h=l.append("text").classed("er entityLabel",!0).attr("id",u).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",de().fontFamily).style("font-size",Ii.fontSize+"px").text(e.get(a).alias??a),{width:f,height:d}=KNe(l,h,e.get(a).attributes),m=l.insert("rect","#"+u).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",f).attr("height",d).node().getBBox();r.setNode(s,{width:m.width,height:m.height,shape:"rect",id:s})}),i},"drawEntities"),ZNe=o(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),kne=o(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),JNe=o(function(t,e){return t.forEach(function(r){e.setEdge(Fv.get(r.entityA),Fv.get(r.entityB),{relationship:r},kne(r))}),t},"addRelationships"),wne=0,eMe=o(function(t,e,r,n,i){wne++;let a=r.edge(Fv.get(e.entityA),Fv.get(e.entityB),kne(e)),s=ha().x(function(y){return y.x}).y(function(y){return y.y}).curve(vs),l=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",s(a.points)).style("stroke",Ii.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let u="";switch(Ii.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+u+"#"+$o.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+u+"#"+$o.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+u+"#"+$o.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+u+"#"+$o.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+u+"#"+$o.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+u+"#"+$o.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+u+"#"+$o.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+u+"#"+$o.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+u+"#"+$o.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+u+"#"+$o.ERMarkers.MD_PARENT_START+")");break}let h=l.node().getTotalLength(),f=l.node().getPointAtLength(h*.5),d="rel"+wne,p=e.roleA.split(/<br ?\/>/g),m=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",f.x).attr("y",f.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",de().fontFamily).style("font-size",Ii.fontSize+"px");if(p.length==1)m.text(e.roleA);else{let y=-(p.length-1)*.5;p.forEach((v,x)=>{m.append("tspan").attr("x",f.x).attr("dy",`${x===0?y:1}em`).text(v)})}let g=m.node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",f.x-g.width/2).attr("y",f.y-g.height/2).attr("width",g.width).attr("height",g.height)},"drawRelationshipFromLayout"),tMe=o(function(t,e,r,n){Ii=de().er,V.info("Drawing ER diagram");let i=de().securityLevel,a;i==="sandbox"&&(a=$e("#i"+e));let l=(i==="sandbox"?$e(a.nodes()[0].contentDocument.body):$e("body")).select(`[id='${e}']`);$o.insertMarkers(l,Ii);let u;u=new lr({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ii.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=QNe(l,n.db.getEntities(),u),f=JNe(n.db.getRelationships(),u);lo(u),ZNe(l,u),f.forEach(function(y){eMe(l,y,u,h,n)});let d=Ii.diagramPadding;Lt.insertTitle(l,"entityTitleText",Ii.titleTopMargin,n.db.getDiagramTitle());let p=l.node().getBBox(),m=p.width+d*2,g=p.height+d*2;Sr(l,g,m,Ii.useMaxWidth),l.attr("viewBox",`${p.x-d} ${p.y-d} ${m} ${g}`)},"draw"),rMe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";o(nMe,"generateId");o(Tne,"strWithHyphen");Ene={setConf:jNe,draw:tMe}});var iMe,Sne,Ane=R(()=>{"use strict";iMe=o(t=>`
710 `);super(`Parsing failed: ${e} ${r}`),this.result=t}static{Tt(this,"MermaidParseError")}}});function cf(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var sx=R(()=>{"use strict";o(cf,"populateCommonDb")});var Hr,Zk=R(()=>{"use strict";Hr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var uf,Jk=R(()=>{"use strict";uf=class{constructor(e){this.init=e;this.records=this.init()}static{o(this,"ImperativeState")}reset(){this.records=this.init()}}});function kI(){return J_({length:7})}function $Pe(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function Sle(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function _le(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let i in pt.records.branches)pt.records.branches.get(i)===e.id&&n.push(i);if(V.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=pt.records.commits.get(e.parents[0]);Sle(t,e,i),e.parents[1]&&t.push(pt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=pt.records.commits.get(e.parents[0]);Sle(t,e,i)}}t=$Pe(t,i=>i.id),_le(t)}var GPe,k0,pt,VPe,UPe,HPe,YPe,WPe,qPe,XPe,Ale,jPe,KPe,QPe,ZPe,JPe,Lle,eBe,tBe,rBe,eE,EI=R(()=>{"use strict";ut();xr();qs();rr();bi();Zk();Jk();sl();GPe=mr.gitGraph,k0=o(()=>Ts({...GPe,...Or().gitGraph}),"getConfig"),pt=new uf(()=>{let t=k0(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});o(kI,"getID");o($Pe,"uniqBy");VPe=o(function(t){pt.records.direction=t},"setDirection"),UPe=o(function(t){V.debug("options str",t),t=t?.trim(),t=t||"{}";try{pt.records.options=JSON.parse(t)}catch(e){V.error("error while parsing gitGraph options",e.message)}},"setOptions"),HPe=o(function(){return pt.records.options},"getOptions"),YPe=o(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;V.info("commit",e,r,n,i),V.debug("Entering commit:",e,r,n,i);let a=k0();r=We.sanitizeText(r,a),e=We.sanitizeText(e,a),i=i?.map(l=>We.sanitizeText(l,a));let s={id:r||pt.records.seq+"-"+kI(),message:e,seq:pt.records.seq++,type:n??Hr.NORMAL,tags:i??[],parents:pt.records.head==null?[]:[pt.records.head.id],branch:pt.records.currBranch};pt.records.head=s,V.info("main branch",a.mainBranchName),pt.records.commits.set(s.id,s),pt.records.branches.set(pt.records.currBranch,s.id),V.debug("in pushCommit "+s.id)},"commit"),WPe=o(function(t){let e=t.name,r=t.order;if(e=We.sanitizeText(e,k0()),pt.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);pt.records.branches.set(e,pt.records.head!=null?pt.records.head.id:null),pt.records.branchConfig.set(e,{name:e,order:r}),Ale(e),V.debug("in createBranch")},"branch"),qPe=o(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=k0();e=We.sanitizeText(e,a),r&&(r=We.sanitizeText(r,a));let s=pt.records.branches.get(pt.records.currBranch),l=pt.records.branches.get(e),u=s?pt.records.commits.get(s):void 0,h=l?pt.records.commits.get(l):void 0;if(u&&h&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(pt.records.currBranch===e){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${pt.records.currBranch})has no commits`);throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},p}if(!pt.records.branches.has(e)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(r&&pt.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id");throw p.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},p}let f=l||"",d={id:r||`${pt.records.seq}-${kI()}`,message:`merged branch ${e} into ${pt.records.currBranch}`,seq:pt.records.seq++,parents:pt.records.head==null?[]:[pt.records.head.id,f],branch:pt.records.currBranch,type:Hr.MERGE,customType:n,customId:!!r,tags:i??[]};pt.records.head=d,pt.records.commits.set(d.id,d),pt.records.branches.set(pt.records.currBranch,d.id),V.debug(pt.records.branches),V.debug("in mergeBranch")},"merge"),XPe=o(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;V.debug("Entering cherryPick:",e,r,n);let a=k0();if(e=We.sanitizeText(e,a),r=We.sanitizeText(r,a),n=n?.map(u=>We.sanitizeText(u,a)),i=We.sanitizeText(i,a),!e||!pt.records.commits.has(e)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},u}let s=pt.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=s.branch;if(s.type===Hr.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!pt.records.commits.has(r)){if(l===pt.records.currBranch){let d=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let u=pt.records.branches.get(pt.records.currBranch);if(u===void 0||!u){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${pt.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let h=pt.records.commits.get(u);if(h===void 0||!h){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${pt.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let f={id:pt.records.seq+"-"+kI(),message:`cherry-picked ${s?.message} into ${pt.records.currBranch}`,seq:pt.records.seq++,parents:pt.records.head==null?[]:[pt.records.head.id,s.id],branch:pt.records.currBranch,type:Hr.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===Hr.MERGE?`|parent:${i}`:""}`]};pt.records.head=f,pt.records.commits.set(f.id,f),pt.records.branches.set(pt.records.currBranch,f.id),V.debug(pt.records.branches),V.debug("in cherryPick")}},"cherryPick"),Ale=o(function(t){if(t=We.sanitizeText(t,k0()),pt.records.branches.has(t)){pt.records.currBranch=t;let e=pt.records.branches.get(pt.records.currBranch);e===void 0||!e?pt.records.head=null:pt.records.head=pt.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");o(Sle,"upsert");o(_le,"prettyPrintCommitHistory");jPe=o(function(){V.debug(pt.records.commits);let t=Lle()[0];_le([t])},"prettyPrint"),KPe=o(function(){pt.reset(),vr()},"clear"),QPe=o(function(){return[...pt.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),ZPe=o(function(){return pt.records.branches},"getBranches"),JPe=o(function(){return pt.records.commits},"getCommits"),Lle=o(function(){let t=[...pt.records.commits.values()];return t.forEach(function(e){V.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),eBe=o(function(){return pt.records.currBranch},"getCurrentBranch"),tBe=o(function(){return pt.records.direction},"getDirection"),rBe=o(function(){return pt.records.head},"getHead"),eE={commitType:Hr,getConfig:k0,setDirection:VPe,setOptions:UPe,getOptions:HPe,commit:YPe,branch:WPe,merge:qPe,cherryPick:XPe,checkout:Ale,prettyPrint:jPe,clear:KPe,getBranchesAsObjArray:QPe,getBranches:ZPe,getCommits:JPe,getCommitsArray:Lle,getCurrentBranch:eBe,getDirection:tBe,getHead:rBe,setAccTitle:kr,getAccTitle:Ar,getAccDescription:Lr,setAccDescription:_r,setDiagramTitle:nn,getDiagramTitle:Xr}});var nBe,iBe,aBe,sBe,oBe,lBe,cBe,Dle,Rle=R(()=>{"use strict";Lg();ut();sx();EI();Zk();nBe=o((t,e)=>{cf(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)iBe(r,e)},"populate"),iBe=o((t,e)=>{let n={Commit:o(i=>e.commit(aBe(i)),"Commit"),Branch:o(i=>e.branch(sBe(i)),"Branch"),Merge:o(i=>e.merge(oBe(i)),"Merge"),Checkout:o(i=>e.checkout(lBe(i)),"Checkout"),CherryPicking:o(i=>e.cherryPick(cBe(i)),"CherryPicking")}[t.$type];n?n(t):V.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),aBe=o(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?Hr[t.type]:Hr.NORMAL,tags:t.tags??void 0}),"parseCommit"),sBe=o(t=>({name:t.name,order:t.order??0}),"parseBranch"),oBe=o(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?Hr[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),lBe=o(t=>t.branch,"parseCheckout"),cBe=o(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Dle={parse:o(async t=>{let e=await Fl("gitGraph",t);V.debug(e),nBe(e,eE)},"parse")}});var uBe,Ko,ff,df,Oc,Hu,E0,Is,Os,tE,ox,rE,hf,Tr,hBe,Mle,Ile,fBe,dBe,pBe,mBe,gBe,yBe,vBe,xBe,bBe,wBe,TBe,kBe,Nle,EBe,lx,CBe,SBe,ABe,_Be,LBe,Ole,Ple=R(()=>{"use strict";Zt();_t();ut();xr();Zk();uBe=de(),Ko=uBe?.gitGraph,ff=10,df=40,Oc=4,Hu=2,E0=8,Is=new Map,Os=new Map,tE=30,ox=new Map,rE=[],hf=0,Tr="LR",hBe=o(()=>{Is.clear(),Os.clear(),ox.clear(),hf=0,rE=[],Tr="LR"},"clear"),Mle=o(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}),e},"drawText"),Ile=o(t=>{let e,r,n;return Tr==="BT"?(r=o((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=o((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=Tr==="TB"||Tr=="BT"?Os.get(i)?.y:Os.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),fBe=o(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Os.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),dBe=o((t,e,r)=>{let n=r,i=r,a=[];t.forEach(s=>{let l=e.get(s);if(!l)throw new Error(`Commit not found for key ${s}`);l.parents.length?(n=mBe(l),i=Math.max(n,i)):a.push(l),gBe(l,n)}),n=i,a.forEach(s=>{yBe(s,n,r)}),t.forEach(s=>{let l=e.get(s);if(l?.parents.length){let u=fBe(l.parents);n=Os.get(u).y-df,n<=i&&(i=n);let h=Is.get(l.branch).pos,f=n-ff;Os.set(l.id,{x:h,y:f})}})},"setParallelBTPos"),pBe=o(t=>{let e=Ile(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Os.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),mBe=o(t=>pBe(t)+df,"calculateCommitPosition"),gBe=o((t,e)=>{let r=Is.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+ff;return Os.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),yBe=o((t,e,r)=>{let n=Is.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Os.set(t.id,{x:a,y:i})},"setRootPosition"),vBe=o((t,e,r,n,i,a)=>{if(a===Hr.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%E0} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%E0} ${n}-inner`);else if(a===Hr.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===Hr.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%E0}`),a===Hr.MERGE){let l=t.append("circle");l.attr("cx",r.x),l.attr("cy",r.y),l.attr("r",6),l.attr("class",`commit ${n} ${e.id} commit${i%E0}`)}a===Hr.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%E0}`)}},"drawCommitBullet"),xBe=o((t,e,r,n)=>{if(e.type!==Hr.CHERRY_PICK&&(e.customId&&e.type===Hr.MERGE||e.type!==Hr.MERGE)&&Ko?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),l=s.node()?.getBBox();if(l&&(a.attr("x",r.posWithOffset-l.width/2-Hu).attr("y",r.y+13.5).attr("width",l.width+2*Hu).attr("height",l.height+2*Hu),Tr==="TB"||Tr==="BT"?(a.attr("x",r.x-(l.width+4*Oc+5)).attr("y",r.y-12),s.attr("x",r.x-(l.width+4*Oc)).attr("y",r.y+l.height-12)):s.attr("x",r.posWithOffset-l.width/2),Ko.rotateCommitLabel))if(Tr==="TB"||Tr==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;i.attr("transform","translate("+u+", "+h+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),bBe=o((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0,l=[];for(let u of e.tags.reverse()){let h=t.insert("polygon"),f=t.append("circle"),d=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=d.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");a=Math.max(a,p.width),s=Math.max(s,p.height),d.attr("x",r.posWithOffset-p.width/2),l.push({tag:d,hole:f,rect:h,yOffset:i}),i+=20}for(let{tag:u,hole:h,rect:f,yOffset:d}of l){let p=s/2,m=r.y-19.2-d;if(f.attr("class","tag-label-bkg").attr("points",`
722 ${r.x+ff},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+Oc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),wBe=o(t=>{switch(t.customType??t.type){case Hr.NORMAL:return"commit-normal";case Hr.REVERSE:return"commit-reverse";case Hr.HIGHLIGHT:return"commit-highlight";case Hr.MERGE:return"commit-merge";case Hr.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),TBe=o((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=Ile(t.parents);if(a){let s=n.get(a)??i;return e==="TB"?s.y+df:e==="BT"?(n.get(t.id)??i).y-df:s.x+df}}else return e==="TB"?tE:e==="BT"?(n.get(t.id)??i).y-df:0;return 0},"calculatePosition"),kBe=o((t,e,r)=>{let n=Tr==="BT"&&r?e:e+ff,i=Tr==="TB"||Tr==="BT"?n:Is.get(t.branch)?.pos,a=Tr==="TB"||Tr==="BT"?Is.get(t.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),Nle=o((t,e,r)=>{if(!Ko)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=Tr==="TB"||Tr==="BT"?tE:0,s=[...e.keys()],l=Ko?.parallelCommits??!1,u=o((f,d)=>{let p=e.get(f)?.seq,m=e.get(d)?.seq;return p!==void 0&&m!==void 0?p-m:0},"sortKeys"),h=s.sort(u);Tr==="BT"&&(l&&dBe(h,e,a),h=h.reverse()),h.forEach(f=>{let d=e.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(a=TBe(d,Tr,a,Os));let p=kBe(d,a,l);if(r){let m=wBe(d),g=d.customType??d.type,y=Is.get(d.branch)?.index??0;vBe(n,d,p,m,y,g),xBe(i,d,p,a),bBe(i,d,p,a)}Tr==="TB"||Tr==="BT"?Os.set(d.id,{x:p.x,y:p.posWithOffset}):Os.set(d.id,{x:p.posWithOffset,y:p.y}),a=Tr==="BT"&&l?a+df:a+df+ff,a>hf&&(hf=a)})},"drawCommits"),EBe=o((t,e,r,n,i)=>{let s=(Tr==="TB"||Tr==="BT"?r.x<n.x:r.y<n.y)?e.branch:t.branch,l=o(h=>h.branch===s,"isOnBranchToGetCurve"),u=o(h=>h.seq>t.seq&&h.seq<e.seq,"isBetweenCommits");return[...i.values()].some(h=>u(h)&&l(h))},"shouldRerouteArrow"),lx=o((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(rE.every(s=>Math.abs(s-n)>=10))return rE.push(n),n;let a=Math.abs(t-e);return lx(t,e-a/5,r+1)},"findLane"),CBe=o((t,e,r,n)=>{let i=Os.get(e.id),a=Os.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=EBe(e,r,i,a,n),l="",u="",h=0,f=0,d=Is.get(r.branch)?.index;r.type===Hr.MERGE&&e.id!==r.parents[0]&&(d=Is.get(e.branch)?.index);let p;if(s){l="A 10 10, 0, 0, 0,",u="A 10 10, 0, 0, 1,",h=10,f=10;let m=i.y<a.y?lx(i.y,a.y):lx(a.y,i.y),g=i.x<a.x?lx(i.x,a.x):lx(a.x,i.x);Tr==="TB"?i.x<a.x?p=`M ${i.x} ${i.y} L ${g-h} ${i.y} ${u} ${g} ${i.y+f} L ${g} ${a.y-h} ${l} ${g+f} ${a.y} L ${a.x} ${a.y}`:(d=Is.get(e.branch)?.index,p=`M ${i.x} ${i.y} L ${g+h} ${i.y} ${l} ${g} ${i.y+f} L ${g} ${a.y-h} ${u} ${g-f} ${a.y} L ${a.x} ${a.y}`):Tr==="BT"?i.x<a.x?p=`M ${i.x} ${i.y} L ${g-h} ${i.y} ${l} ${g} ${i.y-f} L ${g} ${a.y+h} ${u} ${g+f} ${a.y} L ${a.x} ${a.y}`:(d=Is.get(e.branch)?.index,p=`M ${i.x} ${i.y} L ${g+h} ${i.y} ${u} ${g} ${i.y-f} L ${g} ${a.y+h} ${l} ${g-f} ${a.y} L ${a.x} ${a.y}`):i.y<a.y?p=`M ${i.x} ${i.y} L ${i.x} ${m-h} ${l} ${i.x+f} ${m} L ${a.x-h} ${m} ${u} ${a.x} ${m+f} L ${a.x} ${a.y}`:(d=Is.get(e.branch)?.index,p=`M ${i.x} ${i.y} L ${i.x} ${m+h} ${u} ${i.x+f} ${m} L ${a.x-h} ${m} ${l} ${a.x} ${m-f} L ${a.x} ${a.y}`)}else l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,Tr==="TB"?(i.x<a.x&&(r.type===Hr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${l} ${i.x+f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${u} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===Hr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${u} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x+h} ${i.y} ${l} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):Tr==="BT"?(i.x<a.x&&(r.type===Hr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x>a.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===Hr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${l} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.y<a.y&&(r.type===Hr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${u} ${a.x} ${i.y+f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${l} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(r.type===Hr.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(p===void 0)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%E0)},"drawArrow"),SBe=o((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{CBe(r,e.get(a),i,e)})})},"drawArrows"),ABe=o((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%E0,s=Is.get(n.name)?.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let l=r.append("line");l.attr("x1",0),l.attr("y1",s),l.attr("x2",hf),l.attr("y2",s),l.attr("class","branch branch"+a),Tr==="TB"?(l.attr("y1",tE),l.attr("x1",s),l.attr("y2",hf),l.attr("x2",s)):Tr==="BT"&&(l.attr("y1",hf),l.attr("x1",s),l.attr("y2",tE),l.attr("x2",s)),rE.push(s);let u=n.name,h=Mle(u),f=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(h);let m=h.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(Ko?.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(Ko?.rotateCommitLabel===!0?30:0))+", "+(s-m.height/2-1)+")"),Tr==="TB"?(f.attr("x",s-m.width/2-10).attr("y",0),p.attr("transform","translate("+(s-m.width/2-5)+", 0)")):Tr==="BT"?(f.attr("x",s-m.width/2-10).attr("y",hf),p.attr("transform","translate("+(s-m.width/2-5)+", "+hf+")")):f.attr("transform","translate(-19, "+(s-m.height/2)+")")})},"drawBranches"),_Be=o(function(t,e,r,n,i){return Is.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(Tr==="TB"||Tr==="BT"?n.width/2:0),e},"setBranchPosition"),LBe=o(function(t,e,r,n){if(hBe(),V.debug("in gitgraph renderer",t+`
779 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var O=this.next();return O||this.lex()},"lex"),begin:o(function(O){this.conditionStack.push(O)},"begin"),popState:o(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:o(function(O){this.begin(O)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(O,D,P,F){var B=F;switch(P){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return I}();M.lexer=N;function k(){this.yy={}}return o(k,"Parser"),k.prototype=M,M.Parser=k,new k}();CI.parser=CI;Ule=CI});var Yle=gi((SI,AI)=>{"use strict";(function(t,e){typeof SI=="object"&&typeof AI<"u"?AI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(SI,function(){"use strict";var t="day";return function(e,r,n){var i=o(function(l){return l.add(4-l.isoWeekday(),t)},"a"),a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),t);var u,h,f,d,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,f=(h?n.utc:n)().year(u).startOf("year"),d=4-f.isoWeekday(),f.isoWeekday()>4&&(d+=7),f.add(d,t));return p.diff(m,"week")+1},a.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var s=a.startOf;a.startOf=function(l,u){var h=this.$utils(),f=!!h.u(u)||u;return h.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(l,u)}}})});var Wle=gi((_I,LI)=>{"use strict";(function(t,e){typeof _I=="object"&&typeof LI<"u"?LI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(_I,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},l=o(function(g){return(g=+g)+(g>68?1900:2e3)},"a"),u=o(function(g){return function(y){this[g]=+y}},"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),x=60*v[1]+(+v[2]||0);return x===0?0:v[0]==="+"?-x:x}(g)}],f=o(function(g){var y=s[g];return y&&(y.indexOf?y:y.s.concat(y.f))},"u"),d=o(function(g,y){var v,x=s.meridiem;if(x){for(var b=1;b<=24;b+=1)if(g.indexOf(x(b,0,y))>-1){v=b>12;break}}else v=g===(y?"pm":"PM");return v},"d"),p={A:[a,function(g){this.afternoon=d(g,!1)}],a:[a,function(g){this.afternoon=d(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[a,function(g){var y=s.ordinal,v=g.match(/\d+/);if(this.day=v[0],y)for(var x=1;x<=31;x+=1)y(x).replace(/\[|\]/g,"")===g&&(this.day=x)}],w:[i,u("week")],ww:[n,u("week")],M:[i,u("month")],MM:[n,u("month")],MMM:[a,function(g){var y=f("months"),v=(f("monthsShort")||y.map(function(x){return x.slice(0,3)})).indexOf(g)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[a,function(g){var y=f("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=l(g)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function m(g){var y,v;y=g,v=s&&s.formats;for(var x=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,L,M){var N=M&&M.toUpperCase();return L||v[M]||t[M]||v[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,I,C){return I||C.slice(1)})})).match(e),b=x.length,w=0;w<b;w+=1){var S=x[w],T=p[S],E=T&&T[0],_=T&&T[1];x[w]=_?{regex:E,parser:_}:S.replace(/^\[|\]$/g,"")}return function(A){for(var L={},M=0,N=0;M<b;M+=1){var k=x[M];if(typeof k=="string")N+=k.length;else{var I=k.regex,C=k.parser,O=A.slice(N),D=I.exec(O)[0];C.call(L,D),A=A.replace(D,"")}}return function(P){var F=P.afternoon;if(F!==void 0){var B=P.hours;F?B<12&&(P.hours+=12):B===12&&(P.hours=0),delete P.afternoon}}(L),L}}return o(m,"l"),function(g,y,v){v.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(l=g.parseTwoDigitYear);var x=y.prototype,b=x.parse;x.parse=function(w){var S=w.date,T=w.utc,E=w.args;this.$u=T;var _=E[1];if(typeof _=="string"){var A=E[2]===!0,L=E[3]===!0,M=A||L,N=E[2];L&&(N=E[2]),s=this.$locale(),!A&&N&&(s=v.Ls[N]),this.$d=function(O,D,P,F){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*O);var B=m(D)(O),$=B.year,z=B.month,Y=B.day,Q=B.hours,X=B.minutes,ie=B.seconds,j=B.milliseconds,J=B.zone,Z=B.week,H=new Date,q=Y||($||z?1:H.getDate()),K=$||H.getFullYear(),se=0;$&&!z||(se=z>0?z-1:H.getMonth());var ce,ue=Q||0,te=X||0,De=ie||0,oe=j||0;return J?new Date(Date.UTC(K,se,q,ue,te,De,oe+60*J.offset*1e3)):P?new Date(Date.UTC(K,se,q,ue,te,De,oe)):(ce=new Date(K,se,q,ue,te,De,oe),Z&&(ce=F(ce).week(Z).toDate()),ce)}catch{return new Date("")}}(S,_,T,v),this.init(),N&&N!==!0&&(this.$L=this.locale(N).$L),M&&S!=this.format(_)&&(this.$d=new Date("")),s={}}else if(_ instanceof Array)for(var k=_.length,I=1;I<=k;I+=1){E[1]=_[I-1];var C=v.apply(this,E);if(C.isValid()){this.$d=C.$d,this.$L=C.$L,this.init();break}I===k&&(this.$d=new Date(""))}else b.call(this,w)}}})});var qle=gi((DI,RI)=>{"use strict";(function(t,e){typeof DI=="object"&&typeof RI<"u"?RI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(DI,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return l.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}});return n.bind(this)(u)}}})});function cce(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0)})}var Kle,yo,Qle,Zle,Jle,Xle,Pc,OI,PI,BI,cx,ux,FI,zI,aE,Rg,GI,ece,$I,hx,VI,UI,sE,NI,OBe,PBe,BBe,FBe,zBe,GBe,$Be,VBe,UBe,HBe,YBe,WBe,qBe,XBe,jBe,KBe,QBe,ZBe,JBe,eFe,tFe,rFe,nFe,tce,iFe,aFe,sFe,rce,oFe,MI,nce,ice,nE,Dg,lFe,cFe,II,iE,zi,ace,uFe,C0,hFe,jle,fFe,sce,dFe,oce,pFe,mFe,lce,uce=R(()=>{"use strict";Kle=Xi(Up(),1),yo=Xi(Nb(),1),Qle=Xi(Yle(),1),Zle=Xi(Wle(),1),Jle=Xi(qle(),1);ut();_t();xr();bi();yo.default.extend(Qle.default);yo.default.extend(Zle.default);yo.default.extend(Jle.default);Xle={friday:5,saturday:6},Pc="",OI="",BI="",cx=[],ux=[],FI=new Map,zI=[],aE=[],Rg="",GI="",ece=["active","done","crit","milestone"],$I=[],hx=!1,VI=!1,UI="sunday",sE="saturday",NI=0,OBe=o(function(){zI=[],aE=[],Rg="",$I=[],nE=0,II=void 0,iE=void 0,zi=[],Pc="",OI="",GI="",PI=void 0,BI="",cx=[],ux=[],hx=!1,VI=!1,NI=0,FI=new Map,vr(),UI="sunday",sE="saturday"},"clear"),PBe=o(function(t){OI=t},"setAxisFormat"),BBe=o(function(){return OI},"getAxisFormat"),FBe=o(function(t){PI=t},"setTickInterval"),zBe=o(function(){return PI},"getTickInterval"),GBe=o(function(t){BI=t},"setTodayMarker"),$Be=o(function(){return BI},"getTodayMarker"),VBe=o(function(t){Pc=t},"setDateFormat"),UBe=o(function(){hx=!0},"enableInclusiveEndDates"),HBe=o(function(){return hx},"endDatesAreInclusive"),YBe=o(function(){VI=!0},"enableTopAxis"),WBe=o(function(){return VI},"topAxisEnabled"),qBe=o(function(t){GI=t},"setDisplayMode"),XBe=o(function(){return GI},"getDisplayMode"),jBe=o(function(){return Pc},"getDateFormat"),KBe=o(function(t){cx=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),QBe=o(function(){return cx},"getIncludes"),ZBe=o(function(t){ux=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),JBe=o(function(){return ux},"getExcludes"),eFe=o(function(){return FI},"getLinks"),tFe=o(function(t){Rg=t,zI.push(t)},"addSection"),rFe=o(function(){return zI},"getSections"),nFe=o(function(){let t=jle(),e=10,r=0;for(;!t&&r<e;)t=jle(),r++;return aE=zi,aE},"getTasks"),tce=o(function(t,e,r,n){return n.includes(t.format(e.trim()))?!1:r.includes("weekends")&&(t.isoWeekday()===Xle[sE]||t.isoWeekday()===Xle[sE]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},"isInvalidDate"),iFe=o(function(t){UI=t},"setWeekday"),aFe=o(function(){return UI},"getWeekday"),sFe=o(function(t){sE=t},"setWeekend"),rce=o(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=(0,yo.default)(t.startTime):i=(0,yo.default)(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=(0,yo.default)(t.endTime):a=(0,yo.default)(t.endTime,e,!0);let[s,l]=oFe(i,a,e,r,n);t.endTime=s.toDate(),t.renderEndTime=l},"checkTaskDates"),oFe=o(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=tce(t,r,n,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),MI=o(function(t,e,r){r=r.trim();let i=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(i!==null){let s=null;for(let u of i.groups.ids.split(" ")){let h=C0(u);h!==void 0&&(!s||h.endTime>s.endTime)&&(s=h)}if(s)return s.endTime;let l=new Date;return l.setHours(0,0,0,0),l}let a=(0,yo.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{V.debug("Invalid date:"+r),V.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),nce=o(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),ice=o(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(a!==null){let f=null;for(let p of a.groups.ids.split(" ")){let m=C0(p);m!==void 0&&(!f||m.startTime<f.startTime)&&(f=m)}if(f)return f.startTime;let d=new Date;return d.setHours(0,0,0,0),d}let s=(0,yo.default)(r,e.trim(),!0);if(s.isValid())return n&&(s=s.add(1,"d")),s.toDate();let l=(0,yo.default)(t),[u,h]=nce(r);if(!Number.isNaN(u)){let f=l.add(u,h);f.isValid()&&(l=f)}return l.toDate()},"getEndDate"),nE=0,Dg=o(function(t){return t===void 0?(nE=nE+1,"task"+nE):t},"parseId"),lFe=o(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};cce(n,i,ece);for(let s=0;s<n.length;s++)n[s]=n[s].trim();let a="";switch(n.length){case 1:i.id=Dg(),i.startTime=t.endTime,a=n[0];break;case 2:i.id=Dg(),i.startTime=MI(void 0,Pc,n[0]),a=n[1];break;case 3:i.id=Dg(n[0]),i.startTime=MI(void 0,Pc,n[1]),a=n[2];break;default:}return a&&(i.endTime=ice(i.startTime,Pc,a,hx),i.manualEndTime=(0,yo.default)(a,"YYYY-MM-DD",!0).isValid(),rce(i,Pc,ux,cx)),i},"compileData"),cFe=o(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;let n=r.split(","),i={};cce(n,i,ece);for(let a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=Dg(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=Dg(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=Dg(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break;default:}return i},"parseData"),zi=[],ace={},uFe=o(function(t,e){let r={section:Rg,type:Rg,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=cFe(iE,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=iE,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=NI,NI++;let i=zi.push(r);iE=r.id,ace[r.id]=i-1},"addTask"),C0=o(function(t){let e=ace[t];return zi[e]},"findTaskById"),hFe=o(function(t,e){let r={section:Rg,type:Rg,description:t,task:t,classes:[]},n=lFe(II,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,II=r,aE.push(r)},"addTaskOrg"),jle=o(function(){let t=o(function(r){let n=zi[r],i="";switch(zi[r].raw.startTime.type){case"prevTaskEnd":{let a=C0(n.prevTaskId);n.startTime=a.endTime;break}case"getStartDate":i=MI(void 0,Pc,zi[r].raw.startTime.startData),i&&(zi[r].startTime=i);break}return zi[r].startTime&&(zi[r].endTime=ice(zi[r].startTime,Pc,zi[r].raw.endTime.data,hx),zi[r].endTime&&(zi[r].processed=!0,zi[r].manualEndTime=(0,yo.default)(zi[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),rce(zi[r],Pc,ux,cx))),zi[r].processed},"compileTask"),e=!0;for(let[r,n]of zi.entries())t(r),e=e&&n.processed;return e},"compileTasks"),fFe=o(function(t,e){let r=e;de().securityLevel!=="loose"&&(r=(0,Kle.sanitizeUrl)(e)),t.split(",").forEach(function(n){C0(n)!==void 0&&(oce(n,()=>{window.open(r,"_self")}),FI.set(n,r))}),sce(t,"clickable")},"setLink"),sce=o(function(t,e){t.split(",").forEach(function(r){let n=C0(r);n!==void 0&&n.classes.push(e)})},"setClass"),dFe=o(function(t,e,r){if(de().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<n.length;a++){let s=n[a].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),n[a]=s}}n.length===0&&n.push(t),C0(t)!==void 0&&oce(t,()=>{Lt.runFunc(e,...n)})},"setClickFun"),oce=o(function(t,e){$I.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),pFe=o(function(t,e,r){t.split(",").forEach(function(n){dFe(n,e,r)}),sce(t,"clickable")},"setClickEvent"),mFe=o(function(t){$I.forEach(function(e){e(t)})},"bindFunctions"),lce={getConfig:o(()=>de().gantt,"getConfig"),clear:OBe,setDateFormat:VBe,getDateFormat:jBe,enableInclusiveEndDates:UBe,endDatesAreInclusive:HBe,enableTopAxis:YBe,topAxisEnabled:WBe,setAxisFormat:PBe,getAxisFormat:BBe,setTickInterval:FBe,getTickInterval:zBe,setTodayMarker:GBe,getTodayMarker:$Be,setAccTitle:kr,getAccTitle:Ar,setDiagramTitle:nn,getDiagramTitle:Xr,setDisplayMode:qBe,getDisplayMode:XBe,setAccDescription:_r,getAccDescription:Lr,addSection:tFe,getSections:rFe,getTasks:nFe,addTask:uFe,findTaskById:C0,addTaskOrg:hFe,setIncludes:KBe,getIncludes:QBe,setExcludes:ZBe,getExcludes:JBe,setClickEvent:pFe,setLink:fFe,getLinks:eFe,bindFunctions:mFe,parseDuration:nce,isInvalidDate:tce,setWeekday:iFe,getWeekday:aFe,setWeekend:sFe};o(cce,"getTaskTags")});var oE,gFe,hce,yFe,Yu,vFe,fce,dce=R(()=>{"use strict";oE=Xi(Nb(),1);ut();Zt();rr();_t();Yn();gFe=o(function(){V.debug("Something is calling, setConf, remove the call")},"setConf"),hce={monday:_h,tuesday:k3,wednesday:E3,thursday:cc,friday:C3,saturday:S3,sunday:yl},yFe=o((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s<r.length;s++)if(a.startTime>=r[s]){r[s]=a.endTime,a.order=s+e,s>i&&(i=s);break}return i},"getMaxIntersections"),vFe=o(function(t,e,r,n){let i=de().gantt,a=de().securityLevel,s;a==="sandbox"&&(s=$e("#i"+e));let l=a==="sandbox"?$e(s.nodes()[0].contentDocument.body):$e("body"),u=a==="sandbox"?s.nodes()[0].contentDocument:document,h=u.getElementById(e);Yu=h.parentElement.offsetWidth,Yu===void 0&&(Yu=1200),i.useWidth!==void 0&&(Yu=i.useWidth);let f=n.db.getTasks(),d=[];for(let A of f)d.push(A.type);d=_(d);let p={},m=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let A={};for(let M of f)A[M.section]===void 0?A[M.section]=[M]:A[M.section].push(M);let L=0;for(let M of Object.keys(A)){let N=yFe(A[M],L)+1;L+=N,m+=N*(i.barHeight+i.barGap),p[M]=N}}else{m+=f.length*(i.barHeight+i.barGap);for(let A of d)p[A]=f.filter(L=>L.type===A).length}h.setAttribute("viewBox","0 0 "+Yu+" "+m);let g=l.select(`[id="${e}"]`),y=L3().domain([I4(f,function(A){return A.startTime}),M4(f,function(A){return A.endTime})]).rangeRound([0,Yu-i.leftPadding-i.rightPadding]);function v(A,L){let M=A.startTime,N=L.startTime,k=0;return M>N?k=1:M<N&&(k=-1),k}o(v,"taskCompare"),f.sort(v),x(f,Yu,m),Sr(g,m,Yu,i.useMaxWidth),g.append("text").text(n.db.getDiagramTitle()).attr("x",Yu/2).attr("y",i.titleTopMargin).attr("class","titleText");function x(A,L,M){let N=i.barHeight,k=N+i.barGap,I=i.topPadding,C=i.leftPadding,O=gl().domain([0,d.length]).range(["#00B9FA","#F95002"]).interpolate(BA);w(k,I,C,L,M,A,n.db.getExcludes(),n.db.getIncludes()),S(C,I,L,M),b(A,k,I,C,N,O,L,M),T(k,I,C,N,O),E(C,I,L,M)}o(x,"makeGantt");function b(A,L,M,N,k,I,C){let D=[...new Set(A.map($=>$.order))].map($=>A.find(z=>z.order===$));g.append("g").selectAll("rect").data(D).enter().append("rect").attr("x",0).attr("y",function($,z){return z=$.order,z*L+M-2}).attr("width",function(){return C-i.rightPadding/2}).attr("height",L).attr("class",function($){for(let[z,Y]of d.entries())if($.type===Y)return"section section"+z%i.numberSectionStyles;return"section section0"});let P=g.append("g").selectAll("rect").data(A).enter(),F=n.db.getLinks();if(P.append("rect").attr("id",function($){return $.id}).attr("rx",3).attr("ry",3).attr("x",function($){return $.milestone?y($.startTime)+N+.5*(y($.endTime)-y($.startTime))-.5*k:y($.startTime)+N}).attr("y",function($,z){return z=$.order,z*L+M}).attr("width",function($){return $.milestone?k:y($.renderEndTime||$.endTime)-y($.startTime)}).attr("height",k).attr("transform-origin",function($,z){return z=$.order,(y($.startTime)+N+.5*(y($.endTime)-y($.startTime))).toString()+"px "+(z*L+M+.5*k).toString()+"px"}).attr("class",function($){let z="task",Y="";$.classes.length>0&&(Y=$.classes.join(" "));let Q=0;for(let[ie,j]of d.entries())$.type===j&&(Q=ie%i.numberSectionStyles);let X="";return $.active?$.crit?X+=" activeCrit":X=" active":$.done?$.crit?X=" doneCrit":X=" done":$.crit&&(X+=" crit"),X.length===0&&(X=" task"),$.milestone&&(X=" milestone "+X),X+=Q,X+=" "+Y,z+X}),P.append("text").attr("id",function($){return $.id+"-text"}).text(function($){return $.task}).attr("font-size",i.fontSize).attr("x",function($){let z=y($.startTime),Y=y($.renderEndTime||$.endTime);$.milestone&&(z+=.5*(y($.endTime)-y($.startTime))-.5*k),$.milestone&&(Y=z+k);let Q=this.getBBox().width;return Q>Y-z?Y+Q+1.5*i.leftPadding>C?z+N-5:Y+N+5:(Y-z)/2+z+N}).attr("y",function($,z){return z=$.order,z*L+i.barHeight/2+(i.fontSize/2-2)+M}).attr("text-height",k).attr("class",function($){let z=y($.startTime),Y=y($.endTime);$.milestone&&(Y=z+k);let Q=this.getBBox().width,X="";$.classes.length>0&&(X=$.classes.join(" "));let ie=0;for(let[J,Z]of d.entries())$.type===Z&&(ie=J%i.numberSectionStyles);let j="";return $.active&&($.crit?j="activeCritText"+ie:j="activeText"+ie),$.done?$.crit?j=j+" doneCritText"+ie:j=j+" doneText"+ie:$.crit&&(j=j+" critText"+ie),$.milestone&&(j+=" milestoneText"),Q>Y-z?Y+Q+1.5*i.leftPadding>C?X+" taskTextOutsideLeft taskTextOutside"+ie+" "+j:X+" taskTextOutsideRight taskTextOutside"+ie+" "+j+" width-"+Q:X+" taskText taskText"+ie+" "+j+" width-"+Q}),de().securityLevel==="sandbox"){let $;$=$e("#i"+e);let z=$.nodes()[0].contentDocument;P.filter(function(Y){return F.has(Y.id)}).each(function(Y){var Q=z.querySelector("#"+Y.id),X=z.querySelector("#"+Y.id+"-text");let ie=Q.parentNode;var j=z.createElement("a");j.setAttribute("xlink:href",F.get(Y.id)),j.setAttribute("target","_top"),ie.appendChild(j),j.appendChild(Q),j.appendChild(X)})}}o(b,"drawRects");function w(A,L,M,N,k,I,C,O){if(C.length===0&&O.length===0)return;let D,P;for(let{startTime:Q,endTime:X}of I)(D===void 0||Q<D)&&(D=Q),(P===void 0||X>P)&&(P=X);if(!D||!P)return;if((0,oE.default)(P).diff((0,oE.default)(D),"year")>5){V.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let F=n.db.getDateFormat(),B=[],$=null,z=(0,oE.default)(D);for(;z.valueOf()<=P;)n.db.isInvalidDate(z,F,C,O)?$?$.end=z:$={start:z,end:z}:$&&(B.push($),$=null),z=z.add(1,"d");g.append("g").selectAll("rect").data(B).enter().append("rect").attr("id",function(Q){return"exclude-"+Q.start.format("YYYY-MM-DD")}).attr("x",function(Q){return y(Q.start)+M}).attr("y",i.gridLineStartPadding).attr("width",function(Q){let X=Q.end.add(1,"day");return y(X)-y(Q.start)}).attr("height",k-L-i.gridLineStartPadding).attr("transform-origin",function(Q,X){return(y(Q.start)+M+.5*(y(Q.end)-y(Q.start))).toString()+"px "+(X*A+.5*k).toString()+"px"}).attr("class","exclude-range")}o(w,"drawExcludeDays");function S(A,L,M,N){let k=vS(y).tickSize(-N+L+i.gridLineStartPadding).tickFormat(md(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),C=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(C!==null){let O=C[1],D=C[2],P=n.db.getWeekday()||i.weekday;switch(D){case"millisecond":k.ticks(oc.every(O));break;case"second":k.ticks(Ks.every(O));break;case"minute":k.ticks(gu.every(O));break;case"hour":k.ticks(yu.every(O));break;case"day":k.ticks(Do.every(O));break;case"week":k.ticks(hce[P].every(O));break;case"month":k.ticks(vu.every(O));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+A+", "+(N-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let O=yS(y).tickSize(-N+L+i.gridLineStartPadding).tickFormat(md(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(C!==null){let D=C[1],P=C[2],F=n.db.getWeekday()||i.weekday;switch(P){case"millisecond":O.ticks(oc.every(D));break;case"second":O.ticks(Ks.every(D));break;case"minute":O.ticks(gu.every(D));break;case"hour":O.ticks(yu.every(D));break;case"day":O.ticks(Do.every(D));break;case"week":O.ticks(hce[F].every(D));break;case"month":O.ticks(vu.every(D));break}}g.append("g").attr("class","grid").attr("transform","translate("+A+", "+L+")").call(O).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}o(S,"makeGrid");function T(A,L){let M=0,N=Object.keys(p).map(k=>[k,p[k]]);g.append("g").selectAll("text").data(N).enter().append(function(k){let I=k[0].split(We.lineBreakRegex),C=-(I.length-1)/2,O=u.createElementNS("http://www.w3.org/2000/svg","text");O.setAttribute("dy",C+"em");for(let[D,P]of I.entries()){let F=u.createElementNS("http://www.w3.org/2000/svg","tspan");F.setAttribute("alignment-baseline","central"),F.setAttribute("x","10"),D>0&&F.setAttribute("dy","1em"),F.textContent=P,O.appendChild(F)}return O}).attr("x",10).attr("y",function(k,I){if(I>0)for(let C=0;C<I;C++)return M+=N[I-1][1],k[1]*A/2+M*A+L;else return k[1]*A/2+L}).attr("font-size",i.sectionFontSize).attr("class",function(k){for(let[I,C]of d.entries())if(k[0]===C)return"sectionTitle sectionTitle"+I%i.numberSectionStyles;return"sectionTitle"})}o(T,"vertLabels");function E(A,L,M,N){let k=n.db.getTodayMarker();if(k==="off")return;let I=g.append("g").attr("class","today"),C=new Date,O=I.append("line");O.attr("x1",y(C)+A).attr("x2",y(C)+A).attr("y1",i.titleTopMargin).attr("y2",N-i.titleTopMargin).attr("class","today"),k!==""&&O.attr("style",k.replace(/,/g,";"))}o(E,"drawToday");function _(A){let L={},M=[];for(let N=0,k=A.length;N<k;++N)Object.prototype.hasOwnProperty.call(L,A[N])||(L[A[N]]=!0,M.push(A[N]));return M}o(_,"checkUnique")},"draw"),fce={setConf:gFe,draw:vFe}});var xFe,pce,mce=R(()=>{"use strict";xFe=o(t=>`
1030 `,"getStyles"),pce=xFe});var gce={};hr(gce,{diagram:()=>bFe});var bFe,yce=R(()=>{"use strict";Hle();uce();dce();mce();bFe={parser:Ule,db:lce,renderer:fce,styles:pce}});var bce,wce=R(()=>{"use strict";Lg();ut();bce={parse:o(async t=>{let e=await Fl("info",t);V.debug(e)},"parse")}});var fx,HI=R(()=>{fx="11.2.1"});var CFe,SFe,Tce,kce=R(()=>{"use strict";HI();CFe={version:fx},SFe=o(()=>CFe.version,"getVersion"),Tce={getVersion:SFe}});var Ps,pf=R(()=>{"use strict";Zt();_t();Ps=o(t=>{let{securityLevel:e}=de(),r=$e("body");if(e==="sandbox"){let a=$e(`#i${t}`).node()?.contentDocument??document;r=$e(a.body)}return r.select(`#${t}`)},"selectSvgElement")});var AFe,Ece,Cce=R(()=>{"use strict";ut();pf();Yn();AFe=o((t,e,r)=>{V.debug(`rendering info diagram
1031 `+t);let n=Ps(e);Sr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),Ece={draw:AFe}});var Sce={};hr(Sce,{diagram:()=>_Fe});var _Fe,Ace=R(()=>{"use strict";wce();kce();Cce();_Fe={parser:bce,db:Tce,renderer:Ece}});var Dce,YI,lE,WI,RFe,NFe,MFe,IFe,OFe,PFe,BFe,cE,qI=R(()=>{"use strict";ut();bi();sl();Dce=mr.pie,YI={sections:new Map,showData:!1,config:Dce},lE=YI.sections,WI=YI.showData,RFe=structuredClone(Dce),NFe=o(()=>structuredClone(RFe),"getConfig"),MFe=o(()=>{lE=new Map,WI=YI.showData,vr()},"clear"),IFe=o(({label:t,value:e})=>{lE.has(t)||(lE.set(t,e),V.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),OFe=o(()=>lE,"getSections"),PFe=o(t=>{WI=t},"setShowData"),BFe=o(()=>WI,"getShowData"),cE={getConfig:NFe,clear:MFe,setDiagramTitle:nn,getDiagramTitle:Xr,setAccTitle:kr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addSection:IFe,getSections:OFe,setShowData:PFe,getShowData:BFe}});var FFe,Rce,Nce=R(()=>{"use strict";Lg();ut();sx();qI();FFe=o((t,e)=>{cf(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),Rce={parse:o(async t=>{let e=await Fl("pie",t);V.debug(e),FFe(e,cE)},"parse")}});var zFe,Mce,Ice=R(()=>{"use strict";zFe=o(t=>`
1059 `,"getStyles"),Mce=zFe});var GFe,$Fe,Oce,Pce=R(()=>{"use strict";Zt();_t();ut();pf();Yn();xr();GFe=o(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return O3().value(n=>n.value)(e)},"createPieArcs"),$Fe=o((t,e,r,n)=>{V.debug(`rendering pie chart
1065 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var Ce=this.next();return Ce||this.lex()},"lex"),begin:o(function(Ce){this.conditionStack.push(Ce)},"begin"),popState:o(function(){var Ce=this.conditionStack.length-1;return Ce>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(Ce){return Ce=this.conditionStack.length-1-Math.abs(Ce||0),Ce>=0?this.conditionStack[Ce]:"INITIAL"},"topState"),pushState:o(function(Ce){this.begin(Ce)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(Ce,Ae,Ge,Me){var ye=Me;switch(Ge){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return we}();he.lexer=ne;function ae(){this.yy={}}return o(ae,"Parser"),ae.prototype=he,he.Parser=ae,new ae}();XI.parser=XI;$ce=XI});var os,uE,Uce=R(()=>{"use strict";Zt();sl();ut();jb();os=hp(),uE=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{o(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:mr.quadrantChart?.chartWidth||500,chartWidth:mr.quadrantChart?.chartHeight||500,titlePadding:mr.quadrantChart?.titlePadding||10,titleFontSize:mr.quadrantChart?.titleFontSize||20,quadrantPadding:mr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:mr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:mr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:mr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:mr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:mr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:mr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:mr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:mr.quadrantChart?.pointLabelFontSize||12,pointRadius:mr.quadrantChart?.pointRadius||5,xAxisPosition:mr.quadrantChart?.xAxisPosition||"top",yAxisPosition:mr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:mr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:mr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:os.quadrant1Fill,quadrant2Fill:os.quadrant2Fill,quadrant3Fill:os.quadrant3Fill,quadrant4Fill:os.quadrant4Fill,quadrant1TextFill:os.quadrant1TextFill,quadrant2TextFill:os.quadrant2TextFill,quadrant3TextFill:os.quadrant3TextFill,quadrant4TextFill:os.quadrant4TextFill,quadrantPointFill:os.quadrantPointFill,quadrantPointTextFill:os.quadrantPointTextFill,quadrantXAxisTextFill:os.quadrantXAxisTextFill,quadrantYAxisTextFill:os.quadrantYAxisTextFill,quadrantTitleFill:os.quadrantTitleFill,quadrantInternalBorderStrokeFill:os.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:os.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,V.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,r){this.classes.set(e,r)}setConfig(e){V.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){V.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,r,n,i){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,s={top:e==="top"&&r?a:0,bottom:e==="bottom"&&r?a:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,f={top:i?h:0},d=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+s.top+f.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-s.top-s.bottom-f.top,y=m/2,v=g/2;return{xAxisSpace:s,yAxisSpace:u,titleSpace:f,quadrantSpace:{quadrantLeft:d,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:v}}}getAxisLabels(e,r,n,i){let{quadrantSpace:a,titleSpace:s}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:f,quadrantTop:d,quadrantWidth:p}=a,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+f+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(e){let{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:a,quadrantTop:s}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:s,width:a,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:s,width:a,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:s+n,width:a,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:s+n,width:a,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(e){let{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:s}=r,l=gl().domain([0,1]).range([i,s+i]),u=gl().domain([0,1]).range([n+a,a]);return this.data.points.map(f=>{let d=this.classes.get(f.className);return d&&(f={...d,...f}),{x:l(f.x),y:u(f.y),fill:f.color??this.themeConfig.quadrantPointFill,radius:f.radius??this.config.pointRadius,text:{text:f.text,fill:this.themeConfig.quadrantPointTextFill,x:l(f.x),y:u(f.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:f.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:f.strokeWidth??"0px"}})}getBorders(e){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:u,x2:s+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+h,y1:u+r,x2:s+h,y2:u+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:u+a,x2:s+h+r,y2:u+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:u+r,x2:s,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+l,y1:u+r,x2:s+l,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:u+i,x2:s+h-r,y2:u+i}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(i,e,r,n);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(i,e,r,a),borderLines:this.getBorders(a),title:this.getTitle(n)}}}});function jI(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function Hce(t){return!/^\d+$/.test(t)}function Yce(t){return!/^\d+px$/.test(t)}var S0,Wce=R(()=>{"use strict";S0=class extends Error{static{o(this,"InvalidStyleError")}constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};o(jI,"validateHexCode");o(Hce,"validateNumber");o(Yce,"validateSizeInPixels")});function Wu(t){return qr(t.trim(),YFe)}function WFe(t){wa.setData({quadrant1Text:Wu(t.text)})}function qFe(t){wa.setData({quadrant2Text:Wu(t.text)})}function XFe(t){wa.setData({quadrant3Text:Wu(t.text)})}function jFe(t){wa.setData({quadrant4Text:Wu(t.text)})}function KFe(t){wa.setData({xAxisLeftText:Wu(t.text)})}function QFe(t){wa.setData({xAxisRightText:Wu(t.text)})}function ZFe(t){wa.setData({yAxisTopText:Wu(t.text)})}function JFe(t){wa.setData({yAxisBottomText:Wu(t.text)})}function KI(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(Hce(i))throw new S0(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(jI(i))throw new S0(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(jI(i))throw new S0(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(Yce(i))throw new S0(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function eze(t,e,r,n,i){let a=KI(i);wa.addPoints([{x:r,y:n,text:Wu(t.text),className:e,...a}])}function tze(t,e){wa.addClass(t,KI(e))}function rze(t){wa.setConfig({chartWidth:t})}function nze(t){wa.setConfig({chartHeight:t})}function ize(){let t=de(),{themeVariables:e,quadrantChart:r}=t;return r&&wa.setConfig(r),wa.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),wa.setData({titleText:Xr()}),wa.build()}var YFe,wa,aze,qce,Xce=R(()=>{"use strict";_t();rr();bi();Uce();Wce();YFe=de();o(Wu,"textSanitizer");wa=new uE;o(WFe,"setQuadrant1Text");o(qFe,"setQuadrant2Text");o(XFe,"setQuadrant3Text");o(jFe,"setQuadrant4Text");o(KFe,"setXAxisLeftText");o(QFe,"setXAxisRightText");o(ZFe,"setYAxisTopText");o(JFe,"setYAxisBottomText");o(KI,"parseStyles");o(eze,"addPoint");o(tze,"addClass");o(rze,"setWidth");o(nze,"setHeight");o(ize,"getQuadrantData");aze=o(function(){wa.clear(),vr()},"clear"),qce={setWidth:rze,setHeight:nze,setQuadrant1Text:WFe,setQuadrant2Text:qFe,setQuadrant3Text:XFe,setQuadrant4Text:jFe,setXAxisLeftText:KFe,setXAxisRightText:QFe,setYAxisTopText:ZFe,setYAxisBottomText:JFe,parseStyles:KI,addPoint:eze,addClass:tze,getQuadrantData:ize,clear:aze,setAccTitle:kr,getAccTitle:Ar,setDiagramTitle:nn,getDiagramTitle:Xr,getAccDescription:Lr,setAccDescription:_r}});var sze,jce,Kce=R(()=>{"use strict";Zt();_t();ut();Yn();sze=o((t,e,r,n)=>{function i(A){return A==="top"?"hanging":"middle"}o(i,"getDominantBaseLine");function a(A){return A==="left"?"start":"middle"}o(a,"getTextAnchor");function s(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`}o(s,"getTransformation");let l=de();V.debug(`Rendering quadrant chart
1071 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var P=this.next();return P||this.lex()},"lex"),begin:o(function(P){this.conditionStack.push(P)},"begin"),popState:o(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:o(function(P){this.begin(P)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(P,F,B,$){var z=$;switch(B){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return O}();k.lexer=I;function C(){this.yy={}}return o(C,"Parser"),C.prototype=k,k.Parser=C,new C}();QI.parser=QI;tue=QI});function ZI(t){return t.type==="bar"}function hE(t){return t.type==="band"}function Ng(t){return t.type==="linear"}var fE=R(()=>{"use strict";o(ZI,"isBarPlot");o(hE,"isBandAxisData");o(Ng,"isLinearAxisData")});var Mg,JI=R(()=>{"use strict";Al();Mg=class{constructor(e){this.parentGroup=e}static{o(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((a,s)=>Math.max(s.length,a),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of e){let s=bj(i,1,a),l=s?s.width:a.length*r,u=s?s.height:r;n.width=Math.max(n.width,l),n.height=Math.max(n.height,u)}return i.remove(),n}}});var Ig,eO=R(()=>{"use strict";Ig=class{constructor(e,r,n,i){this.axisConfig=e;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{o(this,"BaseAxis")}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.width;this.outerPadding=Math.min(n.width/2,i);let a=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.height;this.outerPadding=Math.min(n.height/2,i);let a=n.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}});var dE,nue=R(()=>{"use strict";Zt();ut();eO();dE=class extends Ig{static{o(this,"BandAxis")}constructor(e,r,n,i,a){super(e,i,a,r),this.categories=n,this.scale=Op().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=Op().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),V.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}});var pE,iue=R(()=>{"use strict";Zt();eO();pE=class extends Ig{static{o(this,"LinearAxis")}constructor(e,r,n,i,a){super(e,i,a,r),this.domain=n,this.scale=gl().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=gl().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function tO(t,e,r,n){let i=new Mg(n);return hE(t)?new dE(e,r,t.categories,t.title,i):new pE(e,r,[t.min,t.max],t.title,i)}var aue=R(()=>{"use strict";fE();JI();nue();iue();o(tO,"getAxis")});function sue(t,e,r,n){let i=new Mg(n);return new rO(i,t,e,r)}var rO,oue=R(()=>{"use strict";JI();rO=class{constructor(e,r,n,i){this.textDimensionCalculator=e;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{o(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};o(sue,"getChartTitleComponent")});var mE,lue=R(()=>{"use strict";Zt();mE=class{constructor(e,r,n,i,a){this.plotData=e;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=a}static{o(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=ha().y(n=>n[0]).x(n=>n[1])(e):r=ha().x(n=>n[0]).y(n=>n[1])(e),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}});var gE,cue=R(()=>{"use strict";gE=class{constructor(e,r,n,i,a,s){this.barData=e;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=a;this.plotIndex=s}static{o(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:this.boundingRect.x,y:a[0]-i,height:n,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:a[0]-i,y:a[1],width:n,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function uue(t,e,r){return new nO(t,e,r)}var nO,hue=R(()=>{"use strict";lue();cue();nO=class{constructor(e,r,n){this.chartConfig=e;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0}}static{o(this,"BasePlot")}setAxes(e,r){this.xAxis=e,this.yAxis=r}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new mE(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break;case"bar":{let i=new gE(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break}return e}};o(uue,"getPlotComponent")});var yE,fue=R(()=>{"use strict";aue();oue();hue();fE();yE=class{constructor(e,r,n,i){this.chartConfig=e;this.chartData=r;this.componentStore={title:sue(e,r,n,i),plot:uue(e,r,n),xAxis:tO(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:tO(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}static{o(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:s});e-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=l.width,e-=l.width,e>0&&(a+=e,e=0),r>0&&(s+=r,r=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+s}),this.componentStore.yAxis.setRange([i,i+s]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>ZI(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=0,s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:s,height:l});e-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=u.width,i=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=u.height,a=n+u.height,e>0&&(s+=e,e=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:s,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.yAxis.setRange([i,i+s]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([a,a+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(h=>ZI(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e}}});var vE,due=R(()=>{"use strict";fue();vE=class{static{o(this,"XYChartBuilder")}static build(e,r,n,i){return new yE(e,r,n,i).getDrawableElement()}}});function mue(){let t=hp(),e=Or();return Ts(t.xyChart,e.themeVariables.xyChart)}function gue(){let t=Or();return Ts(mr.xyChart,t.xyChart)}function yue(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function sO(t){let e=Or();return qr(t.trim(),e)}function hze(t){pue=t}function fze(t){t==="horizontal"?px.chartOrientation="horizontal":px.chartOrientation="vertical"}function dze(t){sn.xAxis.title=sO(t.text)}function vue(t,e){sn.xAxis={type:"linear",title:sn.xAxis.title,min:t,max:e},xE=!0}function pze(t){sn.xAxis={type:"band",title:sn.xAxis.title,categories:t.map(e=>sO(e.text))},xE=!0}function mze(t){sn.yAxis.title=sO(t.text)}function gze(t,e){sn.yAxis={type:"linear",title:sn.yAxis.title,min:t,max:e},aO=!0}function yze(t){let e=Math.min(...t),r=Math.max(...t),n=Ng(sn.yAxis)?sn.yAxis.min:1/0,i=Ng(sn.yAxis)?sn.yAxis.max:-1/0;sn.yAxis={type:"linear",title:sn.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function xue(t){let e=[];if(t.length===0)return e;if(!xE){let r=Ng(sn.xAxis)?sn.xAxis.min:1/0,n=Ng(sn.xAxis)?sn.xAxis.max:-1/0;vue(Math.min(r,1),Math.max(n,t.length))}if(aO||yze(t),hE(sn.xAxis)&&(e=sn.xAxis.categories.map((r,n)=>[r,t[n]])),Ng(sn.xAxis)){let r=sn.xAxis.min,n=sn.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let s=r;s<=n;s+=i)a.push(`${s}`);e=a.map((s,l)=>[s,t[l]])}return e}function bue(t){return iO[t===0?0:t%iO.length]}function vze(t,e){let r=xue(e);sn.plots.push({type:"line",strokeFill:bue(dx),strokeWidth:2,data:r}),dx++}function xze(t,e){let r=xue(e);sn.plots.push({type:"bar",fill:bue(dx),data:r}),dx++}function bze(){if(sn.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return sn.title=Xr(),vE.build(px,sn,mx,pue)}function wze(){return mx}function Tze(){return px}var dx,pue,px,mx,sn,iO,xE,aO,kze,wue,Tue=R(()=>{"use strict";qs();sl();jb();xr();rr();bi();due();fE();dx=0,px=gue(),mx=mue(),sn=yue(),iO=mx.plotColorPalette.split(",").map(t=>t.trim()),xE=!1,aO=!1;o(mue,"getChartDefaultThemeConfig");o(gue,"getChartDefaultConfig");o(yue,"getChartDefaultData");o(sO,"textSanitizer");o(hze,"setTmpSVGG");o(fze,"setOrientation");o(dze,"setXAxisTitle");o(vue,"setXAxisRangeData");o(pze,"setXAxisBand");o(mze,"setYAxisTitle");o(gze,"setYAxisRangeData");o(yze,"setYAxisRangeFromPlotData");o(xue,"transformDataWithoutCategory");o(bue,"getPlotColorFromPalette");o(vze,"setLineData");o(xze,"setBarData");o(bze,"getDrawableElem");o(wze,"getChartThemeConfig");o(Tze,"getChartConfig");kze=o(function(){vr(),dx=0,px=gue(),sn=yue(),mx=mue(),iO=mx.plotColorPalette.split(",").map(t=>t.trim()),xE=!1,aO=!1},"clear"),wue={getDrawableElem:bze,clear:kze,setAccTitle:kr,getAccTitle:Ar,setDiagramTitle:nn,getDiagramTitle:Xr,getAccDescription:Lr,setAccDescription:_r,setOrientation:fze,setXAxisTitle:dze,setXAxisRangeData:vue,setXAxisBand:pze,setYAxisTitle:mze,setYAxisRangeData:gze,setLineData:vze,setBarData:xze,setTmpSVGG:hze,getChartThemeConfig:wze,getChartConfig:Tze}});var Eze,kue,Eue=R(()=>{"use strict";ut();pf();Yn();Eze=o((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig();function l(v){return v==="top"?"text-before-edge":"middle"}o(l,"getDominantBaseLine");function u(v){return v==="left"?"start":v==="right"?"end":"middle"}o(u,"getTextAnchor");function h(v){return`translate(${v.x}, ${v.y}) rotate(${v.rotation||0})`}o(h,"getTextTransformation"),V.debug(`Rendering xychart chart
1077 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var J=this.next();return J||this.lex()},"lex"),begin:o(function(J){this.conditionStack.push(J)},"begin"),popState:o(function(){var J=this.conditionStack.length-1;return J>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(J){return J=this.conditionStack.length-1-Math.abs(J||0),J>=0?this.conditionStack[J]:"INITIAL"},"topState"),pushState:o(function(J){this.begin(J)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(J,Z,H,q){var K=q;switch(H){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return Z.yytext=Z.yytext.trim(),62;break}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return ie}();Y.lexer=Q;function X(){this.yy={}}return o(X,"Parser"),X.prototype=Y,Y.Parser=X,new X}();oO.parser=oO;Lue=oO});var lO,Bs,gx,mf,yx,Lze,Dze,Rze,Nze,Mze,Ize,Oze,Pze,Bze,Fze,zze,Gze,$ze,Vze,Uze,Hze,Yze,Rue,Nue=R(()=>{"use strict";_t();ut();bi();lO=[],Bs={},gx=new Map,mf={},yx=new Map,Lze={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},Dze={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},Rze={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Nze={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Mze=o((t,e)=>(gx.has(t)||gx.set(t,{name:t,type:e,id:Bs.id,text:Bs.text,risk:Bs.risk,verifyMethod:Bs.verifyMethod}),Bs={},gx.get(t)),"addRequirement"),Ize=o(()=>gx,"getRequirements"),Oze=o(t=>{Bs!==void 0&&(Bs.id=t)},"setNewReqId"),Pze=o(t=>{Bs!==void 0&&(Bs.text=t)},"setNewReqText"),Bze=o(t=>{Bs!==void 0&&(Bs.risk=t)},"setNewReqRisk"),Fze=o(t=>{Bs!==void 0&&(Bs.verifyMethod=t)},"setNewReqVerifyMethod"),zze=o(t=>(yx.has(t)||(yx.set(t,{name:t,type:mf.type,docRef:mf.docRef}),V.info("Added new requirement: ",t)),mf={},yx.get(t)),"addElement"),Gze=o(()=>yx,"getElements"),$ze=o(t=>{mf!==void 0&&(mf.type=t)},"setNewElementType"),Vze=o(t=>{mf!==void 0&&(mf.docRef=t)},"setNewElementDocRef"),Uze=o((t,e,r)=>{lO.push({type:t,src:e,dst:r})},"addRelationship"),Hze=o(()=>lO,"getRelationships"),Yze=o(()=>{lO=[],Bs={},gx=new Map,mf={},yx=new Map,vr()},"clear"),Rue={RequirementType:Lze,RiskLevel:Dze,VerifyType:Rze,Relationships:Nze,getConfig:o(()=>de().req,"getConfig"),addRequirement:Mze,getRequirements:Ize,setNewReqId:Oze,setNewReqText:Pze,setNewReqRisk:Bze,setNewReqVerifyMethod:Fze,setAccTitle:kr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addElement:zze,getElements:Gze,setNewElementType:$ze,setNewElementDocRef:Vze,addRelationship:Uze,getRelationships:Hze,clear:Yze}});var Wze,Mue,Iue=R(()=>{"use strict";Wze=o(t=>`
1123 L0,${e.line_height}`).attr("stroke-width",1)},"insertLineEndings"),uO={ReqMarkers:cO,insertLineEndings:qze}});var ai,Pue,Bue,Fue,zue,Xze,jze,Kze,Qze,Zze,Jze,Og,eGe,Gue,$ue=R(()=>{"use strict";Zt();Vd();ya();_t();ut();Yn();rr();Oue();ai={},Pue=0,Bue=o((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",ai.rect_min_width+"px").attr("height",ai.rect_min_height+"px"),"newRectNode"),Fue=o((t,e,r)=>{let n=ai.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",ai.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(h=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",ai.rect_min_width/2).attr("dy",0).text(h):i.append("tspan").attr("text-anchor","middle").attr("x",ai.rect_min_width/2).attr("dy",ai.line_height*.75).text(h),a++});let s=1.5*ai.rect_padding,l=a*ai.line_height*.75,u=s+l;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",ai.rect_min_width).attr("y1",u).attr("y2",u),{titleNode:i,y:u}},"newTitleNode"),zue=o((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",ai.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,s=30,l=[];return r.forEach(u=>{let h=u.length;for(;h>s&&a<3;){let f=u.substring(0,s);u=u.substring(s,u.length),h=u.length,l[l.length]=f,a++}if(a==3){let f=l[l.length-1];l[l.length-1]=f.substring(0,f.length-4)+"..."}else l[l.length]=u;a=0}),l.forEach(u=>{i.append("tspan").attr("x",ai.rect_padding).attr("dy",ai.line_height).text(u)}),i},"newBodyNode"),Xze=o((t,e,r,n)=>{let i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),s="rel"+Pue;Pue++;let u=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-u.width/2).attr("y",a.y-u.height/2).attr("width",u.width).attr("height",u.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),jze=o(function(t,e,r,n,i){let a=r.edge(Og(e.src),Og(e.dst)),s=ha().x(function(u){return u.x}).y(function(u){return u.y}),l=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?l.attr("marker-start","url("+We.getUrl(ai.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(l.attr("stroke-dasharray","10,7"),l.attr("marker-end","url("+We.getUrl(ai.arrowMarkerAbsolute)+"#"+uO.ReqMarkers.ARROW+"_line_ending)")),Xze(t,l,ai,`<<${e.type}>>`)},"drawRelationshipFromLayout"),Kze=o((t,e,r)=>{t.forEach((n,i)=>{i=Og(i),V.info("Added new requirement: ",i);let a=r.append("g").attr("id",i),s="req-"+i,l=Bue(a,s),u=[],h=Fue(a,i+"_title",[`<<${n.type}>>`,`${n.name}`]);u.push(h.titleNode);let f=zue(a,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],h.y);u.push(f);let d=l.node().getBBox();e.setNode(i,{width:d.width,height:d.height,shape:"rect",id:i})})},"drawReqs"),Qze=o((t,e,r)=>{t.forEach((n,i)=>{let a=Og(i),s=r.append("g").attr("id",a),l="element-"+a,u=Bue(s,l),h=[],f=Fue(s,l+"_title",["<<Element>>",`${i}`]);h.push(f.titleNode);let d=zue(s,l+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],f.y);h.push(d);let p=u.node().getBBox();e.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})})},"drawElements"),Zze=o((t,e)=>(t.forEach(function(r){let n=Og(r.src),i=Og(r.dst);e.setEdge(n,i,{relationship:r})}),t),"addRelationships"),Jze=o(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},"adjustEntities"),Og=o(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),eGe=o((t,e,r,n)=>{ai=de().requirement;let i=ai.securityLevel,a;i==="sandbox"&&(a=$e("#i"+e));let l=(i==="sandbox"?$e(a.nodes()[0].contentDocument.body):$e("body")).select(`[id='${e}']`);uO.insertLineEndings(l,ai);let u=new lr({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:ai.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),h=n.db.getRequirements(),f=n.db.getElements(),d=n.db.getRelationships();Kze(h,u,l),Qze(f,u,l),Zze(d,u),lo(u),Jze(l,u),d.forEach(function(v){jze(l,v,u,e,n)});let p=ai.rect_padding,m=l.node().getBBox(),g=m.width+p*2,y=m.height+p*2;Sr(l,y,g,ai.useMaxWidth),l.attr("viewBox",`${m.x-p} ${m.y-p} ${g} ${y}`)},"draw"),Gue={draw:eGe}});var Vue={};hr(Vue,{diagram:()=>tGe});var tGe,Uue=R(()=>{"use strict";Due();Nue();Iue();$ue();tGe={parser:Lue,db:Rue,renderer:Gue,styles:Mue}});var hO,Wue,que=R(()=>{"use strict";hO=function(){var t=o(function(H,q,K,se){for(K=K||{},se=H.length;se--;K[H[se]]=q);return K},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],l=[1,13],u=[1,14],h=[1,16],f=[1,17],d=[1,18],p=[1,24],m=[1,25],g=[1,26],y=[1,27],v=[1,28],x=[1,29],b=[1,30],w=[1,31],S=[1,32],T=[1,33],E=[1,34],_=[1,35],A=[1,36],L=[1,37],M=[1,38],N=[1,39],k=[1,41],I=[1,42],C=[1,43],O=[1,44],D=[1,45],P=[1,46],F=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],B=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],X=[68,69,70],ie=[1,122],j={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:o(function(q,K,se,ce,ue,te,De){var oe=te.length-1;switch(ue){case 3:return ce.apply(te[oe]),te[oe];break;case 4:case 9:this.$=[];break;case 5:case 10:te[oe-1].push(te[oe]),this.$=te[oe-1];break;case 6:case 7:case 11:case 12:this.$=te[oe];break;case 8:case 13:this.$=[];break;case 15:te[oe].type="createParticipant",this.$=te[oe];break;case 16:te[oe-1].unshift({type:"boxStart",boxData:ce.parseBoxData(te[oe-2])}),te[oe-1].push({type:"boxEnd",boxText:te[oe-2]}),this.$=te[oe-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(te[oe-2]),sequenceIndexStep:Number(te[oe-1]),sequenceVisible:!0,signalType:ce.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(te[oe-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ce.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ce.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ce.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:ce.LINETYPE.ACTIVE_START,actor:te[oe-1].actor};break;case 23:this.$={type:"activeEnd",signalType:ce.LINETYPE.ACTIVE_END,actor:te[oe-1].actor};break;case 29:ce.setDiagramTitle(te[oe].substring(6)),this.$=te[oe].substring(6);break;case 30:ce.setDiagramTitle(te[oe].substring(7)),this.$=te[oe].substring(7);break;case 31:this.$=te[oe].trim(),ce.setAccTitle(this.$);break;case 32:case 33:this.$=te[oe].trim(),ce.setAccDescription(this.$);break;case 34:te[oe-1].unshift({type:"loopStart",loopText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.LOOP_START}),te[oe-1].push({type:"loopEnd",loopText:te[oe-2],signalType:ce.LINETYPE.LOOP_END}),this.$=te[oe-1];break;case 35:te[oe-1].unshift({type:"rectStart",color:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.RECT_START}),te[oe-1].push({type:"rectEnd",color:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.RECT_END}),this.$=te[oe-1];break;case 36:te[oe-1].unshift({type:"optStart",optText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.OPT_START}),te[oe-1].push({type:"optEnd",optText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.OPT_END}),this.$=te[oe-1];break;case 37:te[oe-1].unshift({type:"altStart",altText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.ALT_START}),te[oe-1].push({type:"altEnd",signalType:ce.LINETYPE.ALT_END}),this.$=te[oe-1];break;case 38:te[oe-1].unshift({type:"parStart",parText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.PAR_START}),te[oe-1].push({type:"parEnd",signalType:ce.LINETYPE.PAR_END}),this.$=te[oe-1];break;case 39:te[oe-1].unshift({type:"parStart",parText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.PAR_OVER_START}),te[oe-1].push({type:"parEnd",signalType:ce.LINETYPE.PAR_END}),this.$=te[oe-1];break;case 40:te[oe-1].unshift({type:"criticalStart",criticalText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.CRITICAL_START}),te[oe-1].push({type:"criticalEnd",signalType:ce.LINETYPE.CRITICAL_END}),this.$=te[oe-1];break;case 41:te[oe-1].unshift({type:"breakStart",breakText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.BREAK_START}),te[oe-1].push({type:"breakEnd",optText:ce.parseMessage(te[oe-2]),signalType:ce.LINETYPE.BREAK_END}),this.$=te[oe-1];break;case 43:this.$=te[oe-3].concat([{type:"option",optionText:ce.parseMessage(te[oe-1]),signalType:ce.LINETYPE.CRITICAL_OPTION},te[oe]]);break;case 45:this.$=te[oe-3].concat([{type:"and",parText:ce.parseMessage(te[oe-1]),signalType:ce.LINETYPE.PAR_AND},te[oe]]);break;case 47:this.$=te[oe-3].concat([{type:"else",altText:ce.parseMessage(te[oe-1]),signalType:ce.LINETYPE.ALT_ELSE},te[oe]]);break;case 48:te[oe-3].draw="participant",te[oe-3].type="addParticipant",te[oe-3].description=ce.parseMessage(te[oe-1]),this.$=te[oe-3];break;case 49:te[oe-1].draw="participant",te[oe-1].type="addParticipant",this.$=te[oe-1];break;case 50:te[oe-3].draw="actor",te[oe-3].type="addParticipant",te[oe-3].description=ce.parseMessage(te[oe-1]),this.$=te[oe-3];break;case 51:te[oe-1].draw="actor",te[oe-1].type="addParticipant",this.$=te[oe-1];break;case 52:te[oe-1].type="destroyParticipant",this.$=te[oe-1];break;case 53:this.$=[te[oe-1],{type:"addNote",placement:te[oe-2],actor:te[oe-1].actor,text:te[oe]}];break;case 54:te[oe-2]=[].concat(te[oe-1],te[oe-1]).slice(0,2),te[oe-2][0]=te[oe-2][0].actor,te[oe-2][1]=te[oe-2][1].actor,this.$=[te[oe-1],{type:"addNote",placement:ce.PLACEMENT.OVER,actor:te[oe-2].slice(0,2),text:te[oe]}];break;case 55:this.$=[te[oe-1],{type:"addLinks",actor:te[oe-1].actor,text:te[oe]}];break;case 56:this.$=[te[oe-1],{type:"addALink",actor:te[oe-1].actor,text:te[oe]}];break;case 57:this.$=[te[oe-1],{type:"addProperties",actor:te[oe-1].actor,text:te[oe]}];break;case 58:this.$=[te[oe-1],{type:"addDetails",actor:te[oe-1].actor,text:te[oe]}];break;case 61:this.$=[te[oe-2],te[oe]];break;case 62:this.$=te[oe];break;case 63:this.$=ce.PLACEMENT.LEFTOF;break;case 64:this.$=ce.PLACEMENT.RIGHTOF;break;case 65:this.$=[te[oe-4],te[oe-1],{type:"addMessage",from:te[oe-4].actor,to:te[oe-1].actor,signalType:te[oe-3],msg:te[oe],activate:!0},{type:"activeStart",signalType:ce.LINETYPE.ACTIVE_START,actor:te[oe-1].actor}];break;case 66:this.$=[te[oe-4],te[oe-1],{type:"addMessage",from:te[oe-4].actor,to:te[oe-1].actor,signalType:te[oe-3],msg:te[oe]},{type:"activeEnd",signalType:ce.LINETYPE.ACTIVE_END,actor:te[oe-4].actor}];break;case 67:this.$=[te[oe-3],te[oe-1],{type:"addMessage",from:te[oe-3].actor,to:te[oe-1].actor,signalType:te[oe-2],msg:te[oe]}];break;case 68:this.$={type:"addParticipant",actor:te[oe]};break;case 69:this.$=ce.LINETYPE.SOLID_OPEN;break;case 70:this.$=ce.LINETYPE.DOTTED_OPEN;break;case 71:this.$=ce.LINETYPE.SOLID;break;case 72:this.$=ce.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=ce.LINETYPE.DOTTED;break;case 74:this.$=ce.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=ce.LINETYPE.SOLID_CROSS;break;case 76:this.$=ce.LINETYPE.DOTTED_CROSS;break;case 77:this.$=ce.LINETYPE.SOLID_POINT;break;case 78:this.$=ce.LINETYPE.DOTTED_POINT;break;case 79:this.$=ce.parseMessage(te[oe].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},t(F,[2,5]),{9:47,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},t(F,[2,7]),t(F,[2,8]),t(F,[2,14]),{12:48,50:L,52:M,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:P},{22:55,70:P},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(F,[2,29]),t(F,[2,30]),{32:[1,61]},{34:[1,62]},t(F,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:P},{22:72,70:P},{22:73,70:P},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:P},{22:90,70:P},{22:91,70:P},{22:92,70:P},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(F,[2,6]),t(F,[2,15]),t(B,[2,9],{10:93}),t(F,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(F,[2,21]),{5:[1,97]},{5:[1,98]},t(F,[2,24]),t(F,[2,25]),t(F,[2,26]),t(F,[2,27]),t(F,[2,28]),t(F,[2,31]),t(F,[2,32]),t($,i,{7:99}),t($,i,{7:100}),t($,i,{7:101}),t(z,i,{40:102,7:103}),t(Y,i,{42:104,7:105}),t(Y,i,{7:105,42:106}),t(Q,i,{45:107,7:108}),t($,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:P},t(X,[2,69]),t(X,[2,70]),t(X,[2,71]),t(X,[2,72]),t(X,[2,73]),t(X,[2,74]),t(X,[2,75]),t(X,[2,76]),t(X,[2,77]),t(X,[2,78]),{22:118,70:P},{22:120,58:119,70:P},{70:[2,63]},{70:[2,64]},{56:121,81:ie},{56:123,81:ie},{56:124,81:ie},{56:125,81:ie},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:L,52:M,53:N},{5:[1,131]},t(F,[2,19]),t(F,[2,20]),t(F,[2,22]),t(F,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,132],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,133],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,134],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{16:[1,135]},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[2,46],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,49:[1,136],50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{16:[1,137]},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[2,44],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,48:[1,138],50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{16:[1,139]},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[2,42],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,47:[1,141],50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{4:a,5:s,8:8,9:10,12:12,13:l,14:u,16:[1,142],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:w,39:S,41:T,43:E,44:_,46:A,50:L,52:M,53:N,54:k,59:I,60:C,61:O,62:D,70:P},{15:[1,143]},t(F,[2,49]),{15:[1,144]},t(F,[2,51]),t(F,[2,52]),{22:145,70:P},{22:146,70:P},{56:147,81:ie},{56:148,81:ie},{56:149,81:ie},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(F,[2,16]),t(B,[2,10]),{12:151,50:L,52:M,53:N},t(B,[2,12]),t(B,[2,13]),t(F,[2,18]),t(F,[2,34]),t(F,[2,35]),t(F,[2,36]),t(F,[2,37]),{15:[1,152]},t(F,[2,38]),{15:[1,153]},t(F,[2,39]),t(F,[2,40]),{15:[1,154]},t(F,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ie},{56:158,81:ie},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:P},t(B,[2,11]),t(z,i,{7:103,40:160}),t(Y,i,{7:105,42:161}),t(Q,i,{7:108,45:162}),t(F,[2,48]),t(F,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:o(function(q,K){if(K.recoverable)this.trace(q);else{var se=new Error(q);throw se.hash=K,se}},"parseError"),parse:o(function(q){var K=this,se=[0],ce=[],ue=[null],te=[],De=this.table,oe="",ke=0,Ie=0,Se=0,Ue=2,Pe=1,_e=te.slice.call(arguments,1),me=Object.create(this.lexer),W={yy:{}};for(var fe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,fe)&&(W.yy[fe]=this.yy[fe]);me.setInput(q,W.yy),W.yy.lexer=me,W.yy.parser=this,typeof me.yylloc>"u"&&(me.yylloc={});var ge=me.yylloc;te.push(ge);var re=me.options&&me.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(yt){se.length=se.length-2*yt,ue.length=ue.length-yt,te.length=te.length-yt}o(he,"popStack");function ne(){var yt;return yt=ce.pop()||me.lex()||Pe,typeof yt!="number"&&(yt instanceof Array&&(ce=yt,yt=ce.pop()),yt=K.symbols_[yt]||yt),yt}o(ne,"lex");for(var ae,we,Te,Ce,Ae,Ge,Me={},ye,He,ze,Ze;;){if(Te=se[se.length-1],this.defaultActions[Te]?Ce=this.defaultActions[Te]:((ae===null||typeof ae>"u")&&(ae=ne()),Ce=De[Te]&&De[Te][ae]),typeof Ce>"u"||!Ce.length||!Ce[0]){var gt="";Ze=[];for(ye in De[Te])this.terminals_[ye]&&ye>Ue&&Ze.push("'"+this.terminals_[ye]+"'");me.showPosition?gt="Parse error on line "+(ke+1)+`:
1128 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var K=this.next();return K||this.lex()},"lex"),begin:o(function(K){this.conditionStack.push(K)},"begin"),popState:o(function(){var K=this.conditionStack.length-1;return K>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},"topState"),pushState:o(function(K){this.begin(K)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(K,se,ce,ue){var te=ue;switch(ce){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return se.yytext=se.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return se.yytext=se.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return H}();j.lexer=J;function Z(){this.yy={}}return o(Z,"Parser"),Z.prototype=j,j.Parser=Z,new Z}();hO.parser=hO;Wue=hO});function dO(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}function Zue(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function SGe(){Mt.records.currentBox=void 0}var Mt,aGe,fO,sGe,oGe,pi,lGe,cGe,uGe,hGe,fGe,dGe,pGe,xx,mGe,gGe,yGe,vGe,xGe,Xue,A0,bGe,wGe,TGe,vx,kGe,EGe,jue,Kue,CGe,Que,Jue,AGe,ehe,pO,the=R(()=>{"use strict";_t();ut();Jk();rr();bi();Mt=new uf(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),aGe=o(function(t){Mt.records.boxes.push({name:t.text,wrap:t.wrap??A0(),fill:t.color,actorKeys:[]}),Mt.records.currentBox=Mt.records.boxes.slice(-1)[0]},"addBox"),fO=o(function(t,e,r,n){let i=Mt.records.currentBox,a=Mt.records.actors.get(t);if(a){if(Mt.records.currentBox&&a.box&&Mt.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${Mt.records.currentBox.name}' at the same time.`);if(i=a.box?a.box:Mt.records.currentBox,a.box=i,a&&e===a.name&&r==null)return}if(r?.text==null&&(r={text:e,type:n}),(n==null||r.text==null)&&(r={text:e,type:n}),Mt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??A0(),prevActor:Mt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),Mt.records.prevActor){let s=Mt.records.actors.get(Mt.records.prevActor);s&&(s.nextActor=t)}Mt.records.currentBox&&Mt.records.currentBox.actorKeys.push(t),Mt.records.prevActor=t},"addActor"),sGe=o(t=>{let e,r=0;if(!t)return 0;for(e=0;e<Mt.records.messages.length;e++)Mt.records.messages[e].type===vx.ACTIVE_START&&Mt.records.messages[e].from===t&&r++,Mt.records.messages[e].type===vx.ACTIVE_END&&Mt.records.messages[e].from===t&&r--;return r},"activationCount"),oGe=o(function(t,e,r,n){Mt.records.messages.push({from:t,to:e,message:r.text,wrap:r.wrap??A0(),answer:n})},"addMessage"),pi=o(function(t,e,r,n,i=!1){if(n===vx.ACTIVE_END&&sGe(t??"")<1){let s=new Error("Trying to inactivate an inactive participant ("+t+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return Mt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??A0(),type:n,activate:i}),!0},"addSignal"),lGe=o(function(){return Mt.records.boxes.length>0},"hasAtLeastOneBox"),cGe=o(function(){return Mt.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),uGe=o(function(){return Mt.records.messages},"getMessages"),hGe=o(function(){return Mt.records.boxes},"getBoxes"),fGe=o(function(){return Mt.records.actors},"getActors"),dGe=o(function(){return Mt.records.createdActors},"getCreatedActors"),pGe=o(function(){return Mt.records.destroyedActors},"getDestroyedActors"),xx=o(function(t){return Mt.records.actors.get(t)},"getActor"),mGe=o(function(){return[...Mt.records.actors.keys()]},"getActorKeys"),gGe=o(function(){Mt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),yGe=o(function(){Mt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),vGe=o(()=>Mt.records.sequenceNumbersEnabled,"showSequenceNumbers"),xGe=o(function(t){Mt.records.wrapEnabled=t},"setWrap"),Xue=o(t=>{if(t===void 0)return{};t=t.trim();let e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),A0=o(()=>Mt.records.wrapEnabled!==void 0?Mt.records.wrapEnabled:de().sequence?.wrap??!1,"autoWrap"),bGe=o(function(){Mt.reset(),vr()},"clear"),wGe=o(function(t){let e=t.trim(),{wrap:r,cleanedText:n}=Xue(e),i={text:n,wrap:r};return V.debug(`parseMessage: ${JSON.stringify(i)}`),i},"parseMessage"),TGe=o(function(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=Xue(n);return{text:a?qr(a,de()):void 0,color:r,wrap:i}},"parseBoxData"),vx={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},kGe={FILLED:0,OPEN:1},EGe={LEFTOF:0,RIGHTOF:1,OVER:2},jue=o(function(t,e,r){let n={actor:t,placement:e,message:r.text,wrap:r.wrap??A0()},i=[].concat(t,t);Mt.records.notes.push(n),Mt.records.messages.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap??A0(),type:vx.NOTE,placement:e})},"addNote"),Kue=o(function(t,e){let r=xx(t);try{let n=qr(e.text,de());n=n.replace(/&amp;/g,"&"),n=n.replace(/&equals;/g,"=");let i=JSON.parse(n);dO(r,i)}catch(n){V.error("error while parsing actor link text",n)}},"addLinks"),CGe=o(function(t,e){let r=xx(t);try{let n={},i=qr(e.text,de()),a=i.indexOf("@");i=i.replace(/&amp;/g,"&"),i=i.replace(/&equals;/g,"=");let s=i.slice(0,a-1).trim(),l=i.slice(a+1).trim();n[s]=l,dO(r,n)}catch(n){V.error("error while parsing actor link text",n)}},"addALink");o(dO,"insertLinks");Que=o(function(t,e){let r=xx(t);try{let n=qr(e.text,de()),i=JSON.parse(n);Zue(r,i)}catch(n){V.error("error while parsing actor properties text",n)}},"addProperties");o(Zue,"insertProperties");o(SGe,"boxEnd");Jue=o(function(t,e){let r=xx(t),n=document.getElementById(e.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&Zue(r,a.properties),a.links&&dO(r,a.links)}catch(i){V.error("error while parsing actor details text",i)}},"addDetails"),AGe=o(function(t,e){if(t?.properties!==void 0)return t.properties[e]},"getActorProperty"),ehe=o(function(t){if(Array.isArray(t))t.forEach(function(e){ehe(e)});else switch(t.type){case"sequenceIndex":Mt.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":fO(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(Mt.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");Mt.records.lastCreated=t.actor,fO(t.actor,t.actor,t.description,t.draw),Mt.records.createdActors.set(t.actor,Mt.records.messages.length);break;case"destroyParticipant":Mt.records.lastDestroyed=t.actor,Mt.records.destroyedActors.set(t.actor,Mt.records.messages.length);break;case"activeStart":pi(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":pi(t.actor,void 0,void 0,t.signalType);break;case"addNote":jue(t.actor,t.placement,t.text);break;case"addLinks":Kue(t.actor,t.text);break;case"addALink":CGe(t.actor,t.text);break;case"addProperties":Que(t.actor,t.text);break;case"addDetails":Jue(t.actor,t.text);break;case"addMessage":if(Mt.records.lastCreated){if(t.to!==Mt.records.lastCreated)throw new Error("The created participant "+Mt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");Mt.records.lastCreated=void 0}else if(Mt.records.lastDestroyed){if(t.to!==Mt.records.lastDestroyed&&t.from!==Mt.records.lastDestroyed)throw new Error("The destroyed participant "+Mt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");Mt.records.lastDestroyed=void 0}pi(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":aGe(t.boxData);break;case"boxEnd":SGe();break;case"loopStart":pi(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":pi(void 0,void 0,void 0,t.signalType);break;case"rectStart":pi(void 0,void 0,t.color,t.signalType);break;case"rectEnd":pi(void 0,void 0,void 0,t.signalType);break;case"optStart":pi(void 0,void 0,t.optText,t.signalType);break;case"optEnd":pi(void 0,void 0,void 0,t.signalType);break;case"altStart":pi(void 0,void 0,t.altText,t.signalType);break;case"else":pi(void 0,void 0,t.altText,t.signalType);break;case"altEnd":pi(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":kr(t.text);break;case"parStart":pi(void 0,void 0,t.parText,t.signalType);break;case"and":pi(void 0,void 0,t.parText,t.signalType);break;case"parEnd":pi(void 0,void 0,void 0,t.signalType);break;case"criticalStart":pi(void 0,void 0,t.criticalText,t.signalType);break;case"option":pi(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":pi(void 0,void 0,void 0,t.signalType);break;case"breakStart":pi(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":pi(void 0,void 0,void 0,t.signalType);break}},"apply"),pO={addActor:fO,addMessage:oGe,addSignal:pi,addLinks:Kue,addDetails:Jue,addProperties:Que,autoWrap:A0,setWrap:xGe,enableSequenceNumbers:gGe,disableSequenceNumbers:yGe,showSequenceNumbers:vGe,getMessages:uGe,getActors:fGe,getCreatedActors:dGe,getDestroyedActors:pGe,getActor:xx,getActorKeys:mGe,getActorProperty:AGe,getAccTitle:Ar,getBoxes:hGe,getDiagramTitle:Xr,setDiagramTitle:nn,getConfig:o(()=>de().sequence,"getConfig"),clear:bGe,parseMessage:wGe,parseBoxData:TGe,LINETYPE:vx,ARROWTYPE:kGe,PLACEMENT:EGe,addNote:jue,setAccTitle:kr,apply:ehe,setAccDescription:_r,getAccDescription:Lr,hasAtLeastOneBox:lGe,hasAtLeastOneBoxWithTitle:cGe}});var _Ge,rhe,nhe=R(()=>{"use strict";_Ge=o(t=>`.actor {
1244 `,"getStyles"),rhe=_Ge});var mO,gf,ahe,she,LGe,ihe,gO,DGe,RGe,bx,_0,ohe,Bc,yO,NGe,MGe,IGe,OGe,PGe,BGe,FGe,lhe,zGe,GGe,$Ge,VGe,UGe,HGe,YGe,che,WGe,vO,qGe,si,uhe=R(()=>{"use strict";rr();Qy();xr();mO=Xi(Up(),1);qs();gf=18*2,ahe="actor-top",she="actor-bottom",LGe="actor-box",ihe="actor-man",gO=o(function(t,e){return yd(t,e)},"drawRect"),DGe=o(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,s=e.actorCnt,l=e.rectData;var u="none";i&&(u="block !important");let h=t.append("g");h.attr("id","actor"+s+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),a!=null){var m=20;for(let v in a){var g=h.append("a"),y=(0,mO.sanitizeUrl)(a[v]);g.attr("xlink:href",y),g.attr("target","_blank"),qGe(n)(v,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:d}},"drawPopup"),RGe=o(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),bx=o(async function(t,e,r=null){let n=t.append("foreignObject"),i=await yh(e.text,Or()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let l=t.node().firstChild;l.setAttribute("height",s.height+2*e.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-s.width/2)).attr("y",Math.round(u.y+u.height/2-s.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f}n.attr("x",Math.round(l+Math.abs(l-u)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-s.height))}return[n]},"drawKatex"),_0=o(function(t,e){let r=0,n=0,i=e.text.split(We.lineBreakRegex),[a,s]=mc(e.fontSize),l=[],u=0,h=o(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=o(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":h=o(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":h=o(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[f,d]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(u=f*a);let p=t.append("text");p.attr("x",e.x),p.attr("y",h()),e.anchor!==void 0&&p.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&p.style("font-family",e.fontFamily),s!==void 0&&p.style("font-size",s),e.fontWeight!==void 0&&p.style("font-weight",e.fontWeight),e.fill!==void 0&&p.attr("fill",e.fill),e.class!==void 0&&p.attr("class",e.class),e.dy!==void 0?p.attr("dy",e.dy):u!==0&&p.attr("dy",u);let m=d||K_;if(e.tspan){let g=p.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(m)}else p.text(m);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),ohe=o(function(t,e){function r(i,a,s,l,u){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+l-u)+" "+(i+s-u*1.2)+","+(a+l)+" "+i+","+(a+l)}o(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,_0(t,e),n},"drawLabel"),Bc=-1,yO=o((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),s=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),NGe=o(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,l=t.append("g").lower();var u=l;n||(Bc++,Object.keys(e.links||{}).length&&!r.forceMenus&&u.attr("onclick",RGe(`actor${Bc}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+Bc).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),u=l.append("g"),e.actorCnt=Bc,e.links!=null&&u.attr("id","root-"+Bc));let h=wl();var f="actor";e.properties?.class?f=e.properties.class:h.fill="#eaeaea",n?f+=` ${she}`:f+=` ${ahe}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=f,h.rx=3,h.ry=3,h.name=e.name;let d=gO(u,h);if(e.rectData=h,e.properties?.icon){let m=e.properties.icon.trim();m.charAt(0)==="@"?EW(u,h.x+h.width-20,h.y+10,m.substr(1)):kW(u,h.x+h.width-20,h.y+10,m)}vO(r,Ni(e.description))(e.description,u,h.x,h.y,h.width,h.height,{class:`actor ${LGe}`},r);let p=e.height;if(d.node){let m=d.node().getBBox();e.height=m.height,p=m.height}return p},"drawActorTypeParticipant"),MGe=o(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,l=t.append("g").lower();n||(Bc++,l.append("line").attr("id","actor"+Bc).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Bc);let u=t.append("g"),h=ihe;n?h+=` ${she}`:h+=` ${ahe}`,u.attr("class",h),u.attr("name",e.name);let f=wl();f.x=e.x,f.y=i,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+Bc).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+Bc).attr("x1",a-gf/2).attr("y1",i+33).attr("x2",a+gf/2).attr("y2",i+33),u.append("line").attr("x1",a-gf/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),u.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+gf/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",e.x+e.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",e.width),d.attr("height",e.height);let p=u.node().getBBox();return e.height=p.height,vO(r,Ni(e.description))(e.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${ihe}`},r),e.height},"drawActorTypeActor"),IGe=o(async function(t,e,r,n){switch(e.type){case"actor":return await MGe(t,e,r,n);case"participant":return await NGe(t,e,r,n)}},"drawActor"),OGe=o(function(t,e,r){let i=t.append("g");lhe(i,e),e.name&&vO(r)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),PGe=o(function(t){return t.append("g")},"anchorElement"),BGe=o(function(t,e,r,n,i){let a=wl(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,gO(s,a)},"drawActivation"),FGe=o(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=t.append("g"),p=o(function(y,v,x,b){return d.append("line").attr("x1",y).attr("y1",v).attr("x2",x).attr("y2",b).attr("class","loopLine")},"drawLoopLine");p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(y){p(e.startx,y.y,e.stopx,y.y).style("stroke-dasharray","3, 3")});let m=Ky();m.text=r,m.x=e.startx,m.y=e.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=s||20,m.textMargin=a,m.class="labelText",ohe(d,m),m=che(),m.text=e.title,m.x=e.startx+l/2+(e.stopx-e.startx)/2,m.y=e.starty+i+a,m.anchor="middle",m.valign="middle",m.textMargin=a,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=Ni(m.text)?await bx(d,m,e):_0(d,m);if(e.sectionTitles!==void 0){for(let[y,v]of Object.entries(e.sectionTitles))if(v.message){m.text=v.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[y].y+i+a,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=e.wrap,Ni(m.text)?(e.starty=e.sections[y].y,await bx(d,m,e)):_0(d,m);let x=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,w)=>b+w));e.sections[y].height+=x-(i+a)}}return e.height=Math.round(e.stopy-e.starty),d},"drawLoop"),lhe=o(function(t,e){j3(t,e)},"drawBackgroundRect"),zGe=o(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),GGe=o(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),$Ge=o(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),VGe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),UGe=o(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),HGe=o(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),YGe=o(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),che=o(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),WGe=o(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),vO=function(){function t(a,s,l,u,h,f,d){let p=s.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(a);i(p,d)}o(t,"byText");function e(a,s,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[v,x]=mc(m),b=a.split(We.lineBreakRegex);for(let w=0;w<b.length;w++){let S=w*v-v*(b.length-1)/2,T=s.append("text").attr("x",l+h/2).attr("y",u).style("text-anchor","middle").style("font-size",x).style("font-weight",y).style("font-family",g);T.append("tspan").attr("x",l+h/2).attr("dy",S).text(b[w]),T.attr("y",u+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(T,d)}}o(e,"byTspan");function r(a,s,l,u,h,f,d,p){let m=s.append("switch"),y=m.append("foreignObject").attr("x",l).attr("y",u).attr("width",h).attr("height",f).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,m,l,u,h,f,d,p),i(y,d)}o(r,"byFo");async function n(a,s,l,u,h,f,d,p){let m=await Zf(a,Or()),g=s.append("switch"),v=g.append("foreignObject").attr("x",l+h/2-m.width/2).attr("y",u+f/2-m.height/2).attr("width",m.width).attr("height",m.height).append("xhtml:div").style("height","100%").style("width","100%");v.append("div").style("text-align","center").style("vertical-align","middle").html(await yh(a,Or())),e(a,g,l,u,h,f,d,p),i(v,d)}o(n,"byKatex");function i(a,s){for(let l in s)s.hasOwnProperty(l)&&a.attr(l,s[l])}return o(i,"_setTextAttrs"),function(a,s=!1){return s?n:a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),qGe=function(){function t(i,a,s,l,u,h,f){let d=a.append("text").attr("x",s).attr("y",l).style("text-anchor","start").text(i);n(d,f)}o(t,"byText");function e(i,a,s,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,y=i.split(We.lineBreakRegex);for(let v=0;v<y.length;v++){let x=v*p-p*(y.length-1)/2,b=a.append("text").attr("x",s).attr("y",l).style("text-anchor","start").style("font-size",p).style("font-weight",g).style("font-family",m);b.append("tspan").attr("x",s).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f)}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f)}o(r,"byFo");function n(i,a){for(let s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),si={drawRect:gO,drawText:_0,drawLabel:ohe,drawActor:IGe,drawBox:OGe,drawPopup:DGe,anchorElement:PGe,drawActivation:BGe,drawLoop:FGe,drawBackgroundRect:lhe,insertArrowHead:VGe,insertArrowFilledHead:UGe,insertSequenceNumber:HGe,insertArrowCrossHead:YGe,insertDatabaseIcon:zGe,insertComputerIcon:GGe,insertClockIcon:$Ge,getTextObj:che,getNoteRect:WGe,fixLifeLineHeights:yO,sanitizeUrl:mO.sanitizeUrl}});async function jGe(t,e){Ke.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=We.splitBreaks(i).length,s=Ni(i),l=s?await Zf(i,de()):Lt.calculateTextDimensions(i,L0(Ne));if(!s){let d=l.height/a;e.height+=d,Ke.bumpVerticalPos(d)}let u,h=l.height-10,f=l.width;if(r===n){u=Ke.getVerticalPos()+h,Ne.rightAngles||(h+=Ne.boxMargin,u=Ke.getVerticalPos()+h),h+=30;let d=We.getMax(f/2,Ne.width/2);Ke.insert(r-d,Ke.getVerticalPos()-10+h,n+d,Ke.getVerticalPos()+30+h)}else h+=Ne.boxMargin,u=Ke.getVerticalPos()+h,Ke.insert(r,u-10,n,u);return Ke.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Ke.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u}function Fc(t,e,r,n,i){Ke.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,l=L0(Ne);e.message=Lt.wrapLabel(`[${e.message}]`,s-2*Ne.wrapPadding,l),e.width=s,e.wrap=!0;let u=Lt.calculateTextDimensions(e.message,l),h=We.getMax(u.height,Ne.labelBoxHeight);a=n+h,V.debug(`${h} - ${e.message}`)}i(e),Ke.bumpVerticalPos(a)}function ZGe(t,e,r,n,i,a,s){function l(h,f){h.x<i.get(t.from).x?(Ke.insert(e.stopx-f,e.starty,e.startx,e.stopy+h.height/2+Ne.noteMargin),e.stopx=e.stopx+f):(Ke.insert(e.startx,e.starty,e.stopx+f,e.stopy+h.height/2+Ne.noteMargin),e.stopx=e.stopx-f)}o(l,"receiverAdjustment");function u(h,f){h.x<i.get(t.to).x?(Ke.insert(e.startx-f,e.starty,e.stopx,e.stopy+h.height/2+Ne.noteMargin),e.startx=e.startx+f):(Ke.insert(e.stopx,e.starty,e.startx+f,e.stopy+h.height/2+Ne.noteMargin),e.startx=e.startx-f)}if(o(u,"senderAdjustment"),a.get(t.to)==n){let h=i.get(t.to),f=h.type=="actor"?gf/2+3:h.width/2+3;l(h,f),h.starty=r-h.height/2,Ke.bumpVerticalPos(h.height/2)}else if(s.get(t.from)==n){let h=i.get(t.from);if(Ne.mirrorActors){let f=h.type=="actor"?gf/2:h.width/2;u(h,f)}h.stopy=r-h.height/2,Ke.bumpVerticalPos(h.height/2)}else if(s.get(t.to)==n){let h=i.get(t.to);if(Ne.mirrorActors){let f=h.type=="actor"?gf/2+3:h.width/2+3;l(h,f)}h.stopy=r-h.height/2,Ke.bumpVerticalPos(h.height/2)}}async function e$e(t,e,r){let n={};for(let i of e)if(t.get(i.to)&&t.get(i.from)){let a=t.get(i.to);if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)continue;let s=i.placement!==void 0,l=!s,u=s?Pg(Ne):L0(Ne),h=i.wrap?Lt.wrapLabel(i.message,Ne.width-2*Ne.wrapPadding,u):i.message,d=(Ni(h)?await Zf(i.message,de()):Lt.calculateTextDimensions(h,u)).width+2*Ne.wrapPadding;l&&i.from===a.nextActor?n[i.to]=We.getMax(n[i.to]||0,d):l&&i.from===a.prevActor?n[i.from]=We.getMax(n[i.from]||0,d):l&&i.from===i.to?(n[i.from]=We.getMax(n[i.from]||0,d/2),n[i.to]=We.getMax(n[i.to]||0,d/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=We.getMax(n[i.from]||0,d):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=We.getMax(n[a.prevActor]||0,d):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=We.getMax(n[a.prevActor]||0,d/2)),a.nextActor&&(n[i.from]=We.getMax(n[i.from]||0,d/2)))}return V.debug("maxMessageWidthPerActor:",n),n}async function r$e(t,e,r){let n=0;for(let a of t.keys()){let s=t.get(a);s.wrap&&(s.description=Lt.wrapLabel(s.description,Ne.width-2*Ne.wrapPadding,xO(Ne)));let l=Ni(s.description)?await Zf(s.description,de()):Lt.calculateTextDimensions(s.description,xO(Ne));s.width=s.wrap?Ne.width:We.getMax(Ne.width,l.width+2*Ne.wrapPadding),s.height=s.wrap?We.getMax(l.height,Ne.height):Ne.height,n=We.getMax(n,s.height)}for(let a in e){let s=t.get(a);if(!s)continue;let l=t.get(s.nextActor);if(!l){let d=e[a]+Ne.actorMargin-s.width/2;s.margin=We.getMax(d,Ne.actorMargin);continue}let h=e[a]+Ne.actorMargin-s.width/2-l.width/2;s.margin=We.getMax(h,Ne.actorMargin)}let i=0;return r.forEach(a=>{let s=L0(Ne),l=a.actorKeys.reduce((f,d)=>f+=t.get(d).width+(t.get(d).margin||0),0);l-=2*Ne.boxTextMargin,a.wrap&&(a.name=Lt.wrapLabel(a.name,l-2*Ne.wrapPadding,s));let u=Lt.calculateTextDimensions(a.name,s);i=We.getMax(u.height,i);let h=We.getMax(l,u.width+2*Ne.wrapPadding);if(a.margin=Ne.boxTextMargin,l<h){let f=(h-l)/2;a.margin+=f}}),r.forEach(a=>a.textMaxHeight=i),We.getMax(n,Ne.height)}var Ne,Ke,XGe,L0,Pg,xO,KGe,QGe,bO,fhe,dhe,bE,hhe,JGe,t$e,n$e,i$e,a$e,phe,mhe=R(()=>{"use strict";Zt();uhe();ut();rr();Qy();_t();cp();xr();Yn();Ne={},Ke={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:o(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:o(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:o(function(t){this.boxes.push(t)},"addBox"),addActor:o(function(t){this.actors.push(t)},"addActor"),addLoop:o(function(t){this.loops.push(t)},"addLoop"),addMessage:o(function(t){this.messages.push(t)},"addMessage"),addNote:o(function(t){this.notes.push(t)},"addNote"),lastActor:o(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:o(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:o(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:o(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:o(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,dhe(de())},"init"),updateVal:o(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:o(function(t,e,r,n){let i=this,a=0;function s(l){return o(function(h){a++;let f=i.sequenceItems.length-a+1;i.updateVal(h,"starty",e-f*Ne.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*Ne.boxMargin,Math.max),i.updateVal(Ke.data,"startx",t-f*Ne.boxMargin,Math.min),i.updateVal(Ke.data,"stopx",r+f*Ne.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",t-f*Ne.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*Ne.boxMargin,Math.max),i.updateVal(Ke.data,"starty",e-f*Ne.boxMargin,Math.min),i.updateVal(Ke.data,"stopy",n+f*Ne.boxMargin,Math.max))},"updateItemBounds")}o(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:o(function(t,e,r,n){let i=We.getMin(t,r),a=We.getMax(t,r),s=We.getMin(e,n),l=We.getMax(e,n);this.updateVal(Ke.data,"startx",i,Math.min),this.updateVal(Ke.data,"starty",s,Math.min),this.updateVal(Ke.data,"stopx",a,Math.max),this.updateVal(Ke.data,"stopy",l,Math.max),this.updateBounds(i,s,a,l)},"insert"),newActivation:o(function(t,e,r){let n=r.get(t.from),i=bE(t.from).length||0,a=n.x+n.width/2+(i-1)*Ne.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ne.activationWidth,stopy:void 0,actor:t.from,anchored:si.anchorElement(e)})},"newActivation"),endActivation:o(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:o(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:o(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:o(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:o(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:o(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Ke.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:o(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:o(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:o(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=We.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos},"getVerticalPos"),getBounds:o(function(){return{bounds:this.data,models:this.models}},"getBounds")},XGe=o(async function(t,e){Ke.bumpVerticalPos(Ne.boxMargin),e.height=Ne.boxMargin,e.starty=Ke.getVerticalPos();let r=wl();r.x=e.startx,r.y=e.starty,r.width=e.width||Ne.width,r.class="note";let n=t.append("g"),i=si.drawRect(n,r),a=Ky();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ne.noteFontFamily,a.fontSize=Ne.noteFontSize,a.fontWeight=Ne.noteFontWeight,a.anchor=Ne.noteAlign,a.textMargin=Ne.noteMargin,a.valign="center";let s=Ni(a.text)?await bx(n,a):_0(n,a),l=Math.round(s.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*Ne.noteMargin),e.height+=l+2*Ne.noteMargin,Ke.bumpVerticalPos(l+2*Ne.noteMargin),e.stopy=e.starty+l+2*Ne.noteMargin,e.stopx=e.startx+r.width,Ke.insert(e.startx,e.starty,e.stopx,e.stopy),Ke.models.addNote(e)},"drawNote"),L0=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Pg=o(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),xO=o(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");o(jGe,"boundMessage");KGe=o(async function(t,e,r,n){let{startx:i,stopx:a,starty:s,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=e,d=Lt.calculateTextDimensions(l,L0(Ne)),p=Ky();p.x=i,p.y=s+10,p.width=a-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=Ne.messageFontFamily,p.fontSize=Ne.messageFontSize,p.fontWeight=Ne.messageFontWeight,p.anchor=Ne.messageAlign,p.valign="center",p.textMargin=Ne.wrapPadding,p.tspan=!1,Ni(p.text)?await bx(t,p,{startx:i,stopx:a,starty:r}):_0(t,p);let m=d.width,g;i===a?Ne.rightAngles?g=t.append("path").attr("d",`M ${i},${r} H ${i+We.getMax(Ne.width/2,m/2)} V ${r+25} H ${i}`):g=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",a),g.attr("y2",r)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";Ne.arrowMarkerAbsolute&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||Ne.showSequenceNumbers)&&(g.attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},"drawMessage"),QGe=o(function(t,e,r,n,i,a,s){let l=0,u=0,h,f=0;for(let d of n){let p=e.get(d),m=p.box;h&&h!=m&&(s||Ke.models.addBox(h),u+=Ne.boxMargin+h.margin),m&&m!=h&&(s||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||Ne.width,p.height=We.getMax(p.height||Ne.height,Ne.height),p.margin=p.margin||Ne.actorMargin,f=We.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Ke.getVerticalPos(),Ke.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Ke.models.addActor(p)}h&&!s&&Ke.models.addBox(h),Ke.bumpVerticalPos(f)},"addActorRenderingData"),bO=o(async function(t,e,r,n){if(n){let i=0;Ke.bumpVerticalPos(Ne.boxMargin*2);for(let a of r){let s=e.get(a);s.stopy||(s.stopy=Ke.getVerticalPos());let l=await si.drawActor(t,s,Ne,!0);i=We.getMax(i,l)}Ke.bumpVerticalPos(i+Ne.boxMargin)}else for(let i of r){let a=e.get(i);await si.drawActor(t,a,Ne,!1)}},"drawActors"),fhe=o(function(t,e,r,n){let i=0,a=0;for(let s of r){let l=e.get(s),u=t$e(l),h=si.drawPopup(t,l,u,Ne,Ne.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>a&&(a=h.width+l.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),dhe=o(function(t){On(Ne,t),t.fontFamily&&(Ne.actorFontFamily=Ne.noteFontFamily=Ne.messageFontFamily=t.fontFamily),t.fontSize&&(Ne.actorFontSize=Ne.noteFontSize=Ne.messageFontSize=t.fontSize),t.fontWeight&&(Ne.actorFontWeight=Ne.noteFontWeight=Ne.messageFontWeight=t.fontWeight)},"setConf"),bE=o(function(t){return Ke.activations.filter(function(e){return e.actor===t})},"actorActivations"),hhe=o(function(t,e){let r=e.get(t),n=bE(t),i=n.reduce(function(s,l){return We.getMin(s,l.startx)},r.x+r.width/2-1),a=n.reduce(function(s,l){return We.getMax(s,l.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");o(Fc,"adjustLoopHeightForWrap");o(ZGe,"adjustCreatedDestroyedData");JGe=o(async function(t,e,r,n){let{securityLevel:i,sequence:a}=de();Ne=a;let s;i==="sandbox"&&(s=$e("#i"+e));let l=i==="sandbox"?$e(s.nodes()[0].contentDocument.body):$e("body"),u=i==="sandbox"?s.nodes()[0].contentDocument:document;Ke.init(),V.debug(n.db);let h=i==="sandbox"?l.select(`[id="${e}"]`):$e(`[id="${e}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),v=n.db.getDiagramTitle(),x=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),w=await e$e(f,y,n);if(Ne.height=await r$e(f,w,m),si.insertComputerIcon(h),si.insertDatabaseIcon(h),si.insertClockIcon(h),x&&(Ke.bumpVerticalPos(Ne.boxMargin),b&&Ke.bumpVerticalPos(m[0].textMaxHeight)),Ne.hideUnusedParticipants===!0){let F=new Set;y.forEach(B=>{F.add(B.from),F.add(B.to)}),g=g.filter(B=>F.has(B))}QGe(h,f,d,g,0,y,!1);let S=await a$e(y,f,w,n);si.insertArrowHead(h),si.insertArrowCrossHead(h),si.insertArrowFilledHead(h),si.insertSequenceNumber(h);function T(F,B){let $=Ke.endActivation(F);$.starty+18>B&&($.starty=B-6,B+=12),si.drawActivation(h,$,B,Ne,bE(F.from).length),Ke.insert($.startx,B-10,$.stopx,B)}o(T,"activeEnd");let E=1,_=1,A=[],L=[],M=0;for(let F of y){let B,$,z;switch(F.type){case n.db.LINETYPE.NOTE:Ke.resetVerticalPos(),$=F.noteModel,await XGe(h,$);break;case n.db.LINETYPE.ACTIVE_START:Ke.newActivation(F,h,f);break;case n.db.LINETYPE.ACTIVE_END:T(F,Ke.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,Y=>Ke.newLoop(Y));break;case n.db.LINETYPE.LOOP_END:B=Ke.endLoop(),await si.drawLoop(h,B,"loop",Ne),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos()),Ke.models.addLoop(B);break;case n.db.LINETYPE.RECT_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin,Y=>Ke.newLoop(void 0,Y.message));break;case n.db.LINETYPE.RECT_END:B=Ke.endLoop(),L.push(B),Ke.models.addLoop(B),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,Y=>Ke.newLoop(Y));break;case n.db.LINETYPE.OPT_END:B=Ke.endLoop(),await si.drawLoop(h,B,"opt",Ne),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos()),Ke.models.addLoop(B);break;case n.db.LINETYPE.ALT_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,Y=>Ke.newLoop(Y));break;case n.db.LINETYPE.ALT_ELSE:Fc(S,F,Ne.boxMargin+Ne.boxTextMargin,Ne.boxMargin,Y=>Ke.addSectionToLoop(Y));break;case n.db.LINETYPE.ALT_END:B=Ke.endLoop(),await si.drawLoop(h,B,"alt",Ne),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos()),Ke.models.addLoop(B);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,Y=>Ke.newLoop(Y)),Ke.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Fc(S,F,Ne.boxMargin+Ne.boxTextMargin,Ne.boxMargin,Y=>Ke.addSectionToLoop(Y));break;case n.db.LINETYPE.PAR_END:B=Ke.endLoop(),await si.drawLoop(h,B,"par",Ne),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos()),Ke.models.addLoop(B);break;case n.db.LINETYPE.AUTONUMBER:E=F.message.start||E,_=F.message.step||_,F.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,Y=>Ke.newLoop(Y));break;case n.db.LINETYPE.CRITICAL_OPTION:Fc(S,F,Ne.boxMargin+Ne.boxTextMargin,Ne.boxMargin,Y=>Ke.addSectionToLoop(Y));break;case n.db.LINETYPE.CRITICAL_END:B=Ke.endLoop(),await si.drawLoop(h,B,"critical",Ne),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos()),Ke.models.addLoop(B);break;case n.db.LINETYPE.BREAK_START:Fc(S,F,Ne.boxMargin,Ne.boxMargin+Ne.boxTextMargin,Y=>Ke.newLoop(Y));break;case n.db.LINETYPE.BREAK_END:B=Ke.endLoop(),await si.drawLoop(h,B,"break",Ne),Ke.bumpVerticalPos(B.stopy-Ke.getVerticalPos()),Ke.models.addLoop(B);break;default:try{z=F.msgModel,z.starty=Ke.getVerticalPos(),z.sequenceIndex=E,z.sequenceVisible=n.db.showSequenceNumbers();let Y=await jGe(h,z);ZGe(F,z,Y,M,f,d,p),A.push({messageModel:z,lineStartY:Y}),Ke.models.addMessage(z)}catch(Y){V.error("error while drawing message",Y)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(F.type)&&(E=E+_),M++}V.debug("createdActors",d),V.debug("destroyedActors",p),await bO(h,f,g,!1);for(let F of A)await KGe(h,F.messageModel,F.lineStartY,n);Ne.mirrorActors&&await bO(h,f,g,!0),L.forEach(F=>si.drawBackgroundRect(h,F)),yO(h,f,g,Ne);for(let F of Ke.models.boxes)F.height=Ke.getVerticalPos()-F.y,Ke.insert(F.x,F.y,F.x+F.width,F.height),F.startx=F.x,F.starty=F.y,F.stopx=F.startx+F.width,F.stopy=F.starty+F.height,F.stroke="rgb(0,0,0, 0.5)",si.drawBox(h,F,Ne);x&&Ke.bumpVerticalPos(Ne.boxMargin);let N=fhe(h,f,g,u),{bounds:k}=Ke.getBounds();k.startx===void 0&&(k.startx=0),k.starty===void 0&&(k.starty=0),k.stopx===void 0&&(k.stopx=0),k.stopy===void 0&&(k.stopy=0);let I=k.stopy-k.starty;I<N.maxHeight&&(I=N.maxHeight);let C=I+2*Ne.diagramMarginY;Ne.mirrorActors&&(C=C-Ne.boxMargin+Ne.bottomMarginAdj);let O=k.stopx-k.startx;O<N.maxWidth&&(O=N.maxWidth);let D=O+2*Ne.diagramMarginX;v&&h.append("text").text(v).attr("x",(k.stopx-k.startx)/2-2*Ne.diagramMarginX).attr("y",-25),Sr(h,C,D,Ne.useMaxWidth);let P=v?40:0;h.attr("viewBox",k.startx-Ne.diagramMarginX+" -"+(Ne.diagramMarginY+P)+" "+D+" "+(C+P)),V.debug("models:",Ke.models)},"draw");o(e$e,"getMaxMessageWidthPerActor");t$e=o(function(t){let e=0,r=xO(Ne);for(let n in t.links){let a=Lt.calculateTextDimensions(n,r).width+2*Ne.wrapPadding+2*Ne.boxMargin;e<a&&(e=a)}return e},"getRequiredPopupWidth");o(r$e,"calculateActorMargins");n$e=o(async function(t,e,r){let n=e.get(t.from),i=e.get(t.to),a=n.x,s=i.x,l=t.wrap&&t.message,u=Ni(t.message)?await Zf(t.message,de()):Lt.calculateTextDimensions(l?Lt.wrapLabel(t.message,Ne.width,Pg(Ne)):t.message,Pg(Ne)),h={width:l?Ne.width:We.getMax(Ne.width,u.width+2*Ne.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(h.width=l?We.getMax(Ne.width,u.width):We.getMax(n.width/2+i.width/2,u.width+2*Ne.noteMargin),h.startx=a+(n.width+Ne.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(h.width=l?We.getMax(Ne.width,u.width+2*Ne.noteMargin):We.getMax(n.width/2+i.width/2,u.width+2*Ne.noteMargin),h.startx=a-h.width+(n.width-Ne.actorMargin)/2):t.to===t.from?(u=Lt.calculateTextDimensions(l?Lt.wrapLabel(t.message,We.getMax(Ne.width,n.width),Pg(Ne)):t.message,Pg(Ne)),h.width=l?We.getMax(Ne.width,n.width):We.getMax(n.width,Ne.width,u.width+2*Ne.noteMargin),h.startx=a+(n.width-h.width)/2):(h.width=Math.abs(a+n.width/2-(s+i.width/2))+Ne.actorMargin,h.startx=a<s?a+n.width/2-Ne.actorMargin/2:s+i.width/2-Ne.actorMargin/2),l&&(h.message=Lt.wrapLabel(t.message,h.width-2*Ne.wrapPadding,Pg(Ne))),V.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${t.message}]`),h},"buildNoteModel"),i$e=o(function(t,e,r){if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};let[n,i]=hhe(t.from,e),[a,s]=hhe(t.to,e),l=n<=a,u=l?i:n,h=l?a:s,f=Math.abs(a-s)>2,d=o(y=>l?-y:y,"adjustValue");t.from===t.to?h=u:(t.activate&&!f&&(h+=d(Ne.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(u-=d(3)));let p=[n,i,a,s],m=Math.abs(u-h);t.wrap&&t.message&&(t.message=Lt.wrapLabel(t.message,We.getMax(m+2*Ne.wrapPadding,Ne.width),L0(Ne)));let g=Lt.calculateTextDimensions(t.message,L0(Ne));return{width:We.getMax(t.wrap?0:g.width+2*Ne.wrapPadding,m+2*Ne.wrapPadding,Ne.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),a$e=o(async function(t,e,r,n){let i={},a=[],s,l,u;for(let h of t){switch(h.id=Lt.random({length:10}),h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(s=a.pop(),i[s.id]=s,i[h.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let d=e.get(h.from?h.from:h.to.actor),p=bE(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*Ne.activationWidth/2,g={startx:m,stopx:m+Ne.activationWidth,actor:h.from,enabled:!0};Ke.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let d=Ke.activations.map(p=>p.actor).lastIndexOf(h.from);Ke.activations.splice(d,1).splice(0,1)}break}h.placement!==void 0?(l=await n$e(h,e,n),h.noteModel=l,a.forEach(d=>{s=d,s.from=We.getMin(s.from,l.startx),s.to=We.getMax(s.to,l.startx+l.width),s.width=We.getMax(s.width,Math.abs(s.from-s.to))-Ne.labelBoxWidth})):(u=i$e(h,e,n),h.msgModel=u,u.startx&&u.stopx&&a.length>0&&a.forEach(d=>{if(s=d,u.startx===u.stopx){let p=e.get(h.from),m=e.get(h.to);s.from=We.getMin(p.x-u.width/2,p.x-p.width/2,s.from),s.to=We.getMax(m.x+u.width/2,m.x+p.width/2,s.to),s.width=We.getMax(s.width,Math.abs(s.to-s.from))-Ne.labelBoxWidth}else s.from=We.getMin(u.startx,s.from),s.to=We.getMax(u.stopx,s.to),s.width=We.getMax(s.width,u.width)-Ne.labelBoxWidth}))}return Ke.activations=[],V.debug("Loop type widths:",i),i},"calculateLoopBounds"),phe={bounds:Ke,drawActors:bO,drawActorsPopup:fhe,setConf:dhe,draw:JGe}});var ghe={};hr(ghe,{diagram:()=>s$e});var s$e,yhe=R(()=>{"use strict";que();the();nhe();mhe();s$e={parser:Wue,db:pO,renderer:phe,styles:rhe,init:o(({wrap:t})=>{pO.setWrap(t)},"init")}});var wO,wE,TO=R(()=>{"use strict";wO=function(){var t=o(function(Pe,_e,me,W){for(me=me||{},W=Pe.length;W--;me[Pe[W]]=_e);return me},"o"),e=[1,17],r=[1,18],n=[1,19],i=[1,39],a=[1,40],s=[1,25],l=[1,23],u=[1,24],h=[1,31],f=[1,32],d=[1,33],p=[1,34],m=[1,35],g=[1,36],y=[1,26],v=[1,27],x=[1,28],b=[1,29],w=[1,43],S=[1,30],T=[1,42],E=[1,44],_=[1,41],A=[1,45],L=[1,9],M=[1,8,9],N=[1,56],k=[1,57],I=[1,58],C=[1,59],O=[1,60],D=[1,61],P=[1,62],F=[1,8,9,39],B=[1,74],$=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],z=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],Y=[13,74,80,95,97,98],Q=[13,64,65,74,80,95,97,98],X=[13,59,60,61,62,63,74,80,95,97,98],ie=[1,93],j=[1,110],J=[1,108],Z=[1,102],H=[1,103],q=[1,104],K=[1,105],se=[1,106],ce=[1,107],ue=[1,109],te=[1,8,9,37,39,42],De=[1,8,9,21],oe=[1,8,9,78],ke=[1,8,9,21,73,74,78,80,81,82,83,84,85],Ie={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:o(function(_e,me,W,fe,ge,re,he){var ne=re.length-1;switch(ge){case 8:this.$=re[ne-1];break;case 9:case 11:case 12:this.$=re[ne];break;case 10:case 13:this.$=re[ne-1]+re[ne];break;case 14:case 15:this.$=re[ne-1]+"~"+re[ne]+"~";break;case 16:fe.addRelation(re[ne]);break;case 17:re[ne-1].title=fe.cleanupLabel(re[ne]),fe.addRelation(re[ne-1]);break;case 27:this.$=re[ne].trim(),fe.setAccTitle(this.$);break;case 28:case 29:this.$=re[ne].trim(),fe.setAccDescription(this.$);break;case 30:fe.addClassesToNamespace(re[ne-3],re[ne-1]);break;case 31:fe.addClassesToNamespace(re[ne-4],re[ne-1]);break;case 32:this.$=re[ne],fe.addNamespace(re[ne]);break;case 33:this.$=[re[ne]];break;case 34:this.$=[re[ne-1]];break;case 35:re[ne].unshift(re[ne-2]),this.$=re[ne];break;case 37:fe.setCssClass(re[ne-2],re[ne]);break;case 38:fe.addMembers(re[ne-3],re[ne-1]);break;case 39:fe.setCssClass(re[ne-5],re[ne-3]),fe.addMembers(re[ne-5],re[ne-1]);break;case 40:this.$=re[ne],fe.addClass(re[ne]);break;case 41:this.$=re[ne-1],fe.addClass(re[ne-1]),fe.setClassLabel(re[ne-1],re[ne]);break;case 42:fe.addAnnotation(re[ne],re[ne-2]);break;case 43:this.$=[re[ne]];break;case 44:re[ne].push(re[ne-1]),this.$=re[ne];break;case 45:break;case 46:fe.addMember(re[ne-1],fe.cleanupLabel(re[ne]));break;case 47:break;case 48:break;case 49:this.$={id1:re[ne-2],id2:re[ne],relation:re[ne-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:re[ne-3],id2:re[ne],relation:re[ne-1],relationTitle1:re[ne-2],relationTitle2:"none"};break;case 51:this.$={id1:re[ne-3],id2:re[ne],relation:re[ne-2],relationTitle1:"none",relationTitle2:re[ne-1]};break;case 52:this.$={id1:re[ne-4],id2:re[ne],relation:re[ne-2],relationTitle1:re[ne-3],relationTitle2:re[ne-1]};break;case 53:fe.addNote(re[ne],re[ne-1]);break;case 54:fe.addNote(re[ne]);break;case 55:fe.setDirection("TB");break;case 56:fe.setDirection("BT");break;case 57:fe.setDirection("RL");break;case 58:fe.setDirection("LR");break;case 59:this.$={type1:re[ne-2],type2:re[ne],lineType:re[ne-1]};break;case 60:this.$={type1:"none",type2:re[ne],lineType:re[ne-1]};break;case 61:this.$={type1:re[ne-1],type2:"none",lineType:re[ne]};break;case 62:this.$={type1:"none",type2:"none",lineType:re[ne]};break;case 63:this.$=fe.relationType.AGGREGATION;break;case 64:this.$=fe.relationType.EXTENSION;break;case 65:this.$=fe.relationType.COMPOSITION;break;case 66:this.$=fe.relationType.DEPENDENCY;break;case 67:this.$=fe.relationType.LOLLIPOP;break;case 68:this.$=fe.lineType.LINE;break;case 69:this.$=fe.lineType.DOTTED_LINE;break;case 70:case 76:this.$=re[ne-2],fe.setClickEvent(re[ne-1],re[ne]);break;case 71:case 77:this.$=re[ne-3],fe.setClickEvent(re[ne-2],re[ne-1]),fe.setTooltip(re[ne-2],re[ne]);break;case 72:this.$=re[ne-2],fe.setLink(re[ne-1],re[ne]);break;case 73:this.$=re[ne-3],fe.setLink(re[ne-2],re[ne-1],re[ne]);break;case 74:this.$=re[ne-3],fe.setLink(re[ne-2],re[ne-1]),fe.setTooltip(re[ne-2],re[ne]);break;case 75:this.$=re[ne-4],fe.setLink(re[ne-3],re[ne-2],re[ne]),fe.setTooltip(re[ne-3],re[ne-1]);break;case 78:this.$=re[ne-3],fe.setClickEvent(re[ne-2],re[ne-1],re[ne]);break;case 79:this.$=re[ne-4],fe.setClickEvent(re[ne-3],re[ne-2],re[ne-1]),fe.setTooltip(re[ne-3],re[ne]);break;case 80:this.$=re[ne-3],fe.setLink(re[ne-2],re[ne]);break;case 81:this.$=re[ne-4],fe.setLink(re[ne-3],re[ne-1],re[ne]);break;case 82:this.$=re[ne-4],fe.setLink(re[ne-3],re[ne-1]),fe.setTooltip(re[ne-3],re[ne]);break;case 83:this.$=re[ne-5],fe.setLink(re[ne-4],re[ne-2],re[ne]),fe.setTooltip(re[ne-4],re[ne-1]);break;case 84:this.$=re[ne-2],fe.setCssStyle(re[ne-1],re[ne]);break;case 85:fe.setCssClass(re[ne-1],re[ne]);break;case 86:this.$=[re[ne]];break;case 87:re[ne-2].push(re[ne]),this.$=re[ne-2];break;case 89:this.$=re[ne-1]+re[ne];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:r,35:n,36:21,40:i,41:22,44:a,45:s,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:w,76:S,80:T,95:E,97:_,98:A},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(L,[2,5],{8:[1,46]}),{8:[1,47]},t(M,[2,16],{21:[1,48]}),t(M,[2,18]),t(M,[2,19]),t(M,[2,20]),t(M,[2,21]),t(M,[2,22]),t(M,[2,23]),t(M,[2,24]),t(M,[2,25]),t(M,[2,26]),{32:[1,49]},{34:[1,50]},t(M,[2,29]),t(M,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:N,60:k,61:I,62:C,63:O,64:D,65:P}),{37:[1,63]},t(F,[2,36],{37:[1,65],42:[1,64]}),t(M,[2,47]),t(M,[2,48]),{16:66,74:w,80:T,95:E,97:_},{16:37,17:67,18:38,74:w,80:T,95:E,97:_,98:A},{16:37,17:68,18:38,74:w,80:T,95:E,97:_,98:A},{16:37,17:69,18:38,74:w,80:T,95:E,97:_,98:A},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:w,80:T,95:E,97:_,98:A},{13:B,51:73},t(M,[2,55]),t(M,[2,56]),t(M,[2,57]),t(M,[2,58]),t($,[2,11],{16:37,18:38,17:75,19:[1,76],74:w,80:T,95:E,97:_,98:A}),t($,[2,12],{19:[1,77]}),{15:78,16:79,74:w,80:T,95:E,97:_},{16:37,17:80,18:38,74:w,80:T,95:E,97:_,98:A},t(z,[2,112]),t(z,[2,113]),t(z,[2,114]),t(z,[2,115]),t([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),t(L,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:e,33:r,35:n,40:i,44:a,45:s,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:w,76:S,80:T,95:E,97:_,98:A}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:r,35:n,36:21,40:i,41:22,44:a,45:s,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:w,76:S,80:T,95:E,97:_,98:A},t(M,[2,17]),t(M,[2,27]),t(M,[2,28]),{13:[1,84],16:37,17:83,18:38,74:w,80:T,95:E,97:_,98:A},{49:85,57:54,58:55,59:N,60:k,61:I,62:C,63:O,64:D,65:P},t(M,[2,46]),{58:86,64:D,65:P},t(Y,[2,62],{57:87,59:N,60:k,61:I,62:C,63:O}),t(Q,[2,63]),t(Q,[2,64]),t(Q,[2,65]),t(Q,[2,66]),t(Q,[2,67]),t(X,[2,68]),t(X,[2,69]),{8:[1,89],23:90,38:88,41:22,44:a},{16:91,74:w,80:T,95:E,97:_},{43:92,47:ie},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:j,73:J,74:Z,75:99,77:100,79:101,80:H,81:q,82:K,83:se,84:ce,85:ue},{74:[1,111]},{13:B,51:112},t(M,[2,54]),t(M,[2,117]),t($,[2,13]),t($,[2,14]),t($,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:w,80:T,95:E,97:_},t(te,[2,40],{11:114,12:[1,115]}),t(L,[2,7]),{9:[1,116]},t(De,[2,49]),{16:37,17:117,18:38,74:w,80:T,95:E,97:_,98:A},{13:[1,119],16:37,17:118,18:38,74:w,80:T,95:E,97:_,98:A},t(Y,[2,61],{57:120,59:N,60:k,61:I,62:C,63:O}),t(Y,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:a},{8:[1,123],39:[2,33]},t(F,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:ie},{16:37,17:127,18:38,74:w,80:T,95:E,97:_,98:A},t(M,[2,70],{13:[1,128]}),t(M,[2,72],{13:[1,130],68:[1,129]}),t(M,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},t(M,[2,84],{78:[1,134]}),t(oe,[2,86],{79:135,21:j,73:J,74:Z,80:H,81:q,82:K,83:se,84:ce,85:ue}),t(ke,[2,88]),t(ke,[2,90]),t(ke,[2,91]),t(ke,[2,92]),t(ke,[2,93]),t(ke,[2,94]),t(ke,[2,95]),t(ke,[2,96]),t(ke,[2,97]),t(ke,[2,98]),t(M,[2,85]),t(M,[2,53]),{37:[2,10]},t(te,[2,41]),{13:[1,136]},{1:[2,4]},t(De,[2,51]),t(De,[2,50]),{16:37,17:137,18:38,74:w,80:T,95:E,97:_,98:A},t(Y,[2,59]),t(M,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:a},{43:140,47:ie},t(F,[2,38]),{39:[2,44]},t(M,[2,42]),t(M,[2,71]),t(M,[2,73]),t(M,[2,74],{68:[1,141]}),t(M,[2,77]),t(M,[2,78],{13:[1,142]}),t(M,[2,80],{13:[1,144],68:[1,143]}),{21:j,73:J,74:Z,77:145,79:101,80:H,81:q,82:K,83:se,84:ce,85:ue},t(ke,[2,89]),{14:[1,146]},t(De,[2,52]),t(M,[2,31]),{39:[2,35]},{39:[1,147]},t(M,[2,75]),t(M,[2,79]),t(M,[2,81]),t(M,[2,82],{68:[1,148]}),t(oe,[2,87],{79:135,21:j,73:J,74:Z,80:H,81:q,82:K,83:se,84:ce,85:ue}),t(te,[2,8]),t(F,[2,39]),t(M,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:o(function(_e,me){if(me.recoverable)this.trace(_e);else{var W=new Error(_e);throw W.hash=me,W}},"parseError"),parse:o(function(_e){var me=this,W=[0],fe=[],ge=[null],re=[],he=this.table,ne="",ae=0,we=0,Te=0,Ce=2,Ae=1,Ge=re.slice.call(arguments,1),Me=Object.create(this.lexer),ye={yy:{}};for(var He in this.yy)Object.prototype.hasOwnProperty.call(this.yy,He)&&(ye.yy[He]=this.yy[He]);Me.setInput(_e,ye.yy),ye.yy.lexer=Me,ye.yy.parser=this,typeof Me.yylloc>"u"&&(Me.yylloc={});var ze=Me.yylloc;re.push(ze);var Ze=Me.options&&Me.options.ranges;typeof ye.yy.parseError=="function"?this.parseError=ye.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(mt){W.length=W.length-2*mt,ge.length=ge.length-mt,re.length=re.length-mt}o(gt,"popStack");function yt(){var mt;return mt=fe.pop()||Me.lex()||Ae,typeof mt!="number"&&(mt instanceof Array&&(fe=mt,mt=fe.pop()),mt=me.symbols_[mt]||mt),mt}o(yt,"lex");for(var tt,Ye,Je,Ve,je,kt,at={},xt,it,dt,lt;;){if(Je=W[W.length-1],this.defaultActions[Je]?Ve=this.defaultActions[Je]:((tt===null||typeof tt>"u")&&(tt=yt()),Ve=he[Je]&&he[Je][tt]),typeof Ve>"u"||!Ve.length||!Ve[0]){var It="";lt=[];for(xt in he[Je])this.terminals_[xt]&&xt>Ce&&lt.push("'"+this.terminals_[xt]+"'");Me.showPosition?It="Parse error on line "+(ae+1)+`:
1249 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var me=this.next();return me||this.lex()},"lex"),begin:o(function(me){this.conditionStack.push(me)},"begin"),popState:o(function(){var me=this.conditionStack.length-1;return me>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(me){return me=this.conditionStack.length-1-Math.abs(me||0),me>=0?this.conditionStack[me]:"INITIAL"},"topState"),pushState:o(function(me){this.begin(me)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(me,W,fe,ge){var re=ge;switch(fe){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:break;case 5:break;case 6:return this.begin("acc_title"),31;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),33;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 22:this.popState();break;case 23:return 71;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;break;case 29:return this.popState(),8;break;case 30:break;case 31:return this.begin("namespace-body"),37;break;case 32:return this.popState(),39;break;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),44;break;case 38:return this.popState(),8;break;case 39:break;case 40:return this.popState(),this.popState(),39;break;case 41:return this.begin("class-body"),37;break;case 42:return this.popState(),39;break;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:return 68;case 64:return 68;case 65:return 68;case 66:return 68;case 67:return 60;case 68:return 60;case 69:return 62;case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:return 84;case 84:return 84;case 85:return 85;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:return 83;case 95:return 83;case 96:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};return Pe}();Ie.lexer=Se;function Ue(){this.yy={}}return o(Ue,"Parser"),Ue.prototype=Ie,Ie.Parser=Ue,new Ue}();wO.parser=wO;wE=wO});var bhe,wx,whe=R(()=>{"use strict";_t();rr();bhe=["#","+","~","-",""],wx=class{static{o(this,"ClassMember")}constructor(e,r){this.memberType=r,this.visibility="",this.classifier="";let n=qr(e,de());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+gh(this.id);this.memberType==="method"&&(e+=`(${gh(this.parameters.trim())})`,this.returnType&&(e+=" : "+gh(this.returnType))),e=e.trim();let r=this.parseClassifier();return{displayText:e,cssStyle:r}}parseMember(e){let r="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){let a=i[1]?i[1].trim():"";if(bhe.includes(a)&&(this.visibility=a),this.id=i[2].trim(),this.parameters=i[3]?i[3].trim():"",r=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",r===""){let s=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(s)&&(r=s,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,i=e.substring(0,1),a=e.substring(n-1);bhe.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(r=a),this.id=e.substring(this.visibility===""?0:1,r===""?n:n-1)}this.classifier=r}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}});var EE,EO,Gi,TE,The,qu,kO,Tx,D0,R0,u$e,kE,khe,h$e,f$e,d$e,p$e,m$e,g$e,y$e,Ehe,v$e,x$e,b$e,CO,w$e,T$e,k$e,E$e,C$e,S$e,A$e,_$e,Che,SO,L$e,D$e,R$e,N$e,M$e,I$e,O$e,Bg,AO=R(()=>{"use strict";Zt();ut();_t();rr();xr();bi();whe();EE="classId-",EO=[],Gi=new Map,TE=[],The=0,qu=new Map,kO=0,Tx=[],D0=o(t=>We.sanitizeText(t,de()),"sanitizeText"),R0=o(function(t){let e=We.sanitizeText(t,de()),r="",n=e;if(e.indexOf("~")>0){let i=e.split("~");n=D0(i[0]),r=D0(i[1])}return{className:n,type:r}},"splitClassNameAndType"),u$e=o(function(t,e){let r=We.sanitizeText(t,de());e&&(e=D0(e));let{className:n}=R0(r);Gi.get(n).label=e},"setClassLabel"),kE=o(function(t){let e=We.sanitizeText(t,de()),{className:r,type:n}=R0(e);if(Gi.has(r))return;let i=We.sanitizeText(r,de());Gi.set(i,{id:i,type:n,label:i,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:EE+i+"-"+The}),The++},"addClass"),khe=o(function(t){let e=We.sanitizeText(t,de());if(Gi.has(e))return Gi.get(e).domId;throw new Error("Class not found: "+e)},"lookUpDomId"),h$e=o(function(){EO=[],Gi=new Map,TE=[],Tx=[],Tx.push(Che),qu=new Map,kO=0,SO="TB",vr()},"clear"),f$e=o(function(t){return Gi.get(t)},"getClass"),d$e=o(function(){return Gi},"getClasses"),p$e=o(function(){return EO},"getRelations"),m$e=o(function(){return TE},"getNotes"),g$e=o(function(t){V.debug("Adding relation: "+JSON.stringify(t)),kE(t.id1),kE(t.id2),t.id1=R0(t.id1).className,t.id2=R0(t.id2).className,t.relationTitle1=We.sanitizeText(t.relationTitle1.trim(),de()),t.relationTitle2=We.sanitizeText(t.relationTitle2.trim(),de()),EO.push(t)},"addRelation"),y$e=o(function(t,e){let r=R0(t).className;Gi.get(r).annotations.push(e)},"addAnnotation"),Ehe=o(function(t,e){kE(t);let r=R0(t).className,n=Gi.get(r);if(typeof e=="string"){let i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(D0(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(new wx(i,"method")):i&&n.members.push(new wx(i,"attribute"))}},"addMember"),v$e=o(function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Ehe(t,r)))},"addMembers"),x$e=o(function(t,e){let r={id:`note${TE.length}`,class:e,text:t};TE.push(r)},"addNote"),b$e=o(function(t){return t.startsWith(":")&&(t=t.substring(1)),D0(t.trim())},"cleanupLabel"),CO=o(function(t,e){t.split(",").forEach(function(r){let n=r;/\d/.exec(r[0])&&(n=EE+n);let i=Gi.get(n);i&&i.cssClasses.push(e)})},"setCssClass"),w$e=o(function(t,e){t.split(",").forEach(function(r){e!==void 0&&(Gi.get(r).tooltip=D0(e))})},"setTooltip"),T$e=o(function(t,e){return e&&qu.has(e)?qu.get(e).classes.get(t).tooltip:Gi.get(t).tooltip},"getTooltip"),k$e=o(function(t,e,r){let n=de();t.split(",").forEach(function(i){let a=i;/\d/.exec(i[0])&&(a=EE+a);let s=Gi.get(a);s&&(s.link=Lt.formatUrl(e,n),n.securityLevel==="sandbox"?s.linkTarget="_top":typeof r=="string"?s.linkTarget=D0(r):s.linkTarget="_blank")}),CO(t,"clickable")},"setLink"),E$e=o(function(t,e,r){t.split(",").forEach(function(n){C$e(n,e,r),Gi.get(n).haveCallback=!0}),CO(t,"clickable")},"setClickEvent"),C$e=o(function(t,e,r){let n=We.sanitizeText(t,de());if(de().securityLevel!=="loose"||e===void 0)return;let a=n;if(Gi.has(a)){let s=khe(a),l=[];if(typeof r=="string"){l=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u<l.length;u++){let h=l[u].trim();h.startsWith('"')&&h.endsWith('"')&&(h=h.substr(1,h.length-2)),l[u]=h}}l.length===0&&l.push(s),Tx.push(function(){let u=document.querySelector(`[id="${s}"]`);u!==null&&u.addEventListener("click",function(){Lt.runFunc(e,...l)},!1)})}},"setClickFunc"),S$e=o(function(t){Tx.forEach(function(e){e(t)})},"bindFunctions"),A$e={LINE:0,DOTTED_LINE:1},_$e={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Che=o(function(t){let e=$e(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=$e("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),$e(t).select("svg").selectAll("g.node").on("mouseover",function(){let i=$e(this);if(i.attr("title")===null)return;let s=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),$e(this).classed("hover",!1)})},"setupToolTips");Tx.push(Che);SO="TB",L$e=o(()=>SO,"getDirection"),D$e=o(t=>{SO=t},"setDirection"),R$e=o(function(t){qu.has(t)||(qu.set(t,{id:t,classes:new Map,children:{},domId:EE+t+"-"+kO}),kO++)},"addNamespace"),N$e=o(function(t){return qu.get(t)},"getNamespace"),M$e=o(function(){return qu},"getNamespaces"),I$e=o(function(t,e){if(qu.has(t))for(let r of e){let{className:n}=R0(r);Gi.get(n).parent=t,qu.get(t).classes.set(n,Gi.get(n))}},"addClassesToNamespace"),O$e=o(function(t,e){let r=Gi.get(t);if(!(!e||!r))for(let n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),Bg={setAccTitle:kr,getAccTitle:Ar,getAccDescription:Lr,setAccDescription:_r,getConfig:o(()=>de().class,"getConfig"),addClass:kE,bindFunctions:S$e,clear:h$e,getClass:f$e,getClasses:d$e,getNotes:m$e,addAnnotation:y$e,addNote:x$e,getRelations:p$e,addRelation:g$e,getDirection:L$e,setDirection:D$e,addMember:Ehe,addMembers:v$e,cleanupLabel:b$e,lineType:A$e,relationType:_$e,setClickEvent:E$e,setCssClass:CO,setLink:k$e,getTooltip:T$e,setTooltip:w$e,lookUpDomId:khe,setDiagramTitle:nn,getDiagramTitle:Xr,setClassLabel:u$e,addNamespace:R$e,addClassesToNamespace:I$e,getNamespace:N$e,getNamespaces:M$e,setCssStyle:O$e}});var P$e,CE,_O=R(()=>{"use strict";P$e=o(t=>`g.classGroup text {
1403 `,"getStyles"),CE=P$e});var She,B$e,F$e,_he,z$e,Ahe,SE,Lhe=R(()=>{"use strict";Zt();xr();ut();rr();She=0,B$e=o(function(t,e,r,n,i){let a=o(function(b){switch(b){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");e.points=e.points.filter(b=>!Number.isNaN(b.y));let s=e.points,l=ha().x(function(b){return b.x}).y(function(b){return b.y}).curve(vs),u=t.append("path").attr("d",l(s)).attr("id","edge"+She).attr("class","relation"),h="";n.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),r.relation.lineType==1&&u.attr("class","relation dashed-line"),r.relation.lineType==10&&u.attr("class","relation dotted-line"),r.relation.type1!=="none"&&u.attr("marker-start","url("+h+"#"+a(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&u.attr("marker-end","url("+h+"#"+a(r.relation.type2)+"End)");let f,d,p=e.points.length,m=Lt.calcLabelPosition(e.points);f=m.x,d=m.y;let g,y,v,x;if(p%2!==0&&p>1){let b=Lt.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),w=Lt.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);V.debug("cardinality_1_point "+JSON.stringify(b)),V.debug("cardinality_2_point "+JSON.stringify(w)),g=b.x,y=b.y,v=w.x,x=w.y}if(r.title!==void 0){let b=t.append("g").attr("class","classLabel"),w=b.append("text").attr("class","label").attr("x",f).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=w;let S=w.node().getBBox();b.insert("rect",":first-child").attr("class","box").attr("x",S.x-n.padding/2).attr("y",S.y-n.padding/2).attr("width",S.width+n.padding).attr("height",S.height+n.padding)}V.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",g).attr("y",y).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",v).attr("y",x).attr("fill","black").attr("font-size","6").text(r.relationTitle2),She++},"drawEdge"),F$e=o(function(t,e,r,n){V.debug("Rendering class ",e,r);let i=e.id,a={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup"),l;e.link?l=s.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):l=s.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let u=!0;e.annotations.forEach(function(w){let S=l.append("tspan").text("\xAB"+w+"\xBB");u||S.attr("dy",r.textHeight),u=!1});let h=_he(e),f=l.append("tspan").text(h).attr("class","title");u||f.attr("dy",r.textHeight);let d=l.node().getBBox().height,p,m,g;if(e.members.length>0){p=s.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin/2).attr("y2",r.padding+d+r.dividerMargin/2);let w=s.append("text").attr("x",r.padding).attr("y",d+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");u=!0,e.members.forEach(function(S){Ahe(w,S,u,r),u=!1}),m=w.node().getBBox()}if(e.methods.length>0){g=s.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin+m.height).attr("y2",r.padding+d+r.dividerMargin+m.height);let w=s.append("text").attr("x",r.padding).attr("y",d+2*r.dividerMargin+m.height+r.textHeight).attr("fill","white").attr("class","classText");u=!0,e.methods.forEach(function(S){Ahe(w,S,u,r),u=!1})}let y=s.node().getBBox();var v=" ";e.cssClasses.length>0&&(v=v+e.cssClasses.join(" "));let b=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y.width+2*r.padding).attr("height",y.height+r.padding+.5*r.dividerMargin).attr("class",v).node().getBBox().width;return l.node().childNodes.forEach(function(w){w.setAttribute("x",(b-w.getBBox().width)/2)}),e.tooltip&&l.insert("title").text(e.tooltip),p&&p.attr("x2",b),g&&g.attr("x2",b),a.width=b,a.height=y.height+r.padding+.5*r.dividerMargin,a},"drawClass"),_he=o(function(t){let e=t.id;return t.type&&(e+="<"+gh(t.type)+">"),e},"getClassTitleString"),z$e=o(function(t,e,r,n){V.debug("Rendering note ",e,r);let i=e.id,a={id:i,text:e.text,width:0,height:0},s=t.append("g").attr("id",i).attr("class","classGroup"),l=s.append("text").attr("y",r.textHeight+r.padding).attr("x",0),u=JSON.parse(`"${e.text}"`).split(`
1404 `);u.forEach(function(p){V.debug(`Adding line: ${p}`),l.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});let h=s.node().getBBox(),d=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*r.padding).attr("height",h.height+u.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return l.node().childNodes.forEach(function(p){p.setAttribute("x",(d-p.getBBox().width)/2)}),a.width=d,a.height=h.height+u.length*r.textHeight+r.padding+.5*r.dividerMargin,a},"drawNote"),Ahe=o(function(t,e,r,n){let{displayText:i,cssStyle:a}=e.getDisplayDetails(),s=t.append("tspan").attr("x",n.padding).text(i);a!==""&&s.attr("style",e.cssStyle),r||s.attr("dy",n.textHeight)},"addTspan"),SE={getClassTitleString:_he,drawClass:F$e,drawEdge:B$e,drawNote:z$e}});var _E,AE,kx,G$e,$$e,Dhe,Rhe=R(()=>{"use strict";Zt();Vd();ya();ut();Lhe();Yn();_t();_E={},AE=20,kx=o(function(t){let e=Object.entries(_E).find(r=>r[1].label===t);if(e)return e[0]},"getGraphId"),G$e=o(function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).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","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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","compositionEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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","aggregationEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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","dependencyEnd").attr("refX",19).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")},"insertMarkers"),$$e=o(function(t,e,r,n){let i=de().class;_E={},V.info("Rendering diagram "+t);let a=de().securityLevel,s;a==="sandbox"&&(s=$e("#i"+e));let l=a==="sandbox"?$e(s.nodes()[0].contentDocument.body):$e("body"),u=l.select(`[id='${e}']`);G$e(u);let h=new lr({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});let f=n.db.getClasses(),d=[...f.keys()];for(let b of d){let w=f.get(b),S=SE.drawClass(u,w,i,n);_E[S.id]=S,h.setNode(S.id,S),V.info("Org height: "+S.height)}n.db.getRelations().forEach(function(b){V.info("tjoho"+kx(b.id1)+kx(b.id2)+JSON.stringify(b)),h.setEdge(kx(b.id1),kx(b.id2),{relation:b},b.title||"DEFAULT")}),n.db.getNotes().forEach(function(b){V.debug(`Adding note: ${JSON.stringify(b)}`);let w=SE.drawNote(u,b,i,n);_E[w.id]=w,h.setNode(w.id,w),b.class&&f.has(b.class)&&h.setEdge(b.id,kx(b.class),{relation:{id1:b.id,id2:b.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),lo(h),h.nodes().forEach(function(b){b!==void 0&&h.node(b)!==void 0&&(V.debug("Node "+b+": "+JSON.stringify(h.node(b))),l.select("#"+(n.db.lookUpDomId(b)||b)).attr("transform","translate("+(h.node(b).x-h.node(b).width/2)+","+(h.node(b).y-h.node(b).height/2)+" )"))}),h.edges().forEach(function(b){b!==void 0&&h.edge(b)!==void 0&&(V.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(h.edge(b))),SE.drawEdge(u,h.edge(b),h.edge(b).relation,i,n))});let g=u.node().getBBox(),y=g.width+AE*2,v=g.height+AE*2;Sr(u,v,y,i.useMaxWidth);let x=`${g.x-AE} ${g.y-AE} ${y} ${v}`;V.debug(`viewBox ${x}`),u.attr("viewBox",x)},"draw"),Dhe={draw:$$e}});var Nhe={};hr(Nhe,{diagram:()=>V$e});var V$e,Mhe=R(()=>{"use strict";TO();AO();_O();Rhe();V$e={parser:wE,db:Bg,renderer:Dhe,styles:CE,init:o(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Bg.clear()},"init")}});var W$e,q$e,X$e,j$e,K$e,Q$e,Z$e,J$e,eVe,tVe,rVe,LE,LO=R(()=>{"use strict";ut();W$e=o((t,e,r,n)=>{e.forEach(i=>{rVe[i](t,r,n)})},"insertMarkers"),q$e=o((t,e,r)=>{V.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"),X$e=o((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"),j$e=o((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"),K$e=o((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"),Q$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Z$e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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",12).attr("markerHeight",12).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"),J$e=o((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"),eVe=o((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"),tVe=o((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","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rVe={extension:q$e,composition:X$e,aggregation:j$e,dependency:K$e,lollipop:Q$e,point:Z$e,circle:J$e,cross:eVe,barb:tVe},LE=W$e});var tr,zl,Phe,Bhe,RE,nVe,Fhe,zhe,Fg,DE,Ghe,$he,Vhe,Uhe,Hhe=R(()=>{"use strict";ut();Pv();ya();tr={},zl={},Phe={},Bhe=o(()=>{zl={},Phe={},tr={}},"clear"),RE=o((t,e)=>(V.trace("In isDescendant",e," ",t," = ",zl[e].includes(t)),!!zl[e].includes(t)),"isDescendant"),nVe=o((t,e)=>(V.info("Descendants of ",e," is ",zl[e]),V.info("Edge is ",t),t.v===e||t.w===e?!1:zl[e]?zl[e].includes(t.v)||RE(t.v,e)||RE(t.w,e)||zl[e].includes(t.w):(V.debug("Tilt, ",e,",not in descendants"),!1)),"edgeInCluster"),Fhe=o((t,e,r,n)=>{V.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),V.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)Fhe(a,e,r,n);else{let s=e.node(a);V.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(V.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(V.debug("Setting parent",a,t),r.setParent(a,t)):(V.info("In copy ",t,"root",n,"data",e.node(t),n),V.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);V.debug("Copying Edges",l),l.forEach(u=>{V.info("Edge",u);let h=e.edge(u.v,u.w,u.name);V.info("Edge data",h,n);try{nVe(u,n)?(V.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),V.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):V.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(f){V.error(f)}})}V.debug("Removing node",a),e.removeNode(a)})},"copy"),zhe=o((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)Phe[i]=t,n=[...n,...zhe(i,e)];return n},"extractDescendants"),Fg=o((t,e)=>{V.trace("Searching",t);let r=e.children(t);if(V.trace("Searching children of id ",t,r),r.length<1)return V.trace("This is a valid node",t),t;for(let n of r){let i=Fg(n,e);if(i)return V.trace("Found replacement for",t," => ",i),i}},"findNonClusterChild"),DE=o(t=>!tr[t]||!tr[t].externalConnections?t:tr[t]?tr[t].id:t,"getAnchorId"),Ghe=o((t,e)=>{if(!t||e>10){V.debug("Opting out, no graph ");return}else V.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(V.warn("Cluster identified",r," Replacement id in edges: ",Fg(r,t)),zl[r]=zhe(r,t),tr[r]={id:Fg(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(V.debug("Cluster identified",r,zl),i.forEach(a=>{if(a.v!==r&&a.w!==r){let s=RE(a.v,r),l=RE(a.w,r);s^l&&(V.warn("Edge: ",a," leaves cluster ",r),V.warn("Descendants of XXX ",r,": ",zl[r]),tr[r].externalConnections=!0)}})):V.debug("Not a cluster ",r,zl)});for(let r of Object.keys(tr)){let n=tr[r].id,i=t.parent(n);i!==r&&tr[i]&&!tr[i].externalConnections&&(tr[r].id=i)}t.edges().forEach(function(r){let n=t.edge(r);V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(V.warn("Fix XXX",tr,"ids:",r.v,r.w,"Translating: ",tr[r.v]," --- ",tr[r.w]),tr[r.v]&&tr[r.w]&&tr[r.v]===tr[r.w]){V.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),V.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=DE(r.v),a=DE(r.w),t.removeEdge(r.v,r.w,r.name);let s=r.w+"---"+r.v;t.setNode(s,{domId:s,id:s,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});let l=structuredClone(n),u=structuredClone(n);l.label="",l.arrowTypeEnd="none",u.label="",l.fromCluster=r.v,u.toCluster=r.v,t.setEdge(i,s,l,r.name+"-cyclic-special"),t.setEdge(s,a,u,r.name+"-cyclic-special")}else if(tr[r.v]||tr[r.w]){if(V.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=DE(r.v),a=DE(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);tr[s].externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);tr[s].externalConnections=!0,n.toCluster=r.w}V.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),V.warn("Adjusted Graph",zn(t)),$he(t,0),V.trace(tr)},"adjustClustersAndEdges"),$he=o((t,e)=>{if(V.warn("extractor - ",e,zn(t),t.children("D")),e>10){V.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){V.debug("Done, no node has children",t.nodes());return}V.debug("Nodes = ",r,e);for(let i of r)if(V.debug("Extracting node",i,tr,tr[i]&&!tr[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!tr[i])V.debug("Not a cluster",i,e);else if(!tr[i].externalConnections&&t.children(i)&&t.children(i).length>0){V.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";tr[i]?.clusterData?.dir&&(s=tr[i].clusterData.dir,V.warn("Fixing dir",tr[i].clusterData.dir,s));let l=new lr({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});V.warn("Old graph before copy",zn(t)),Fhe(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:tr[i].clusterData,labelText:tr[i].labelText,graph:l}),V.warn("New graph after copy node: (",i,")",zn(l)),V.debug("Old graph after copy",zn(t))}else V.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!tr[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),V.debug(tr);r=t.nodes(),V.warn("New list of nodes",r);for(let i of r){let a=t.node(i);V.warn(" Now next level",i,a),a.clusterNode&&$he(a.graph,e+1)}},"extractor"),Vhe=o((t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(n=>{let i=t.children(n),a=Vhe(t,i);r=[...r,...a]}),r},"sorter"),Uhe=o(t=>Vhe(t,t.children()),"sortNodesByHierarchy")});var iVe,aVe,sVe,oVe,lVe,Yhe,Whe,qhe,Xhe=R(()=>{"use strict";S9();ut();bv();Al();Zt();_t();rr();_d();iVe=o((t,e)=>{V.info("Creating subgraph rect for ",e.id,e);let r=de(),n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),a=yr(r.flowchart.htmlLabels),s=n.insert("g").attr("class","cluster-label"),l=e.labelType==="markdown"?ta(s,e.labelText,{style:e.labelStyle,useHtmlLabels:a},r):s.node().appendChild(ra(e.labelText,e.labelStyle,void 0,!0)),u=l.getBBox();if(yr(r.flowchart.htmlLabels)){let g=l.children[0],y=$e(l);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}let h=0*e.padding,f=h/2,d=e.width<=u.width+h?u.width+h:e.width;e.width<=u.width+h?e.diff=(u.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,V.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-d/2).attr("y",e.y-e.height/2-f).attr("width",d).attr("height",e.height+h);let{subGraphTitleTopMargin:p}=io(r);a?s.attr("transform",`translate(${e.x-u.width/2}, ${e.y-e.height/2+p})`):s.attr("transform",`translate(${e.x}, ${e.y-e.height/2+p})`);let m=i.node().getBBox();return e.width=m.width,e.height=m.height,e.intersect=function(g){return Ad(e,g)},n},"rect"),aVe=o((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(l){return Ad(e,l)},r},"noteGroup"),sVe=o((t,e)=>{let r=de(),n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=n.insert("g").attr("class","cluster-label"),s=n.append("rect"),l=a.node().appendChild(ra(e.labelText,e.labelStyle,void 0,!0)),u=l.getBBox();if(yr(r.flowchart.htmlLabels)){let g=l.children[0],y=$e(l);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}u=l.getBBox();let h=0*e.padding,f=h/2,d=e.width<=u.width+e.padding?u.width+e.padding:e.width;e.width<=u.width+e.padding?e.diff=(u.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f).attr("width",d+h).attr("height",e.height+h),s.attr("class","inner").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f+u.height-1).attr("width",d+h).attr("height",e.height+h-u.height-3);let{subGraphTitleTopMargin:p}=io(r);a.attr("transform",`translate(${e.x-u.width/2}, ${e.y-e.height/2-e.padding/3+(yr(r.flowchart.htmlLabels)?5:3)+p})`);let m=i.node().getBBox();return e.height=m.height,e.intersect=function(g){return Ad(e,g)},n},"roundedWithTitle"),oVe=o((t,e)=>{let r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.diff=-e.padding/2,e.intersect=function(l){return Ad(e,l)},r},"divider"),lVe={rect:iVe,roundedWithTitle:sVe,noteGroup:aVe,divider:oVe},Yhe={},Whe=o((t,e)=>{V.trace("Inserting cluster");let r=e.shape||"rect";Yhe[e.id]=lVe[r](t,e)},"insertCluster"),qhe=o(()=>{Yhe={}},"clear")});var Khe,cVe,jhe,Qhe=R(()=>{"use strict";ut();Khe=o((t,e,r,n,i)=>{e.arrowTypeStart&&jhe(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&jhe(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),cVe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},jhe=o((t,e,r,n,i,a)=>{let s=cVe[r];if(!s){V.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker")});function NE(t,e){de().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}var ME,Ta,Jhe,IE,OE,uVe,hVe,Zhe,PE,DO=R(()=>{"use strict";ut();bv();Al();Zt();_t();xr();rr();j9();_d();Qhe();ME={},Ta={},Jhe=o(()=>{ME={},Ta={}},"clear"),IE=o((t,e)=>{let r=de(),n=yr(r.flowchart.htmlLabels),i=e.labelType==="markdown"?ta(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):ra(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){let h=i.children[0],f=$e(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),ME[e.id]=a,e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){let h=ra(e.startLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Ta[e.id]||(Ta[e.id]={}),Ta[e.id].startLeft=f,NE(u,e.startLabelLeft)}if(e.startLabelRight){let h=ra(e.startLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Ta[e.id]||(Ta[e.id]={}),Ta[e.id].startRight=f,NE(u,e.startLabelRight)}if(e.endLabelLeft){let h=ra(e.endLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Ta[e.id]||(Ta[e.id]={}),Ta[e.id].endLeft=f,NE(u,e.endLabelLeft)}if(e.endLabelRight){let h=ra(e.endLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Ta[e.id]||(Ta[e.id]={}),Ta[e.id].endRight=f,NE(u,e.endLabelRight)}return i},"insertEdgeLabel");o(NE,"setTerminalWidth");OE=o((t,e)=>{V.debug("Moving label abc88 ",t.id,t.label,ME[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=de(),{subGraphTitleTotalMargin:i}=io(n);if(t.label){let a=ME[t.id],s=t.x,l=t.y;if(r){let u=Lt.calcLabelPosition(r);V.debug("Moving label "+t.label+" from (",s,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,l=u.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(t.startLabelLeft){let a=Ta[t.id].startLeft,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.startLabelRight){let a=Ta[t.id].startRight,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelLeft){let a=Ta[t.id].endLeft,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelRight){let a=Ta[t.id].endRight,s=t.x,l=t.y;if(r){let u=Lt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),uVe=o((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,l=t.height/2;return i>=s||a>=l},"outsideNode"),hVe=o((t,e,r)=>{V.debug(`intersection calc abc89:
1407 node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,l=r.x<e.x?s-a:s+a,u=t.height/2,h=Math.abs(e.y-r.y),f=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*u){let d=r.y<e.y?e.y-u-i:i-u-e.y;l=f*d/h;let p={x:r.x<e.x?r.x+l:r.x-f+l,y:r.y<e.y?r.y+h-d:r.y-h+d};return l===0&&(p.x=e.x,p.y=e.y),f===0&&(p.x=e.x),h===0&&(p.y=e.y),V.debug(`abc89 topp/bott calc, Q ${h}, q ${d}, R ${f}, r ${l}`,p),p}else{r.x<e.x?l=e.x-s-n:l=n-s-e.x;let d=h*l/f,p=r.x<e.x?r.x+f-l:r.x-f+l,m=r.y<e.y?r.y+d:r.y-d;return V.debug(`sides calc abc89, Q ${h}, q ${d}, R ${f}, r ${l}`,{_x:p,_y:m}),l===0&&(p=e.x,m=e.y),f===0&&(p=e.x),h===0&&(m=e.y),{x:p,y:m}}},"intersection"),Zhe=o((t,e)=>{V.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!uVe(e,a)&&!i){let s=hVe(e,n,a),l=!1;r.forEach(u=>{l=l||u.x===s.x&&u.y===s.y}),r.some(u=>u.x===s.x&&u.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),PE=o(function(t,e,r,n,i,a,s){let l=r.points;V.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1,h=a.node(e.v);var f=a.node(e.w);f?.intersect&&h?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),l.push(f.intersect(l[l.length-1]))),r.toCluster&&(V.debug("to cluster abc88",n[r.toCluster]),l=Zhe(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(V.debug("from cluster abc88",n[r.fromCluster]),l=Zhe(l.reverse(),n[r.fromCluster].node).reverse(),u=!0);let d=l.filter(S=>!Number.isNaN(S.y)),p=vs;r.curve&&(i==="graph"||i==="flowchart")&&(p=r.curve);let{x:m,y:g}=X5(r),y=ha().x(m).y(g).curve(p),v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}let x=t.append("path").attr("d",y(d)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(de().flowchart.arrowMarkerAbsolute||de().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),Khe(x,r,b,s,i);let w={};return u&&(w.updatedPath=l),w.originalPath=r.points,w},"insertEdge")});var efe,tfe,rfe=R(()=>{"use strict";Vd();Pv();LO();N5();Hhe();M5();Xhe();DO();ut();_d();_t();efe=o(async(t,e,r,n,i,a)=>{V.info("Graph in recursive render: XXX",zn(e),i);let s=e.graph().rankdir;V.trace("Dir in recursive render - dir:",s);let l=t.insert("g").attr("class","root");e.nodes()?V.info("Recursive render XXX",e.nodes()):V.info("No nodes found for",e),e.edges().length>0&&V.trace("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(g){let y=e.node(g);if(i!==void 0){let v=JSON.parse(JSON.stringify(i.clusterData));V.info("Setting data for cluster XXX (",g,") ",v,i),e.setNode(i.id,v),e.parent(g)||(V.trace("Setting parent",g,i.id),e.setParent(g,i.id,v))}if(V.info("(Insert) Node XXX"+g+": "+JSON.stringify(e.node(g))),y?.clusterNode){V.info("Cluster identified",g,y.width,e.node(g));let{ranksep:v,nodesep:x}=e.graph();y.graph.setGraph({...y.graph.graph(),ranksep:v,nodesep:x});let b=await efe(d,y.graph,r,n,e.node(g),a),w=b.elem;kn(y,w),y.diff=b.diff||0,V.info("Node bounds (abc123)",g,y,y.width,y.x,y.y),Bj(w,y),V.warn("Recursive render complete ",w,y)}else e.children(g).length>0?(V.info("Cluster - the non recursive path XXX",g,y.id,y,e),V.info(Fg(y.id,e)),tr[y.id]={id:Fg(y.id,e),node:y}):(V.info("Node - the non recursive path",g,y.id,y),await pm(d,e.node(g),s))})),e.edges().forEach(async function(g){let y=e.edge(g.v,g.w,g.name);V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),V.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),V.info("Fix",tr,"ids:",g.v,g.w,"Translating: ",tr[g.v],tr[g.w]),await IE(f,y)}),e.edges().forEach(function(g){V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g))}),V.info("Graph before layout:",JSON.stringify(zn(e))),V.info("#############################################"),V.info("### Layout ###"),V.info("#############################################"),V.info(e),lo(e),V.info("Graph after layout:",JSON.stringify(zn(e)));let p=0,{subGraphTitleTotalMargin:m}=io(a);return Uhe(e).forEach(function(g){let y=e.node(g);V.info("Position "+g+": "+JSON.stringify(e.node(g))),V.info("Position "+g+": ("+y.x,","+y.y,") width: ",y.width," height: ",y.height),y?.clusterNode?(y.y+=m,wv(y)):e.children(g).length>0?(y.height+=m,Whe(u,y),tr[y.id].node=y):(y.y+=m/2,wv(y))}),e.edges().forEach(function(g){let y=e.edge(g);V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(y),y),y.points.forEach(x=>x.y+=m/2);let v=PE(h,g,y,tr,r,e,n);OE(y,v)}),e.nodes().forEach(function(g){let y=e.node(g);V.info(g,y.type,y.diff),y.type==="group"&&(p=y.diff)}),{elem:l,diff:p}},"recursiveRender"),tfe=o(async(t,e,r,n,i)=>{LE(t,r,n,i),Fj(),Jhe(),qhe(),Bhe(),V.warn("Graph at first:",JSON.stringify(zn(e))),Ghe(e),V.warn("Graph after:",JSON.stringify(zn(e)));let a=de();await efe(t,e,n,i,void 0,a)},"render")});function nfe(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}var NO,RO,fVe,ife,dVe,pVe,mVe,gVe,afe,sfe=R(()=>{"use strict";Zt();ya();ut();_t();rfe();xr();xr();Yn();rr();NO=o(t=>We.sanitizeText(t,de()),"sanitizeText"),RO={dividerMargin:10,padding:5,textHeight:10,curve:void 0},fVe=o(function(t,e,r,n){V.info("keys:",[...t.keys()]),V.info(t),t.forEach(function(i){let s={shape:"rect",id:i.id,domId:i.domId,labelText:NO(i.id),labelStyle:"",style:"fill: none; stroke: black",padding:de().flowchart?.padding??de().class?.padding};e.setNode(i.id,s),ife(i.classes,e,r,n,i.id),V.info("setNode",s)})},"addNamespaces"),ife=o(function(t,e,r,n,i){V.info("keys:",[...t.keys()]),V.info(t),[...t.values()].filter(a=>a.parent===i).forEach(function(a){let s=a.cssClasses.join(" "),l=lm(a.styles),u=a.label??a.id,h=0,d={labelStyle:l.labelStyle,shape:"class_box",labelText:NO(u),classData:a,rx:h,ry:h,class:s,style:l.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,i)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:de().flowchart?.padding??de().class?.padding};e.setNode(a.id,d),i&&e.setParent(a.id,i),V.info("setNode",d)})},"addClasses"),dVe=o(function(t,e,r,n){V.info(t),t.forEach(function(i,a){let s=i,l="",u={labelStyle:"",style:""},h=s.text,f=0,p={labelStyle:u.labelStyle,shape:"note",labelText:NO(h),noteData:s,rx:f,ry:f,class:l,style:u.style,id:s.id,domId:s.id,tooltip:"",type:"note",padding:de().flowchart?.padding??de().class?.padding};if(e.setNode(s.id,p),V.info("setNode",p),!s.class||!n.has(s.class))return;let m=r+a,g={id:`edgeNote${m}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:om(RO.curve,xu)};e.setEdge(s.id,s.class,g,m)})},"addNotes"),pVe=o(function(t,e){let r=de().flowchart,n=0;t.forEach(function(i){n++;let a={classes:"relation",pattern:i.relation.lineType==1?"dashed":"solid",id:y5(i.id1,i.id2,{prefix:"id",counter:n}),arrowhead:i.type==="arrow_open"?"none":"normal",startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowTypeStart:nfe(i.relation.type1),arrowTypeEnd:nfe(i.relation.type2),style:"fill:none",labelStyle:"",curve:om(r?.curve,xu)};if(V.info(a,i),i.style!==void 0){let s=lm(i.style);a.style=s.style,a.labelStyle=s.labelStyle}i.text=i.title,i.text===void 0?i.style!==void 0&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",de().flowchart?.htmlLabels??de().htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+i.text+"</span>"):(a.labelType="text",a.label=i.text.replace(We.lineBreakRegex,`
1408 `),i.style===void 0&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(i.id1,i.id2,a,n)})},"addRelations"),mVe=o(function(t){RO={...RO,...t}},"setConf"),gVe=o(async function(t,e,r,n){V.info("Drawing class - ",e);let i=de().flowchart??de().class,a=de().securityLevel;V.info("config:",i);let s=i?.nodeSpacing??50,l=i?.rankSpacing??50,u=new lr({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:s,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=n.db.getNamespaces(),f=n.db.getClasses(),d=n.db.getRelations(),p=n.db.getNotes();V.info(d),fVe(h,u,e,n),ife(f,u,e,n),pVe(d,u),dVe(p,u,d.length+1,f);let m;a==="sandbox"&&(m=$e("#i"+e));let g=a==="sandbox"?$e(m.nodes()[0].contentDocument.body):$e("body"),y=g.select(`[id="${e}"]`),v=g.select("#"+e+" g");if(await tfe(v,u,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),Lt.insertTitle(y,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),Lo(u,y,i?.diagramPadding,i?.useMaxWidth),!i?.htmlLabels){let x=a==="sandbox"?m.nodes()[0].contentDocument:document,b=x.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let w of b){let S=w.getBBox(),T=x.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("rx",0),T.setAttribute("ry",0),T.setAttribute("width",S.width),T.setAttribute("height",S.height),w.insertBefore(T,w.firstChild)}}},"draw");o(nfe,"getArrowMarker");afe={setConf:mVe,draw:gVe}});var ofe={};hr(ofe,{diagram:()=>yVe});var yVe,lfe=R(()=>{"use strict";TO();AO();_O();sfe();yVe={parser:wE,db:Bg,renderer:afe,styles:CE,init:o(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Bg.clear()},"init")}});var MO,BE,IO=R(()=>{"use strict";MO=function(){var t=o(function(F,B,$,z){for($=$||{},z=F.length;z--;$[F[z]]=B);return $},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],l=[1,16],u=[1,17],h=[1,18],f=[1,19],d=[1,32],p=[1,20],m=[1,21],g=[1,22],y=[1,23],v=[1,24],x=[1,26],b=[1,27],w=[1,28],S=[1,29],T=[1,30],E=[1,31],_=[1,34],A=[1,35],L=[1,36],M=[1,37],N=[1,33],k=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],C=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],O={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:o(function(B,$,z,Y,Q,X,ie){var j=X.length-1;switch(Q){case 3:return Y.setRootDoc(X[j]),X[j];break;case 4:this.$=[];break;case 5:X[j]!="nl"&&(X[j-1].push(X[j]),this.$=X[j-1]);break;case 6:case 7:this.$=X[j];break;case 8:this.$="nl";break;case 12:this.$=X[j];break;case 13:let q=X[j-1];q.description=Y.trimColon(X[j]),this.$=q;break;case 14:this.$={stmt:"relation",state1:X[j-2],state2:X[j]};break;case 15:let K=Y.trimColon(X[j]);this.$={stmt:"relation",state1:X[j-3],state2:X[j-1],description:K};break;case 19:this.$={stmt:"state",id:X[j-3],type:"default",description:"",doc:X[j-1]};break;case 20:var J=X[j],Z=X[j-2].trim();if(X[j].match(":")){var H=X[j].split(":");J=H[0],Z=[Z,H[1]]}this.$={stmt:"state",id:J,type:"default",description:Z};break;case 21:this.$={stmt:"state",id:X[j-3],type:"default",description:X[j-5],doc:X[j-1]};break;case 22:this.$={stmt:"state",id:X[j],type:"fork"};break;case 23:this.$={stmt:"state",id:X[j],type:"join"};break;case 24:this.$={stmt:"state",id:X[j],type:"choice"};break;case 25:this.$={stmt:"state",id:Y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:X[j-1].trim(),note:{position:X[j-2].trim(),text:X[j].trim()}};break;case 29:this.$=X[j].trim(),Y.setAccTitle(this.$);break;case 30:case 31:this.$=X[j].trim(),Y.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:X[j-1].trim(),classes:X[j].trim()};break;case 34:this.$={stmt:"style",id:X[j-1].trim(),styleClass:X[j].trim()};break;case 35:this.$={stmt:"applyClass",id:X[j-1].trim(),styleClass:X[j].trim()};break;case 36:Y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:Y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:Y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:Y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:X[j].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:X[j-2].trim(),classes:[X[j].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:X[j-2].trim(),classes:[X[j].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:w,38:S,42:T,45:E,48:_,49:A,50:L,51:M,54:N},t(k,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:w,38:S,42:T,45:E,48:_,49:A,50:L,51:M,54:N},t(k,[2,7]),t(k,[2,8]),t(k,[2,9]),t(k,[2,10]),t(k,[2,11]),t(k,[2,12],{14:[1,39],15:[1,40]}),t(k,[2,16]),{18:[1,41]},t(k,[2,18],{20:[1,42]}),{23:[1,43]},t(k,[2,22]),t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(k,[2,28]),{34:[1,48]},{36:[1,49]},t(k,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(k,[2,36]),t(k,[2,37]),t(k,[2,38]),t(k,[2,39]),t(k,[2,6]),t(k,[2,13]),{13:56,24:d,54:N},t(k,[2,17]),t(C,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(k,[2,29]),t(k,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(k,[2,14],{14:[1,67]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,68],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:w,38:S,42:T,45:E,48:_,49:A,50:L,51:M,54:N},t(k,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(k,[2,32]),t(k,[2,33]),t(k,[2,34]),t(k,[2,35]),t(I,[2,44]),t(I,[2,45]),t(k,[2,15]),t(k,[2,19]),t(C,i,{7:72}),t(k,[2,26]),t(k,[2,27]),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,73],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:w,38:S,42:T,45:E,48:_,49:A,50:L,51:M,54:N},t(k,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:o(function(B,$){if($.recoverable)this.trace(B);else{var z=new Error(B);throw z.hash=$,z}},"parseError"),parse:o(function(B){var $=this,z=[0],Y=[],Q=[null],X=[],ie=this.table,j="",J=0,Z=0,H=0,q=2,K=1,se=X.slice.call(arguments,1),ce=Object.create(this.lexer),ue={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(ue.yy[te]=this.yy[te]);ce.setInput(B,ue.yy),ue.yy.lexer=ce,ue.yy.parser=this,typeof ce.yylloc>"u"&&(ce.yylloc={});var De=ce.yylloc;X.push(De);var oe=ce.options&&ce.options.ranges;typeof ue.yy.parseError=="function"?this.parseError=ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(we){z.length=z.length-2*we,Q.length=Q.length-we,X.length=X.length-we}o(ke,"popStack");function Ie(){var we;return we=Y.pop()||ce.lex()||K,typeof we!="number"&&(we instanceof Array&&(Y=we,we=Y.pop()),we=$.symbols_[we]||we),we}o(Ie,"lex");for(var Se,Ue,Pe,_e,me,W,fe={},ge,re,he,ne;;){if(Pe=z[z.length-1],this.defaultActions[Pe]?_e=this.defaultActions[Pe]:((Se===null||typeof Se>"u")&&(Se=Ie()),_e=ie[Pe]&&ie[Pe][Se]),typeof _e>"u"||!_e.length||!_e[0]){var ae="";ne=[];for(ge in ie[Pe])this.terminals_[ge]&&ge>q&&ne.push("'"+this.terminals_[ge]+"'");ce.showPosition?ae="Parse error on line "+(J+1)+`:
1413 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var $=this.next();return $||this.lex()},"lex"),begin:o(function($){this.conditionStack.push($)},"begin"),popState:o(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:o(function($){this.begin($)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function($,z,Y,Q){var X=Q;switch(Y){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 67:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return z.yytext=z.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return F}();O.lexer=D;function P(){this.yy={}}return o(P,"Parser"),P.prototype=O,O.Parser=P,new P}();MO.parser=MO;BE=MO});var hfe,FE,zg,Ex,ffe,dfe,pfe,N0,zE,OO,PO,BO,FO,zO,GE,$E,mfe,gfe,GO,$O,yfe,vfe,Gg,wVe,xfe,VO,TVe,kVe,bfe,wfe,EVe,Tfe,CVe,kfe,UO,HO,Efe,VE,Cfe,YO,UE=R(()=>{"use strict";hfe="LR",FE="TB",zg="state",Ex="relation",ffe="classDef",dfe="style",pfe="applyClass",N0="default",zE="divider",OO="fill:none",PO="fill: #333",BO="c",FO="text",zO="normal",GE="rect",$E="rectWithTitle",mfe="stateStart",gfe="stateEnd",GO="divider",$O="roundedWithTitle",yfe="note",vfe="noteGroup",Gg="statediagram",wVe="state",xfe=`${Gg}-${wVe}`,VO="transition",TVe="note",kVe="note-edge",bfe=`${VO} ${kVe}`,wfe=`${Gg}-${TVe}`,EVe="cluster",Tfe=`${Gg}-${EVe}`,CVe="cluster-alt",kfe=`${Gg}-${CVe}`,UO="parent",HO="note",Efe="state",VE="----",Cfe=`${VE}${HO}`,YO=`${VE}${UO}`});function WO(t="",e=0,r="",n=VE){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${Efe}-${t}${i}-${e}`}function HE(t,e,r){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{if(r.get(i)){let a=r.get(i);e.cssCompiledStyles=[...e.cssCompiledStyles,...a.styles]}}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function AVe(t){return t?.classes?.join(" ")??""}function _Ve(t){return t?.styles??[]}var YE,yf,SVe,Sfe,$g,Afe,_fe=R(()=>{"use strict";_t();ut();rr();UE();YE=new Map,yf=0;o(WO,"stateDomId");SVe=o((t,e,r,n,i,a,s,l)=>{V.trace("items",e),e.forEach(u=>{switch(u.stmt){case zg:$g(t,u,r,n,i,a,s,l);break;case N0:$g(t,u,r,n,i,a,s,l);break;case Ex:{$g(t,u.state1,r,n,i,a,s,l),$g(t,u.state2,r,n,i,a,s,l);let h={id:"edge"+yf,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:OO,labelStyle:"",label:We.sanitizeText(u.description,de()),arrowheadStyle:PO,labelpos:BO,labelType:FO,thickness:zO,classes:VO,look:s};i.push(h),yf++}break}})},"setupDoc"),Sfe=o((t,e=FE)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");o(HE,"insertOrUpdateNode");o(AVe,"getClassesFromDbInfo");o(_Ve,"getStylesFromDbInfo");$g=o((t,e,r,n,i,a,s,l)=>{let u=e.id,h=r.get(u),f=AVe(h),d=_Ve(h);if(V.info("dataFetcher parsedItem",e,h,d),u!=="root"){let p=GE;e.start===!0?p=mfe:e.start===!1&&(p=gfe),e.type!==N0&&(p=e.type),YE.get(u)||YE.set(u,{id:u,shape:p,description:We.sanitizeText(u,de()),cssClasses:`${f} ${xfe}`,cssStyles:d});let m=YE.get(u);e.description&&(Array.isArray(m.description)?(m.shape=$E,m.description.push(e.description)):m.description?.length>0?(m.shape=$E,m.description===u?m.description=[e.description]:m.description=[m.description,e.description]):(m.shape=GE,m.description=e.description),m.description=We.sanitizeTextOrArray(m.description,de())),m.description?.length===1&&m.shape===$E&&(m.type==="group"?m.shape=$O:m.shape=GE),!m.type&&e.doc&&(V.info("Setting cluster for XCX",u,Sfe(e)),m.type="group",m.isGroup=!0,m.dir=Sfe(e),m.shape=e.type===zE?GO:$O,m.cssClasses=`${m.cssClasses} ${Tfe} ${a?kfe:""}`);let g={labelStyle:"",shape:m.shape,label:m.description,cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,id:u,dir:m.dir,domId:WO(u,yf),type:m.type,isGroup:m.type==="group",padding:8,rx:10,ry:10,look:s};if(g.shape===GO&&(g.label=""),t&&t.id!=="root"&&(V.trace("Setting node ",u," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let y={labelStyle:"",shape:yfe,label:e.note.text,cssClasses:wfe,cssStyles:[],cssCompilesStyles:[],id:u+Cfe+"-"+yf,domId:WO(u,yf,HO),type:m.type,isGroup:m.type==="group",padding:de().flowchart.padding,look:s,position:e.note.position},v=u+YO,x={labelStyle:"",shape:vfe,label:e.note.text,cssClasses:m.cssClasses,cssStyles:[],id:u+YO,domId:WO(u,yf,UO),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};yf++,x.id=v,y.parentId=v,HE(n,x,l),HE(n,y,l),HE(n,g,l);let b=u,w=y.id;e.note.position==="left of"&&(b=y.id,w=u),i.push({id:b+"-"+w,start:b,end:w,arrowhead:"none",arrowTypeEnd:"",style:OO,labelStyle:"",classes:bfe,arrowheadStyle:PO,labelpos:BO,labelType:FO,thickness:zO,look:s})}else HE(n,g,l)}e.doc&&(V.trace("Adding nodes children "),SVe(e,e.doc,r,n,i,!a,s,l))},"dataFetcher"),Afe=o(()=>{YE.clear(),yf=0},"reset")});var qO,LVe,DVe,Lfe,XO=R(()=>{"use strict";_t();ut();L9();oT();yD();xr();UE();qO=o((t,e=FE)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),LVe=o(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),DVe=o(async function(t,e,r,n){V.info("REF0:"),V.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:s}=de();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=I5(e,i);l.type=n.type,l.layoutAlgorithm=s,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["barb"],l.diagramId=e,await sT(l,u);let h=8;Lt.insertTitle(u,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),lT(u,h,Gg,a?.useMaxWidth??!0)},"draw"),Lfe={getClasses:LVe,draw:DVe,getDir:qO}});function Pfe(){return new Map}function jO(t=""){let e=t;return t===ZO&&(Cx++,e=`${Mfe}${Cx}`),e}function KO(t="",e=N0){return t===ZO?Mfe:e}function GVe(t=""){let e=t;return t===Ife&&(Cx++,e=`${Ofe}${Cx}`),e}function $Ve(t="",e=N0){return t===Ife?Ofe:e}function VVe(t,e,r){let n=jO(t.id.trim()),i=KO(t.id.trim(),t.type),a=jO(e.id.trim()),s=KO(e.id.trim(),e.type);vf(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),vf(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Fs.relations.push({id1:n,id2:a,relationTitle:We.sanitizeText(r,de())})}var ZO,Mfe,Ife,Ofe,Dfe,Rfe,RVe,NVe,XE,JO,Bfe,jE,Vg,Ffe,KE,Fs,Cx,Nfe,MVe,IVe,WE,OVe,PVe,qE,eP,BVe,vf,zfe,M0,Gfe,FVe,zVe,$fe,QO,UVe,HVe,Vfe,YVe,tP,WVe,qVe,XVe,jVe,KVe,QVe,Qo,QE=R(()=>{"use strict";ut();xr();rr();_t();bi();_fe();XO();UE();ZO="[*]",Mfe="start",Ife=ZO,Ofe="end",Dfe="color",Rfe="fill",RVe="bgFill",NVe=",";o(Pfe,"newClassesList");XE=[],JO=[],Bfe=hfe,jE=[],Vg=Pfe(),Ffe=o(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),KE={root:Ffe()},Fs=KE.root,Cx=0,Nfe=0,MVe={LINE:0,DOTTED_LINE:1},IVe={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},WE=o(t=>JSON.parse(JSON.stringify(t)),"clone"),OVe=o(t=>{V.info("Setting root doc",t),jE=t},"setRootDoc"),PVe=o(()=>jE,"getRootDoc"),qE=o((t,e,r)=>{if(e.stmt===Ex)qE(t,e.state1,!0),qE(t,e.state2,!1);else if(e.stmt===zg&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){let n=[],i=[],a;for(a=0;a<e.doc.length;a++)if(e.doc[a].type===zE){let s=WE(e.doc[a]);s.doc=WE(i),n.push(s),i=[]}else i.push(e.doc[a]);if(n.length>0&&i.length>0){let s={stmt:zg,id:Z_(),type:"divider",doc:WE(i)};n.push(WE(s)),e.doc=n}e.doc.forEach(s=>qE(e,s,!0))}},"docTranslator"),eP=o(()=>(qE({id:"root"},{id:"root",doc:jE},!0),{id:"root",doc:jE}),"getRootDocV2"),BVe=o(t=>{let e;t.doc?e=t.doc:e=t,V.info(e),zfe(!0),V.info("Extract initial document:",e),e.forEach(a=>{switch(V.warn("Statement",a.stmt),a.stmt){case zg:vf(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case Ex:$fe(a.state1,a.state2,a.description);break;case ffe:Vfe(a.id.trim(),a.classes);break;case dfe:{let s=a.id.trim().split(","),l=a.styleClass.split(",");s.forEach(u=>{let h=M0(u);if(h===void 0){let f=u.trim();vf(f),h=M0(f)}h.styles=l.map(f=>f.replace(/;/g,"")?.trim())})}break;case pfe:tP(a.id.trim(),a.styleClass);break}});let r=Gfe(),i=de().look;Afe(),$g(void 0,eP(),r,XE,JO,!0,i,Vg),XE.forEach(a=>{if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+a.id+"]");a.label=a.label[0]}})},"extract"),vf=o(function(t,e=N0,r=null,n=null,i=null,a=null,s=null,l=null){let u=t?.trim();if(Fs.states.has(u)?(Fs.states.get(u).doc||(Fs.states.get(u).doc=r),Fs.states.get(u).type||(Fs.states.get(u).type=e)):(V.info("Adding state ",u,n),Fs.states.set(u,{id:u,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]})),n&&(V.info("Setting state description",u,n),typeof n=="string"&&QO(u,n.trim()),typeof n=="object"&&n.forEach(h=>QO(u,h.trim()))),i){let h=Fs.states.get(u);h.note=i,h.note.text=We.sanitizeText(h.note.text,de())}a&&(V.info("Setting state classes",u,a),(typeof a=="string"?[a]:a).forEach(f=>tP(u,f.trim()))),s&&(V.info("Setting state styles",u,s),(typeof s=="string"?[s]:s).forEach(f=>WVe(u,f.trim()))),l&&(V.info("Setting state styles",u,s),(typeof l=="string"?[l]:l).forEach(f=>qVe(u,f.trim())))},"addState"),zfe=o(function(t){XE=[],JO=[],KE={root:Ffe()},Fs=KE.root,Cx=0,Vg=Pfe(),t||vr()},"clear"),M0=o(function(t){return Fs.states.get(t)},"getState"),Gfe=o(function(){return Fs.states},"getStates"),FVe=o(function(){V.info("Documents = ",KE)},"logDocuments"),zVe=o(function(){return Fs.relations},"getRelations");o(jO,"startIdIfNeeded");o(KO,"startTypeIfNeeded");o(GVe,"endIdIfNeeded");o($Ve,"endTypeIfNeeded");o(VVe,"addRelationObjs");$fe=o(function(t,e,r){if(typeof t=="object")VVe(t,e,r);else{let n=jO(t.trim()),i=KO(t),a=GVe(e.trim()),s=$Ve(e);vf(n,i),vf(a,s),Fs.relations.push({id1:n,id2:a,title:We.sanitizeText(r,de())})}},"addRelation"),QO=o(function(t,e){let r=Fs.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(We.sanitizeText(n,de()))},"addDescription"),UVe=o(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),HVe=o(()=>(Nfe++,"divider-id-"+Nfe),"getDividerId"),Vfe=o(function(t,e=""){Vg.has(t)||Vg.set(t,{id:t,styles:[],textStyles:[]});let r=Vg.get(t);e?.split(NVe).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Dfe).exec(n)){let s=i.replace(Rfe,RVe).replace(Dfe,Rfe);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),YVe=o(function(){return Vg},"getClasses"),tP=o(function(t,e){t.split(",").forEach(function(r){let n=M0(r);if(n===void 0){let i=r.trim();vf(i),n=M0(i)}n.classes.push(e)})},"setCssClass"),WVe=o(function(t,e){let r=M0(t);r!==void 0&&r.styles.push(e)},"setStyle"),qVe=o(function(t,e){let r=M0(t);r!==void 0&&r.textStyles.push(e)},"setTextStyle"),XVe=o(()=>Bfe,"getDirection"),jVe=o(t=>{Bfe=t},"setDirection"),KVe=o(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),QVe=o(()=>{let t=de();return{nodes:XE,edges:JO,other:{},config:t,direction:qO(eP())}},"getData"),Qo={getConfig:o(()=>de().state,"getConfig"),getData:QVe,addState:vf,clear:zfe,getState:M0,getStates:Gfe,getRelations:zVe,getClasses:YVe,getDirection:XVe,addRelation:$fe,getDividerId:HVe,setDirection:jVe,cleanupLabel:UVe,lineType:MVe,relationType:IVe,logDocuments:FVe,getRootDoc:PVe,setRootDoc:OVe,getRootDocV2:eP,extract:BVe,trimColon:KVe,getAccTitle:Ar,setAccTitle:kr,getAccDescription:Lr,setAccDescription:_r,addStyleClass:Vfe,setCssClass:tP,addDescription:QO,setDiagramTitle:nn,getDiagramTitle:Xr}});var ZVe,ZE,rP=R(()=>{"use strict";ZVe=o(t=>`
1627 `,"getStyles"),ZE=ZVe});var nP,JVe,eUe,Ufe,tUe,Hfe,Yfe=R(()=>{"use strict";nP={},JVe=o((t,e)=>{nP[t]=e},"set"),eUe=o(t=>nP[t],"get"),Ufe=o(()=>Object.keys(nP),"keys"),tUe=o(()=>Ufe().length,"size"),Hfe={get:eUe,set:JVe,keys:Ufe,size:tUe}});var rUe,nUe,iUe,aUe,qfe,sUe,oUe,lUe,cUe,iP,Wfe,Xfe,jfe=R(()=>{"use strict";Zt();Yfe();QE();xr();rr();_t();ut();rUe=o(t=>t.append("circle").attr("class","start-state").attr("r",de().state.sizeUnit).attr("cx",de().state.padding+de().state.sizeUnit).attr("cy",de().state.padding+de().state.sizeUnit),"drawStartState"),nUe=o(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",de().state.textHeight).attr("class","divider").attr("x2",de().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),iUe=o((t,e)=>{let r=t.append("text").attr("x",2*de().state.padding).attr("y",de().state.textHeight+2*de().state.padding).attr("font-size",de().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",de().state.padding).attr("y",de().state.padding).attr("width",n.width+2*de().state.padding).attr("height",n.height+2*de().state.padding).attr("rx",de().state.radius),r},"drawSimpleState"),aUe=o((t,e)=>{let r=o(function(p,m,g){let y=p.append("tspan").attr("x",2*de().state.padding).text(m);g||y.attr("dy",de().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*de().state.padding).attr("y",de().state.textHeight+1.3*de().state.padding).attr("font-size",de().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",de().state.padding).attr("y",a+de().state.padding*.4+de().state.dividerMargin+de().state.textHeight).attr("class","state-description"),l=!0,u=!0;e.descriptions.forEach(function(p){l||(r(s,p,u),u=!1),l=!1});let h=t.append("line").attr("x1",de().state.padding).attr("y1",de().state.padding+a+de().state.dividerMargin/2).attr("y2",de().state.padding+a+de().state.dividerMargin/2).attr("class","descr-divider"),f=s.node().getBBox(),d=Math.max(f.width,i.width);return h.attr("x2",d+3*de().state.padding),t.insert("rect",":first-child").attr("x",de().state.padding).attr("y",de().state.padding).attr("width",d+2*de().state.padding).attr("height",f.height+a+2*de().state.padding).attr("rx",de().state.radius),t},"drawDescrState"),qfe=o((t,e,r)=>{let n=de().state.padding,i=2*de().state.padding,a=t.node().getBBox(),s=a.width,l=a.x,u=t.append("text").attr("x",0).attr("y",de().state.titleShift).attr("font-size",de().state.fontSize).attr("class","state-title").text(e.id),f=u.node().getBBox().width+i,d=Math.max(f,s);d===s&&(d=d+i);let p,m=t.node().getBBox();e.doc,p=l-n,f>s&&(p=(s-d)/2+n),Math.abs(l-m.x)<n&&f>s&&(p=l-(f-s)/2);let g=1-de().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",m.height+de().state.textHeight+de().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),f<=s&&u.attr("x",l+(d-i)/2-f/2+n),t.insert("rect",":first-child").attr("x",p).attr("y",de().state.titleShift-de().state.textHeight-de().state.padding).attr("width",d).attr("height",de().state.textHeight*3).attr("rx",de().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",de().state.titleShift-de().state.textHeight-de().state.padding).attr("width",d).attr("height",m.height+3+2*de().state.textHeight).attr("rx",de().state.radius),t},"addTitleAndBox"),sUe=o(t=>(t.append("circle").attr("class","end-state-outer").attr("r",de().state.sizeUnit+de().state.miniPadding).attr("cx",de().state.padding+de().state.sizeUnit+de().state.miniPadding).attr("cy",de().state.padding+de().state.sizeUnit+de().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",de().state.sizeUnit).attr("cx",de().state.padding+de().state.sizeUnit+2).attr("cy",de().state.padding+de().state.sizeUnit+2)),"drawEndState"),oUe=o((t,e)=>{let r=de().state.forkWidth,n=de().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",de().state.padding).attr("y",de().state.padding)},"drawForkJoinState"),lUe=o((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");let l=s.split(We.lineBreakRegex),u=1.25*de().state.noteMargin;for(let h of l){let f=h.trim();if(f.length>0){let d=a.append("tspan");if(d.text(f),u===0){let p=d.node().getBBox();u+=p.height}i+=u,d.attr("x",e+de().state.noteMargin),d.attr("y",r+i+1.25*de().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),cUe=o((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",de().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=lUe(t,0,0,n);return r.attr("height",a+2*de().state.noteMargin),r.attr("width",i+de().state.noteMargin*2),r},"drawNote"),iP=o(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&rUe(i),e.type==="end"&&sUe(i),(e.type==="fork"||e.type==="join")&&oUe(i,e),e.type==="note"&&cUe(e.note.text,i),e.type==="divider"&&nUe(i),e.type==="default"&&e.descriptions.length===0&&iUe(i,e),e.type==="default"&&e.descriptions.length>0&&aUe(i,e);let a=i.node().getBBox();return n.width=a.width+2*de().state.padding,n.height=a.height+2*de().state.padding,Hfe.set(r,n),n},"drawState"),Wfe=0,Xfe=o(function(t,e,r){let n=o(function(u){switch(u){case Qo.relationType.AGGREGATION:return"aggregation";case Qo.relationType.EXTENSION:return"extension";case Qo.relationType.COMPOSITION:return"composition";case Qo.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(u=>!Number.isNaN(u.y));let i=e.points,a=ha().x(function(u){return u.x}).y(function(u){return u.y}).curve(vs),s=t.append("path").attr("d",a(i)).attr("id","edge"+Wfe).attr("class","transition"),l="";if(de().state.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),s.attr("marker-end","url("+l+"#"+n(Qo.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=t.append("g").attr("class","stateLabel"),{x:h,y:f}=Lt.calcLabelPosition(e.points),d=We.getRows(r.title),p=0,m=[],g=0,y=0;for(let b=0;b<=d.length;b++){let w=u.append("text").attr("text-anchor","middle").text(d[b]).attr("x",h).attr("y",f+p),S=w.node().getBBox();g=Math.max(g,S.width),y=Math.min(y,S.x),V.info(S.x,h,f+p),p===0&&(p=w.node().getBBox().height,V.info("Title height",p,f)),m.push(w)}let v=p*d.length;if(d.length>1){let b=(d.length-1)*p*.5;m.forEach((w,S)=>w.attr("y",f+S*p-b)),v=p*d.length}let x=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-de().state.padding/2).attr("y",f-v/2-de().state.padding/2-3.5).attr("width",g+de().state.padding).attr("height",v+de().state.padding),V.info(x)}Wfe++},"drawEdge")});var vo,aP,uUe,hUe,fUe,dUe,Kfe,Qfe,Zfe=R(()=>{"use strict";Zt();Vd();ya();ut();rr();jfe();_t();Yn();aP={},uUe=o(function(){},"setConf"),hUe=o(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),fUe=o(function(t,e,r,n){vo=de().state;let i=de().securityLevel,a;i==="sandbox"&&(a=$e("#i"+e));let s=i==="sandbox"?$e(a.nodes()[0].contentDocument.body):$e("body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;V.debug("Rendering diagram "+t);let u=s.select(`[id='${e}']`);hUe(u);let h=n.db.getRootDoc();Kfe(h,u,void 0,!1,s,l,n);let f=vo.padding,d=u.node().getBBox(),p=d.width+f*2,m=d.height+f*2,g=p*1.75;Sr(u,m,g,vo.useMaxWidth),u.attr("viewBox",`${d.x-vo.padding} ${d.y-vo.padding} `+p+" "+m)},"draw"),dUe=o(t=>t?t.length*vo.fontSizeFactor:1,"getLabelWidth"),Kfe=o((t,e,r,n,i,a,s)=>{let l=new lr({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u<t.length;u++)if(t[u].stmt==="relation"){h=!1;break}r?l.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:vo.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):l.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:vo.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}}),s.db.extract(t);let f=s.db.getStates(),d=s.db.getRelations(),p=Object.keys(f),m=!0;for(let b of p){let w=f[b];r&&(w.parentId=r);let S;if(w.doc){let T=e.append("g").attr("id",w.id).attr("class","stateGroup");if(S=Kfe(w.doc,T,w.id,!n,i,a,s),m){T=qfe(T,w,n);let E=T.node().getBBox();S.width=E.width,S.height=E.height+vo.padding/2,aP[w.id]={y:vo.compositTitleSize}}else{let E=T.node().getBBox();S.width=E.width,S.height=E.height}}else S=iP(e,w,l);if(w.note){let T={descriptions:[],id:w.id+"-note",note:w.note,type:"note"},E=iP(e,T,l);w.note.position==="left of"?(l.setNode(S.id+"-note",E),l.setNode(S.id,S)):(l.setNode(S.id,S),l.setNode(S.id+"-note",E)),l.setParent(S.id,S.id+"-group"),l.setParent(S.id+"-note",S.id+"-group")}else l.setNode(S.id,S)}V.debug("Count=",l.nodeCount(),l);let g=0;d.forEach(function(b){g++,V.debug("Setting edge",b),l.setEdge(b.id1,b.id2,{relation:b,width:dUe(b.title),height:vo.labelHeight*We.getRows(b.title).length,labelpos:"c"},"id"+g)}),lo(l),V.debug("Graph after layout",l.nodes());let y=e.node();l.nodes().forEach(function(b){b!==void 0&&l.node(b)!==void 0?(V.warn("Node "+b+": "+JSON.stringify(l.node(b))),i.select("#"+y.id+" #"+b).attr("transform","translate("+(l.node(b).x-l.node(b).width/2)+","+(l.node(b).y+(aP[b]?aP[b].y:0)-l.node(b).height/2)+" )"),i.select("#"+y.id+" #"+b).attr("data-x-shift",l.node(b).x-l.node(b).width/2),a.querySelectorAll("#"+y.id+" #"+b+" .divider").forEach(S=>{let T=S.parentElement,E=0,_=0;T&&(T.parentElement&&(E=T.parentElement.getBBox().width),_=parseInt(T.getAttribute("data-x-shift"),10),Number.isNaN(_)&&(_=0)),S.setAttribute("x1",0-_+8),S.setAttribute("x2",E-_-8)})):V.debug("No Node "+b+": "+JSON.stringify(l.node(b)))});let v=y.getBBox();l.edges().forEach(function(b){b!==void 0&&l.edge(b)!==void 0&&(V.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(l.edge(b))),Xfe(e,l.edge(b),l.edge(b).relation))}),v=y.getBBox();let x={id:r||"root",label:r||"root",width:0,height:0};return x.width=v.width+2*vo.padding,x.height=v.height+2*vo.padding,V.debug("Doc rendered",x,l),x},"renderDoc"),Qfe={setConf:uUe,draw:fUe}});var Jfe={};hr(Jfe,{diagram:()=>pUe});var pUe,ede=R(()=>{"use strict";IO();QE();rP();Zfe();pUe={parser:BE,db:Qo,renderer:Qfe,styles:ZE,init:o(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Qo.clear()},"init")}});var nde={};hr(nde,{diagram:()=>vUe});var vUe,ide=R(()=>{"use strict";IO();QE();rP();XO();vUe={parser:BE,db:Qo,renderer:Lfe,styles:ZE,init:o(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Qo.clear()},"init")}});var sP,ode,lde=R(()=>{"use strict";sP=function(){var t=o(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,14],u={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:o(function(p,m,g,y,v,x,b){var w=x.length-1;switch(v){case 1:return x[w-1];case 2:this.$=[];break;case 3:x[w-1].push(x[w]),this.$=x[w-1];break;case 4:case 5:this.$=x[w];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(x[w].substr(6)),this.$=x[w].substr(6);break;case 9:this.$=x[w].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=x[w].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(x[w].substr(8)),this.$=x[w].substr(8);break;case 13:y.addTask(x[w-1],x[w]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:o(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:o(function(p){var m=this,g=[0],y=[],v=[null],x=[],b=this.table,w="",S=0,T=0,E=0,_=2,A=1,L=x.slice.call(arguments,1),M=Object.create(this.lexer),N={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(N.yy[k]=this.yy[k]);M.setInput(p,N.yy),N.yy.lexer=M,N.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var I=M.yylloc;x.push(I);var C=M.options&&M.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(H){g.length=g.length-2*H,v.length=v.length-H,x.length=x.length-H}o(O,"popStack");function D(){var H;return H=y.pop()||M.lex()||A,typeof H!="number"&&(H instanceof Array&&(y=H,H=y.pop()),H=m.symbols_[H]||H),H}o(D,"lex");for(var P,F,B,$,z,Y,Q={},X,ie,j,J;;){if(B=g[g.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=D()),$=b[B]&&b[B][P]),typeof $>"u"||!$.length||!$[0]){var Z="";J=[];for(X in b[B])this.terminals_[X]&&X>_&&J.push("'"+this.terminals_[X]+"'");M.showPosition?Z="Parse error on line "+(S+1)+`:
1765 `,"getStyles"),hde=DUe});var cP,RUe,pde,mde,NUe,MUe,dde,IUe,OUe,gde,PUe,Hg,yde=R(()=>{"use strict";Zt();Qy();cP=o(function(t,e){return yd(t,e)},"drawRect"),RUe=o(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=bl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}o(a,"smile");function s(u){let h=bl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}o(s,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return o(l,"ambivalent"),e.score>3?a(i):e.score<3?s(i):l(i),n},"drawFace"),pde=o(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),mde=o(function(t,e){return TW(t,e)},"drawText"),NUe=o(function(t,e){function r(i,a,s,l,u){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+l-u)+" "+(i+s-u*1.2)+","+(a+l)+" "+i+","+(a+l)}o(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,mde(t,e)},"drawLabel"),MUe=o(function(t,e,r){let n=t.append("g"),i=wl();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,cP(n,i),gde(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),dde=-1,IUe=o(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");dde++;let a=300+5*30;i.append("line").attr("id","task"+dde).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),RUe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=wl();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,cP(i,s);let l=e.x+14;e.people.forEach(u=>{let h=e.actors[u].color,f={cx:l,cy:e.y,r:7,fill:h,stroke:"#000",title:u,pos:e.actors[u].position};pde(i,f),l+=10}),gde(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),OUe=o(function(t,e){j3(t,e)},"drawBackgroundRect"),gde=function(){function t(i,a,s,l,u,h,f,d){let p=a.append("text").attr("x",s+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}o(t,"byText");function e(i,a,s,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){let x=v*m-m*(y.length-1)/2,b=a.append("text").attr("x",s+u/2).attr("y",l).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",g);b.append("tspan").attr("x",s+u/2).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f)}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f)}o(r,"byFo");function n(i,a){for(let s in a)s in a&&i.attr(s,a[s])}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),PUe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),Hg={drawRect:cP,drawCircle:pde,drawSection:MUe,drawText:mde,drawLabel:NUe,drawTask:IUe,drawBackgroundRect:OUe,initGraphics:PUe}});function FUe(t){let e=de().journey,r=60;Object.keys(Xu).forEach(n=>{let i=Xu[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:Xu[n].position};Hg.drawCircle(t,a);let s={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};Hg.drawText(t,s),r+=20})}var BUe,Xu,JE,I0,zUe,Zo,uP,vde,GUe,hP,xde=R(()=>{"use strict";Zt();yde();_t();Yn();BUe=o(function(t){Object.keys(t).forEach(function(r){JE[r]=t[r]})},"setConf"),Xu={};o(FUe,"drawActorLegend");JE=de().journey,I0=JE.leftMargin,zUe=o(function(t,e,r,n){let i=de().journey,a=de().securityLevel,s;a==="sandbox"&&(s=$e("#i"+e));let l=a==="sandbox"?$e(s.nodes()[0].contentDocument.body):$e("body");Zo.init();let u=l.select("#"+e);Hg.initGraphics(u);let h=n.db.getTasks(),f=n.db.getDiagramTitle(),d=n.db.getActors();for(let x in Xu)delete Xu[x];let p=0;d.forEach(x=>{Xu[x]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),FUe(u),Zo.insert(0,0,I0,Object.keys(Xu).length*50),GUe(u,h,0);let m=Zo.getBounds();f&&u.append("text").text(f).attr("x",I0).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let g=m.stopy-m.starty+2*i.diagramMarginY,y=I0+m.stopx+2*i.diagramMarginX;Sr(u,g,y,i.useMaxWidth),u.append("line").attr("x1",I0).attr("y1",i.height*4).attr("x2",y-I0-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let v=f?70:0;u.attr("viewBox",`${m.startx} -25 ${y} ${g+v}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",g+v+25)},"draw"),Zo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:o(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:o(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:o(function(t,e,r,n){let i=de().journey,a=this,s=0;function l(u){return o(function(f){s++;let d=a.sequenceItems.length-s+1;a.updateVal(f,"starty",e-d*i.boxMargin,Math.min),a.updateVal(f,"stopy",n+d*i.boxMargin,Math.max),a.updateVal(Zo.data,"startx",t-d*i.boxMargin,Math.min),a.updateVal(Zo.data,"stopx",r+d*i.boxMargin,Math.max),u!=="activation"&&(a.updateVal(f,"startx",t-d*i.boxMargin,Math.min),a.updateVal(f,"stopx",r+d*i.boxMargin,Math.max),a.updateVal(Zo.data,"starty",e-d*i.boxMargin,Math.min),a.updateVal(Zo.data,"stopy",n+d*i.boxMargin,Math.max))},"updateItemBounds")}o(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:o(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),l=Math.max(e,n);this.updateVal(Zo.data,"startx",i,Math.min),this.updateVal(Zo.data,"starty",s,Math.min),this.updateVal(Zo.data,"stopx",a,Math.max),this.updateVal(Zo.data,"stopy",l,Math.max),this.updateBounds(i,s,a,l)},"insert"),bumpVerticalPos:o(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos},"getVerticalPos"),getBounds:o(function(){return this.data},"getBounds")},uP=JE.sectionFills,vde=JE.sectionColours,GUe=o(function(t,e,r){let n=de().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,l=0,u="#CCC",h="black",f=0;for(let[d,p]of e.entries()){if(i!==p.section){u=uP[l%uP.length],f=l%uP.length,h=vde[l%vde.length];let g=0,y=p.section;for(let x=d;x<e.length&&e[x].section==y;x++)g=g+1;let v={x:d*n.taskMargin+d*n.width+I0,y:50,text:p.section,fill:u,num:f,colour:h,taskCount:g};Hg.drawSection(t,v,n),i=p.section,l++}let m=p.people.reduce((g,y)=>(Xu[y]&&(g[y]=Xu[y]),g),{});p.x=d*n.taskMargin+d*n.width+I0,p.y=s,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=m,Hg.drawTask(t,p,n),Zo.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30)}},"drawTasks"),hP={setConf:BUe,draw:zUe}});var bde={};hr(bde,{diagram:()=>$Ue});var $Ue,wde=R(()=>{"use strict";lde();ude();fde();xde();$Ue={parser:ode,db:lP,renderer:hP,styles:hde,init:o(t=>{hP.setConf(t.journey),lP.clear()},"init")}});var dP,_de,Lde=R(()=>{"use strict";dP=function(){var t=o(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],l=[1,16],u=[1,17],h={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:o(function(m,g,y,v,x,b,w){var S=b.length-1;switch(x){case 1:return b[S-1];case 2:this.$=[];break;case 3:b[S-1].push(b[S]),this.$=b[S-1];break;case 4:case 5:this.$=b[S];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(b[S].substr(6)),this.$=b[S].substr(6);break;case 9:this.$=b[S].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[S].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(b[S].substr(8)),this.$=b[S].substr(8);break;case 15:v.addTask(b[S],0,""),this.$=b[S];break;case 16:v.addEvent(b[S].substr(2)),this.$=b[S];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:l,21:u},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:l,21:u},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:o(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:o(function(m){var g=this,y=[0],v=[],x=[null],b=[],w=this.table,S="",T=0,E=0,_=0,A=2,L=1,M=b.slice.call(arguments,1),N=Object.create(this.lexer),k={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(k.yy[I]=this.yy[I]);N.setInput(m,k.yy),k.yy.lexer=N,k.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var C=N.yylloc;b.push(C);var O=N.options&&N.options.ranges;typeof k.yy.parseError=="function"?this.parseError=k.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(q){y.length=y.length-2*q,x.length=x.length-q,b.length=b.length-q}o(D,"popStack");function P(){var q;return q=v.pop()||N.lex()||L,typeof q!="number"&&(q instanceof Array&&(v=q,q=v.pop()),q=g.symbols_[q]||q),q}o(P,"lex");for(var F,B,$,z,Y,Q,X={},ie,j,J,Z;;){if($=y[y.length-1],this.defaultActions[$]?z=this.defaultActions[$]:((F===null||typeof F>"u")&&(F=P()),z=w[$]&&w[$][F]),typeof z>"u"||!z.length||!z[0]){var H="";Z=[];for(ie in w[$])this.terminals_[ie]&&ie>A&&Z.push("'"+this.terminals_[ie]+"'");N.showPosition?H="Parse error on line "+(T+1)+`:
1770 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var g=this.next();return g||this.lex()},"lex"),begin:o(function(g){this.conditionStack.push(g)},"begin"),popState:o(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:o(function(g){this.begin(g)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(g,y,v,x){var b=x;switch(v){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return p}();h.lexer=f;function d(){this.yy={}}return o(d,"Parser"),d.prototype=h,h.Parser=d,new d}();dP.parser=dP;_de=dP});var mP={};hr(mP,{addEvent:()=>Fde,addSection:()=>Ide,addTask:()=>Bde,addTaskOrg:()=>zde,clear:()=>Mde,default:()=>KUe,getCommonDb:()=>Nde,getSections:()=>Ode,getTasks:()=>Pde});var Yg,Rde,pP,e6,Wg,Nde,Mde,Ide,Ode,Pde,Bde,Fde,zde,Dde,KUe,Gde=R(()=>{"use strict";bi();Yg="",Rde=0,pP=[],e6=[],Wg=[],Nde=o(()=>ly,"getCommonDb"),Mde=o(function(){pP.length=0,e6.length=0,Yg="",Wg.length=0,vr()},"clear"),Ide=o(function(t){Yg=t,pP.push(t)},"addSection"),Ode=o(function(){return pP},"getSections"),Pde=o(function(){let t=Dde(),e=100,r=0;for(;!t&&r<e;)t=Dde(),r++;return e6.push(...Wg),e6},"getTasks"),Bde=o(function(t,e,r){let n={id:Rde++,section:Yg,type:Yg,task:t,score:e||0,events:r?[r]:[]};Wg.push(n)},"addTask"),Fde=o(function(t){Wg.find(r=>r.id===Rde-1).events.push(t)},"addEvent"),zde=o(function(t){let e={section:Yg,type:Yg,description:t,task:t,classes:[]};e6.push(e)},"addTaskOrg"),Dde=o(function(){let t=o(function(r){return Wg[r].processed},"compileTask"),e=!0;for(let[r,n]of Wg.entries())t(r),e=e&&n.processed;return e},"compileTasks"),KUe={clear:Mde,getCommonDb:Nde,addSection:Ide,getSections:Ode,getTasks:Pde,addTask:Bde,addTaskOrg:zde,addEvent:Fde}});function Hde(t,e){t.each(function(){var r=$e(this),n=r.text().split(/(\s+|<br>)/).reverse(),i,a=[],s=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let f=0;f<n.length;f++)i=n[n.length-1-f],a.push(i),h.text(a.join(" ").trim()),(h.node().getComputedTextLength()>e||i==="<br>")&&(a.pop(),h.text(a.join(" ").trim()),i==="<br>"?a=[""]:a=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",s+"em").text(i))})}var QUe,t6,ZUe,JUe,Vde,eHe,tHe,$de,rHe,nHe,iHe,gP,Ude,aHe,sHe,oHe,lHe,xf,Yde=R(()=>{"use strict";Zt();QUe=12,t6=o(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),ZUe=o(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=bl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}o(a,"smile");function s(u){let h=bl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}o(s,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return o(l,"ambivalent"),e.score>3?a(i):e.score<3?s(i):l(i),n},"drawFace"),JUe=o(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),Vde=o(function(t,e){let r=e.text.replace(/<br\s*\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),eHe=o(function(t,e){function r(i,a,s,l,u){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+l-u)+" "+(i+s-u*1.2)+","+(a+l)+" "+i+","+(a+l)}o(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,Vde(t,e)},"drawLabel"),tHe=o(function(t,e,r){let n=t.append("g"),i=gP();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,t6(n,i),Ude(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),$de=-1,rHe=o(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");$de++;let a=300+5*30;i.append("line").attr("id","task"+$de).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),ZUe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=gP();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,t6(i,s),Ude(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),nHe=o(function(t,e){t6(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),iHe=o(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),gP=o(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ude=function(){function t(i,a,s,l,u,h,f,d){let p=a.append("text").attr("x",s+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}o(t,"byText");function e(i,a,s,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){let x=v*m-m*(y.length-1)/2,b=a.append("text").attr("x",s+u/2).attr("y",l).attr("fill",p).style("text-anchor","middle").style("font-size",m).style("font-family",g);b.append("tspan").attr("x",s+u/2).attr("dy",x).text(y[v]),b.attr("y",l+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(b,f)}}o(e,"byTspan");function r(i,a,s,l,u,h,f,d){let p=a.append("switch"),g=p.append("foreignObject").attr("x",s).attr("y",l).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");g.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,p,s,l,u,h,f,d),n(g,f)}o(r,"byFo");function n(i,a){for(let s in a)s in a&&i.attr(s,a[s])}return o(n,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),aHe=o(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");o(Hde,"wrap");sHe=o(function(t,e,r,n){let i=r%QUe-1,a=t.append("g");e.section=i,a.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+i));let s=a.append("g"),l=a.append("g"),h=l.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Hde,e.width).node().getBBox(),f=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=h.height+f*1.1*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,l.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),lHe(s,e,i,n),e},"drawNode"),oHe=o(function(t,e,r){let n=t.append("g"),a=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Hde,e.width).node().getBBox(),s=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),a.height+s*1.1*.5+e.padding},"getVirtualNodeHeight"),lHe=o(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${-e.height+2*5} q0,-5 5,-5 h${e.width-2*5} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),xf={drawRect:t6,drawCircle:JUe,drawSection:tHe,drawText:Vde,drawLabel:eHe,drawTask:rHe,drawBackgroundRect:nHe,getTextObj:iHe,getNoteRect:gP,initGraphics:aHe,drawNode:sHe,getVirtualNodeHeight:oHe}});var cHe,Wde,uHe,qde,Xde=R(()=>{"use strict";Zt();Yde();ut();_t();Yn();cHe=o(function(t,e,r,n){let i=de(),a=i.leftMargin??50;V.debug("timeline",n.db);let s=i.securityLevel,l;s==="sandbox"&&(l=$e("#i"+e));let h=(s==="sandbox"?$e(l.nodes()[0].contentDocument.body):$e("body")).select("#"+e);h.append("g");let f=n.db.getTasks(),d=n.db.getCommonDb().getDiagramTitle();V.debug("task",f),xf.initGraphics(h);let p=n.db.getSections();V.debug("sections",p);let m=0,g=0,y=0,v=0,x=50+a,b=50;v=50;let w=0,S=!0;p.forEach(function(L){let M={number:w,descr:L,section:w,width:150,padding:20,maxHeight:m},N=xf.getVirtualNodeHeight(h,M,i);V.debug("sectionHeight before draw",N),m=Math.max(m,N+20)});let T=0,E=0;V.debug("tasks.length",f.length);for(let[L,M]of f.entries()){let N={number:L,descr:M,section:M.section,width:150,padding:20,maxHeight:g},k=xf.getVirtualNodeHeight(h,N,i);V.debug("taskHeight before draw",k),g=Math.max(g,k+20),T=Math.max(T,M.events.length);let I=0;for(let C of M.events){let O={descr:C,section:M.section,number:M.section,width:150,padding:20,maxHeight:50};I+=xf.getVirtualNodeHeight(h,O,i)}E=Math.max(E,I)}V.debug("maxSectionHeight before draw",m),V.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach(L=>{let M=f.filter(C=>C.section===L),N={number:w,descr:L,section:w,width:200*Math.max(M.length,1)-50,padding:20,maxHeight:m};V.debug("sectionNode",N);let k=h.append("g"),I=xf.drawNode(k,N,w,i);V.debug("sectionNode output",I),k.attr("transform",`translate(${x}, ${v})`),b+=m+50,M.length>0&&Wde(h,M,w,x,b,g,i,T,E,m,!1),x+=200*Math.max(M.length,1),b=v,w++}):(S=!1,Wde(h,f,w,x,b,g,i,T,E,m,!0));let _=h.node().getBBox();V.debug("bounds",_),d&&h.append("text").text(d).attr("x",_.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=S?m+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",y).attr("x2",_.width+3*a).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Lo(void 0,h,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),Wde=o(function(t,e,r,n,i,a,s,l,u,h,f){for(let d of e){let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a};V.debug("taskNode",p);let m=t.append("g").attr("class","taskWrapper"),y=xf.drawNode(m,p,r,s).height;if(V.debug("taskHeight after draw",y),m.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,y),d.events){let v=t.append("g").attr("class","lineWrapper"),x=a;i+=100,x=x+uHe(t,d.events,r,n,i,s),i-=100,v.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+(f?a:h)+u+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,f&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),uHe=o(function(t,e,r,n,i,a){let s=0,l=i;i=i+100;for(let u of e){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};V.debug("eventNode",h);let f=t.append("g").attr("class","eventWrapper"),p=xf.drawNode(f,h,r,a).height;s=s+p,f.attr("transform",`translate(${n}, ${i})`),i=i+10+p}return i=l,s},"drawEvents"),qde={setConf:o(()=>{},"setConf"),draw:cHe}});var hHe,fHe,jde,Kde=R(()=>{"use strict";al();hHe=o(t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Wa(t["lineColor"+r])?t["lineColor"+r]=Et(t["lineColor"+r],20):t["lineColor"+r]=Dt(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let n=""+(17-3*r);e+=`
1830 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var E=this.next();return E||this.lex()},"lex"),begin:o(function(E){this.conditionStack.push(E)},"begin"),popState:o(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:o(function(E){this.begin(E)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(E,_,A,L){var M=L;switch(A){case 0:return E.getLogger().trace("Found comment",_.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:E.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return E.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:E.getLogger().trace("end icon"),this.popState();break;case 10:return E.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return E.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return E.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return E.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:E.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return E.getLogger().trace("description:",_.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),E.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),E.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),E.getLogger().trace("node end ...",_.yytext),"NODE_DEND";break;case 30:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return E.getLogger().trace("Long description:",_.yytext),20;break;case 36:return E.getLogger().trace("Long description:",_.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return S}();x.lexer=b;function w(){this.yy={}}return o(w,"Parser"),w.prototype=x,x.Parser=w,new w}();yP.parser=yP;t0e=yP});var Gl,n0e,vP,yHe,vHe,xHe,bHe,$i,wHe,THe,kHe,EHe,CHe,SHe,AHe,i0e,a0e=R(()=>{"use strict";_t();rr();ut();sl();Gl=[],n0e=0,vP={},yHe=o(()=>{Gl=[],n0e=0,vP={}},"clear"),vHe=o(function(t){for(let e=Gl.length-1;e>=0;e--)if(Gl[e].level<t)return Gl[e];return null},"getParent"),xHe=o(()=>Gl.length>0?Gl[0]:null,"getMindmap"),bHe=o((t,e,r,n)=>{V.info("addNode",t,e,r,n);let i=de(),a=i.mindmap?.padding??mr.mindmap.padding;switch(n){case $i.ROUNDED_RECT:case $i.RECT:case $i.HEXAGON:a*=2}let s={id:n0e++,nodeId:qr(e,i),level:t,descr:qr(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??mr.mindmap.maxNodeWidth,padding:a},l=vHe(t);if(l)l.children.push(s),Gl.push(s);else if(Gl.length===0)Gl.push(s);else throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")')},"addNode"),$i={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},wHe=o((t,e)=>{switch(V.debug("In get type",t,e),t){case"[":return $i.RECT;case"(":return e===")"?$i.ROUNDED_RECT:$i.CLOUD;case"((":return $i.CIRCLE;case")":return $i.CLOUD;case"))":return $i.BANG;case"{{":return $i.HEXAGON;default:return $i.DEFAULT}},"getType"),THe=o((t,e)=>{vP[t]=e},"setElementForId"),kHe=o(t=>{if(!t)return;let e=de(),r=Gl[Gl.length-1];t.icon&&(r.icon=qr(t.icon,e)),t.class&&(r.class=qr(t.class,e))},"decorateNode"),EHe=o(t=>{switch(t){case $i.DEFAULT:return"no-border";case $i.RECT:return"rect";case $i.ROUNDED_RECT:return"rounded-rect";case $i.CIRCLE:return"circle";case $i.CLOUD:return"cloud";case $i.BANG:return"bang";case $i.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),CHe=o(()=>V,"getLogger"),SHe=o(t=>vP[t],"getElementById"),AHe={clear:yHe,addNode:bHe,getMindmap:xHe,nodeType:$i,getType:wHe,setElementForId:THe,decorateNode:kHe,type2Str:EHe,getLogger:CHe,getElementById:SHe},i0e=AHe});function Hi(t){"@babel/helpers - typeof";return Hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hi(t)}function XP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s0e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function jP(t,e,r){return e&&s0e(t.prototype,e),r&&s0e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bpe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $l(t,e){return _He(t)||LHe(t,e)||wpe(t,e)||DHe()}function _He(t){if(Array.isArray(t))return t}function LHe(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,l;try{for(r=r.call(t);!(i=(s=r.next()).done)&&(n.push(s.value),!(e&&n.length===e));i=!0);}catch(u){a=!0,l=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw l}}return n}}function wpe(t,e){if(t){if(typeof t=="string")return o0e(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o0e(t,e)}}function o0e(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function DHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1868 `);await ta(f,d,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let p=f.node().getBBox(),[m]=mc(i.fontSize);if(r.height=p.height+m*1.1*.5+r.padding,r.width=p.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,l.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let y=Math.abs(r.height-g);l.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+y/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+(25+r.width/2)+", "+(y/2+r.padding/2)+")")}else if(a){let g=(r.width-p.width)/2,y=(r.height-p.height)/2;f.attr("transform","translate("+g+", "+y+")")}else{let g=r.width/2,y=r.padding/2;f.attr("transform","translate("+g+", "+y+")")}switch(r.type){case t.nodeType.DEFAULT:oZe(t,h,r,s);break;case t.nodeType.ROUNDED_RECT:pZe(t,h,r,s);break;case t.nodeType.RECT:lZe(t,h,r,s);break;case t.nodeType.CIRCLE:h.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),hZe(t,h,r,s);break;case t.nodeType.CLOUD:cZe(t,h,r,s);break;case t.nodeType.BANG:uZe(t,h,r,s);break;case t.nodeType.HEXAGON:dZe(t,h,r,s);break}return t.setElementForId(r.id,l),r.height},"drawNode"),oge=o(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")")},"positionNode")});async function uge(t,e,r,n,i){await sge(t,e,r,n,i),r.children&&await Promise.all(r.children.map((a,s)=>uge(t,e,a,n<0?s:n,i)))}function mZe(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;V.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}function hge(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{hge(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}})})}function gZe(t,e){return new Promise(r=>{let n=$e("body").append("div").attr("id","cy").attr("style","display:none"),i=rl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),hge(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{V.info("Ready",a),r(i)})})}function yZe(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,oge(t,i);let a=t.getElementById(i.nodeId);V.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)})}var cge,vZe,fge,dge=R(()=>{"use strict";vB();cge=Xi(age(),1);Zt();_t();ut();pf();Yn();lge();sl();rl.use(cge.default);o(uge,"drawNodes");o(mZe,"drawEdges");o(hge,"addNodes");o(gZe,"layoutMindmap");o(yZe,"positionNodes");vZe=o(async(t,e,r,n)=>{V.debug(`Rendering mindmap diagram
1931 `).trim(),"prepareTextForParsing")});var Kge={};hr(Kge,{diagram:()=>YZe});var HZe,YZe,Qge=R(()=>{"use strict";bge();Tge();qge();jge();HZe=cb.parse.bind(cb);cb.parse=t=>HZe(Xge(t));YZe={parser:cb,db:wge,renderer:Wge}});var e1e,FB,jZe,KZe,QZe,ZZe,JZe,Mf,zB=R(()=>{"use strict";qs();sl();xr();bi();e1e={packet:[]},FB=structuredClone(e1e),jZe=mr.packet,KZe=o(()=>{let t=Ts({...jZe,...Or().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),QZe=o(()=>FB.packet,"getPacket"),ZZe=o(t=>{t.length>0&&FB.packet.push(t)},"pushWord"),JZe=o(()=>{vr(),FB=structuredClone(e1e)},"clear"),Mf={pushWord:ZZe,getPacket:QZe,getConfig:KZe,clear:JZe,setAccTitle:kr,getAccTitle:Ar,setDiagramTitle:nn,getDiagramTitle:Xr,getAccDescription:Lr,setAccDescription:_r}});var eJe,tJe,rJe,t1e,r1e=R(()=>{"use strict";Lg();ut();sx();zB();eJe=1e4,tJe=o(t=>{cf(t,Mf);let e=-1,r=[],n=1,{bitsPerRow:i}=Mf.getConfig();for(let{start:a,end:s,label:l}of t.blocks){if(s&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a!==e+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${e+1}.`);for(e=s??a,V.debug(`Packet block ${a} - ${e} with label ${l}`);r.length<=i+1&&Mf.getPacket().length<eJe;){let[u,h]=rJe({start:a,end:s,label:l},n,i);if(r.push(u),u.end+1===n*i&&(Mf.pushWord(r),r=[],n++),!h)break;({start:a,end:s,label:l}=h)}}Mf.pushWord(r)},"populate"),rJe=o((t,e,r)=>{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),t1e={parse:o(async t=>{let e=await Fl("packet",t);V.debug(e),tJe(e)},"parse")}});var nJe,iJe,n1e,i1e=R(()=>{"use strict";pf();Yn();nJe=o((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:l,bitWidth:u,bitsPerRow:h}=a,f=i.getPacket(),d=i.getDiagramTitle(),p=s+l,m=p*(f.length+1)-(d?0:s),g=u*h+2,y=Ps(e);y.attr("viewbox",`0 0 ${g} ${m}`),Sr(y,m,g,a.useMaxWidth);for(let[v,x]of f.entries())iJe(y,x,v,a);y.append("text").text(d).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),iJe=o((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:l,showBits:u})=>{let h=t.append("g"),f=r*(n+a)+a;for(let d of e){let p=d.start%l*s+1,m=(d.end-d.start+1)*s-i;if(h.append("rect").attr("x",p).attr("y",f).attr("width",m).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",f+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(d.label),!u)continue;let g=d.end===d.start,y=f-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(d.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(d.end)}},"drawWord"),n1e={draw:nJe}});var aJe,a1e,s1e=R(()=>{"use strict";xr();aJe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},a1e=o(({packet:t}={})=>{let e=Ts(aJe,t);return`
1959 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var T=this.next();return T||this.lex()},"lex"),begin:o(function(T){this.conditionStack.push(T)},"begin"),popState:o(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:o(function(T){this.begin(T)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(T,E,_,A){var L=A;switch(_){case 0:return 10;case 1:return T.getLogger().debug("Found space-block"),31;break;case 2:return T.getLogger().debug("Found nl-block"),31;break;case 3:return T.getLogger().debug("Found space-block"),29;break;case 4:T.getLogger().debug(".",E.yytext);break;case 5:T.getLogger().debug("_",E.yytext);break;case 6:return 5;case 7:return E.yytext=-1,28;break;case 8:return E.yytext=E.yytext.replace(/columns\s+/,""),T.getLogger().debug("COLUMNS (LEX)",E.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:T.getLogger().debug("LEX: POPPING STR:",E.yytext),this.popState();break;case 14:return T.getLogger().debug("LEX: STR end:",E.yytext),"STR";break;case 15:return E.yytext=E.yytext.replace(/space\:/,""),T.getLogger().debug("SPACE NUM (LEX)",E.yytext),21;break;case 16:return E.yytext="1",T.getLogger().debug("COLUMNS (LEX)",E.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),T.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),T.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),T.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),T.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),T.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),T.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),T.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),T.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),T.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),T.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return T.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return T.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return T.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return T.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return T.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return T.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return T.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),T.getLogger().debug("LEX ARR START"),38;break;case 75:return T.getLogger().debug("Lex: NODE_ID",E.yytext),32;break;case 76:return T.getLogger().debug("Lex: EOF",E.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:T.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:T.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return T.getLogger().debug("LEX: NODE_DESCR:",E.yytext),"NODE_DESCR";break;case 84:T.getLogger().debug("LEX POPPING"),this.popState();break;case 85:T.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (right): dir:",E.yytext),"DIR";break;case 87:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (left):",E.yytext),"DIR";break;case 88:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (x):",E.yytext),"DIR";break;case 89:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (y):",E.yytext),"DIR";break;case 90:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (up):",E.yytext),"DIR";break;case 91:return E.yytext=E.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (down):",E.yytext),"DIR";break;case 92:return E.yytext="]>",T.getLogger().debug("Lex (ARROW_DIR end):",E.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return T.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 94:return T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 95:return T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 96:return T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 97:return T.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 98:return T.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 99:return T.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return T.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),T.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 103:return this.popState(),T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 104:return this.popState(),T.getLogger().debug("Lex: LINK",E.yytext),15;break;case 105:return T.getLogger().debug("Lex: COLON",E.yytext),E.yytext=E.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return w}();v.lexer=x;function b(){this.yy={}}return o(b,"Parser"),b.prototype=v,v.Parser=b,new b}();GB.parser=GB;h1e=GB});function gJe(t){switch(V.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return V.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function yJe(t){switch(V.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function vJe(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var Yl,VB,$B,d1e,p1e,cJe,g1e,uJe,aC,hJe,fJe,dJe,pJe,y1e,UB,db,mJe,m1e,xJe,bJe,wJe,TJe,kJe,EJe,CJe,SJe,AJe,_Je,LJe,v1e,x1e=R(()=>{"use strict";gL();qs();_t();ut();rr();bi();Yl=new Map,VB=[],$B=new Map,d1e="color",p1e="fill",cJe="bgFill",g1e=",",uJe=de(),aC=new Map,hJe=o(t=>We.sanitizeText(t,uJe),"sanitizeText"),fJe=o(function(t,e=""){let r=aC.get(t);r||(r={id:t,styles:[],textStyles:[]},aC.set(t,r)),e?.split(g1e).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(d1e).exec(n)){let s=i.replace(p1e,cJe).replace(d1e,p1e);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),dJe=o(function(t,e=""){let r=Yl.get(t);e!=null&&(r.styles=e.split(g1e))},"addStyle2Node"),pJe=o(function(t,e){t.split(",").forEach(function(r){let n=Yl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Yl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),y1e=o((t,e)=>{let r=t.flat(),n=[];for(let i of r){if(i.label&&(i.label=hJe(i.label)),i.type==="classDef"){fJe(i.id,i.css);continue}if(i.type==="applyClass"){pJe(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&dJe(i.id,i?.stylesStr);continue}if(i.type==="column-setting")e.columns=i.columns??-1;else if(i.type==="edge"){let a=($B.get(i.id)??0)+1;$B.set(i.id,a),i.id=a+"-"+i.id,VB.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let a=Yl.get(i.id);if(a===void 0?Yl.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&y1e(i.children,i),i.type==="space"){let s=i.width??1;for(let l=0;l<s;l++){let u=Qr(i);u.id=u.id+"-"+l,Yl.set(u.id,u),n.push(u)}}else a===void 0&&n.push(i)}}e.children=n},"populateBlockDatabase"),UB=[],db={id:"root",type:"composite",children:[],columns:-1},mJe=o(()=>{V.debug("Clear called"),vr(),db={id:"root",type:"composite",children:[],columns:-1},Yl=new Map([["root",db]]),UB=[],aC=new Map,VB=[],$B=new Map},"clear");o(gJe,"typeStr2Type");o(yJe,"edgeTypeStr2Type");o(vJe,"edgeStrToEdgeData");m1e=0,xJe=o(()=>(m1e++,"id-"+Math.random().toString(36).substr(2,12)+"-"+m1e),"generateId"),bJe=o(t=>{db.children=t,y1e(t,db),UB=db.children},"setHierarchy"),wJe=o(t=>{let e=Yl.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),TJe=o(()=>[...Yl.values()],"getBlocksFlat"),kJe=o(()=>UB||[],"getBlocks"),EJe=o(()=>VB,"getEdges"),CJe=o(t=>Yl.get(t),"getBlock"),SJe=o(t=>{Yl.set(t.id,t)},"setBlock"),AJe=o(()=>console,"getLogger"),_Je=o(function(){return aC},"getClasses"),LJe={getConfig:o(()=>Or().block,"getConfig"),typeStr2Type:gJe,edgeTypeStr2Type:yJe,edgeStrToEdgeData:vJe,getLogger:AJe,getBlocksFlat:TJe,getBlocks:kJe,getEdges:EJe,setHierarchy:bJe,getBlock:CJe,setBlock:SJe,getColumns:wJe,getClasses:_Je,clear:mJe,generateId:xJe},v1e=LJe});var sC,DJe,b1e,w1e=R(()=>{"use strict";al();sC=o((t,e)=>{let r=X1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Ws(n,i,a,e)},"fade"),DJe=o(t=>`.label {
2071 `,"getStyles"),b1e=DJe});function RJe(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function HB(t,e,r=0,n=0){V.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let m of t.children)HB(m,e);let s=NJe(t);i=s.width,a=s.height,V.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let m of t.children)m.size&&(V.debug(`abc95 Setting size of children of ${t.id} id=${m.id} ${i} ${a} ${JSON.stringify(m.size)}`),m.size.width=i*(m.widthInColumns??1)+mi*((m.widthInColumns??1)-1),m.size.height=a,m.size.x=0,m.size.y=0,V.debug(`abc95 updating size of ${t.id} children child:${m.id} maxWidth:${i} maxHeight:${a}`));for(let m of t.children)HB(m,e,i,a);let l=t.columns??-1,u=0;for(let m of t.children)u+=m.widthInColumns??1;let h=t.children.length;l>0&&l<u&&(h=l);let f=Math.ceil(u/h),d=h*(i+mi)+mi,p=f*(a+mi)+mi;if(d<r){V.debug(`Detected to small siebling: abc95 ${t.id} sieblingWidth ${r} sieblingHeight ${n} width ${d}`),d=r,p=n;let m=(r-h*mi-mi)/h,g=(n-f*mi-mi)/f;V.debug("Size indata abc88",t.id,"childWidth",m,"maxWidth",i),V.debug("Size indata abc88",t.id,"childHeight",g,"maxHeight",a),V.debug("Size indata abc88 xSize",h,"padding",mi);for(let y of t.children)y.size&&(y.size.width=m,y.size.height=g,y.size.x=0,y.size.y=0)}if(V.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${f} columns ${l}${t.children.length} width=${Math.max(d,t.size?.width||0)}`),d<(t?.size?.width||0)){d=t?.size?.width||0;let m=l>0?Math.min(t.children.length,l):t.children.length;if(m>0){let g=(d-m*mi-mi)/m;V.debug("abc95 (growing to fit) width",t.id,d,t.size?.width,g);for(let y of t.children)y.size&&(y.size.width=g)}}t.size={width:d,height:p,x:0,y:0}}V.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function T1e(t,e){V.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(V.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*mi;V.debug("widthOfChildren 88",i,"posX");let a=0;V.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-mi,l=0;for(let u of t.children){let h=t;if(!u.size)continue;let{width:f,height:d}=u.size,{px:p,py:m}=RJe(r,a);if(m!=l&&(l=m,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-mi,V.debug("New row in layout for block",t.id," and child ",u.id,l)),V.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${a} (px, py) ${p},${m} (${h?.size?.x},${h?.size?.y}) parent: ${h.id} width: ${f}${mi}`),h.size){let g=f/2;u.size.x=s+mi+g,V.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${s} new startingPosX${u.size.x} ${g} padding=${mi} width=${f} halfWidth=${g} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(u?.widthInColumns??1)/2}`),s=u.size.x+g,u.size.y=h.size.y-h.size.height/2+m*(d+mi)+d/2+mi,V.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${s}${mi}${g}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${f*(u?.widthInColumns??1)/2}`)}u.children&&T1e(u,e),a+=u?.widthInColumns??1,V.debug("abc88 columnsPos",u,a)}}V.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function k1e(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:l,height:u}=t.size;a-l/2<e&&(e=a-l/2),s-u/2<r&&(r=s-u/2),a+l/2>n&&(n=a+l/2),s+u/2>i&&(i=s+u/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=k1e(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function E1e(t){let e=t.getBlock("root");if(!e)return;HB(e,t,0,0),T1e(e,t),V.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=k1e(e),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}var mi,NJe,C1e=R(()=>{"use strict";ut();_t();mi=de()?.block?.padding??8;o(RJe,"calculateBlockPosition");NJe=o(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};V.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");o(HB,"setBlockSizes");o(T1e,"layoutBlocks");o(k1e,"findBounds");o(E1e,"layout")});function S1e(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let u=lm(n?.styles??[]),h=n.label,f=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:u.labelStyle,shape:s,labelText:h,rx:a,ry:a,class:i,style:u.style,id:n.id,directions:n.directions,width:f.width,height:f.height,x:f.x,y:f.y,positioned:r,intersect:void 0,type:n.type,padding:l??Or()?.block?.padding??0}}async function MJe(t,e,r){let n=S1e(e,r,!1);if(n.type==="group")return;let i=await pm(t,n),a=i.node().getBBox(),s=r.getBlock(n.id);s.size={width:a.width,height:a.height,x:0,y:0,node:i},r.setBlock(s),i.remove()}async function IJe(t,e,r){let n=S1e(e,r,!0);r.getBlock(n.id).type!=="space"&&(await pm(t,n),e.intersect=n?.intersect,wv(n))}async function YB(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await YB(t,i.children,r,n)}async function A1e(t,e,r){await YB(t,e,r,MJe)}async function _1e(t,e,r){await YB(t,e,r,IJe)}async function L1e(t,e,r,n,i){let a=new lr({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let l=n.getBlock(s.start),u=n.getBlock(s.end);if(l?.size&&u?.size){let h=l.size,f=u.size,d=[{x:h.x,y:h.y},{x:h.x+(f.x-h.x)/2,y:h.y+(f.y-h.y)/2},{x:f.x,y:f.y}];PE(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await IE(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),OE({...s,x:d[1].x,y:d[1].y},{originalPath:d}))}}}var D1e=R(()=>{"use strict";ya();qs();DO();M5();xr();o(S1e,"getNodeFromBlock");o(MJe,"calculateBlockSize");o(IJe,"insertBlockPositioned");o(YB,"performOperations");o(A1e,"calculateBlockSizes");o(_1e,"insertBlocks");o(L1e,"insertEdges")});var OJe,PJe,R1e,N1e=R(()=>{"use strict";Zt();qs();LO();ut();Yn();C1e();D1e();OJe=o(function(t,e){return e.db.getClasses()},"getClasses"),PJe=o(async function(t,e,r,n){let{securityLevel:i,block:a}=Or(),s=n.db,l;i==="sandbox"&&(l=$e("#i"+e));let u=i==="sandbox"?$e(l.nodes()[0].contentDocument.body):$e("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):$e(`[id="${e}"]`);LE(h,["point","circle","cross"],n.type,e);let d=s.getBlocks(),p=s.getBlocksFlat(),m=s.getEdges(),g=h.insert("g").attr("class","block");await A1e(g,d,s);let y=E1e(s);if(await _1e(g,d,s),await L1e(g,m,p,s,e),y){let v=y,x=Math.max(1,Math.round(.125*(v.width/v.height))),b=v.height+x+10,w=v.width+10,{useMaxWidth:S}=a;Sr(h,b,w,!!S),V.debug("Here Bounds",y,v),h.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),R1e={draw:PJe,getClasses:OJe}});var M1e={};hr(M1e,{diagram:()=>BJe});var BJe,I1e=R(()=>{"use strict";f1e();x1e();w1e();N1e();BJe={parser:h1e,db:v1e,renderer:R1e,styles:b1e}});var WB,qB,pb,B1e,XB,cs,Wc,oC,F1e,$Je,mb,z1e,G1e,$1e,V1e,lC,If,cC=R(()=>{"use strict";WB={L:"left",R:"right",T:"top",B:"bottom"},qB={L:o(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:o(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:o(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:o(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},pb={L:o((t,e)=>t-e+2,"L"),R:o((t,e)=>t-2,"R"),T:o((t,e)=>t-e+2,"T"),B:o((t,e)=>t-2,"B")},B1e=o(function(t){return cs(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),XB=o(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),cs=o(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),Wc=o(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),oC=o(function(t,e){let r=cs(t)&&Wc(e),n=Wc(t)&&cs(e);return r||n},"isArchitectureDirectionXY"),F1e=o(function(t){let e=t[0],r=t[1],n=cs(e)&&Wc(r),i=Wc(e)&&cs(r);return n||i},"isArchitecturePairXY"),$Je=o(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),mb=o(function(t,e){let r=`${t}${e}`;return $Je(r)?r:void 0},"getArchitectureDirectionPair"),z1e=o(function([t,e],r){let n=r[0],i=r[1];return cs(n)?Wc(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:cs(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),G1e=o(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),$1e=o(function(t){return t.type==="service"},"isArchitectureService"),V1e=o(function(t){return t.type==="junction"},"isArchitectureJunction"),lC=o(t=>t.data(),"edgeData"),If=o(t=>t.data(),"nodeData")});function Ci(t){let e=de().architecture;return e?.[t]?e[t]:U1e[t]}var U1e,nr,VJe,UJe,HJe,YJe,WJe,qJe,XJe,jJe,KJe,QJe,ZJe,JJe,eet,tet,Z0,gb=R(()=>{"use strict";sl();_t();Jk();bi();cC();U1e=mr.architecture,nr=new uf(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:U1e,dataStructures:void 0,elements:{}})),VJe=o(()=>{nr.reset(),vr()},"clear"),UJe=o(function({id:t,icon:e,in:r,title:n,iconText:i}){if(nr.records.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${nr.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(nr.records.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(nr.records.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}nr.records.registeredIds[t]="node",nr.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),HJe=o(()=>Object.values(nr.records.nodes).filter($1e),"getServices"),YJe=o(function({id:t,in:e}){nr.records.registeredIds[t]="node",nr.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),WJe=o(()=>Object.values(nr.records.nodes).filter(V1e),"getJunctions"),qJe=o(()=>Object.values(nr.records.nodes),"getNodes"),XJe=o(t=>nr.records.nodes[t],"getNode"),jJe=o(function({id:t,icon:e,in:r,title:n}){if(nr.records.registeredIds[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${nr.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(nr.records.registeredIds[r]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(nr.records.registeredIds[r]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}nr.records.registeredIds[t]="group",nr.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),KJe=o(()=>Object.values(nr.records.groups),"getGroups"),QJe=o(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:l,title:u}){if(!XB(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(!XB(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${n}`);if(nr.records.nodes[t]===void 0&&nr.records.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(nr.records.nodes[e]===void 0&&nr.records.groups[t]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let h=nr.records.nodes[t].in,f=nr.records.nodes[e].in;if(s&&h&&f&&h==f)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&h&&f&&h==f)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:l,title:u};nr.records.edges.push(d),nr.records.nodes[t]&&nr.records.nodes[e]&&(nr.records.nodes[t].edges.push(nr.records.edges[nr.records.edges.length-1]),nr.records.nodes[e].edges.push(nr.records.edges[nr.records.edges.length-1]))},"addEdge"),ZJe=o(()=>nr.records.edges,"getEdges"),JJe=o(()=>{if(nr.records.dataStructures===void 0){let t=Object.entries(nr.records.nodes).reduce((s,[l,u])=>(s[l]=u.edges.reduce((h,f)=>{if(f.lhsId===l){let d=mb(f.lhsDir,f.rhsDir);d&&(h[d]=f.rhsId)}else{let d=mb(f.rhsDir,f.lhsDir);d&&(h[d]=f.lhsId)}return h},{}),s),{}),e=Object.keys(t)[0],r={[e]:1},n=Object.keys(t).reduce((s,l)=>l===e?s:{...s,[l]:1},{}),i=o(s=>{let l={[s]:[0,0]},u=[s];for(;u.length>0;){let h=u.shift();if(h){r[h]=1,delete n[h];let f=t[h],[d,p]=l[h];Object.entries(f).forEach(([m,g])=>{r[g]||(l[g]=z1e([d,p],m),u.push(g))})}}return l},"BFS"),a=[i(e)];for(;Object.keys(n).length>0;)a.push(i(Object.keys(n)[0]));nr.records.dataStructures={adjList:t,spatialMaps:a}}return nr.records.dataStructures},"getDataStructures"),eet=o((t,e)=>{nr.records.elements[t]=e},"setElementForId"),tet=o(t=>nr.records.elements[t],"getElementById"),Z0={clear:VJe,setDiagramTitle:nn,getDiagramTitle:Xr,setAccTitle:kr,getAccTitle:Ar,setAccDescription:_r,getAccDescription:Lr,addService:UJe,getServices:HJe,addJunction:YJe,getJunctions:WJe,getNodes:qJe,getNode:XJe,addGroup:jJe,getGroups:KJe,addEdge:QJe,getEdges:ZJe,setElementForId:eet,getElementById:tet,getDataStructures:JJe};o(Ci,"getConfigField")});var ret,H1e,Y1e=R(()=>{"use strict";Lg();ut();sx();gb();ret=o((t,e)=>{cf(t,e),t.groups.map(e.addGroup),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),H1e={parse:o(async t=>{let e=await Fl("architecture",t);V.debug(e),ret(e,Z0)},"parse")}});var net,W1e,q1e=R(()=>{"use strict";net=o(t=>`
2102 `,"getStyles"),W1e=net});var KB=gi((yb,jB)=>{"use strict";o(function(e,r){typeof yb=="object"&&typeof jB=="object"?jB.exports=r():typeof define=="function"&&define.amd?define([],r):typeof yb=="object"?yb.layoutBase=r():e.layoutBase=r()},"webpackUniversalModuleDefinition")(yb,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return o(r,"__webpack_require__"),r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?o(function(){return n.default},"getDefault"):o(function(){return n},"getModuleExports");return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)}([function(t,e,r){"use strict";function n(){}o(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(u,h,f){n.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=u,this.target=h}o(s,"LEdge"),s.prototype=Object.create(n.prototype);for(var l in n)s[l]=n[l];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(u,h){for(var f=this.getOtherEnd(u),d=h.getGraphManager().getRoot();;){if(f.getOwner()==h)return f;if(f.getOwner()==d)break;f=f.getOwner().getParent()}return null},s.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}o(n,"LGraphObject"),t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),l=r(16),u=r(5);function h(d,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),d.graphManager!=null&&(d=d.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=d,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a}o(h,"LNode"),h.prototype=Object.create(n.prototype);for(var f in n)h[f]=n[f];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(d){this.rect.width=d},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(d){this.rect.height=d},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(d,p){this.rect.x=d.x,this.rect.y=d.y,this.rect.width=p.width,this.rect.height=p.height},h.prototype.setCenter=function(d,p){this.rect.x=d-this.rect.width/2,this.rect.y=p-this.rect.height/2},h.prototype.setLocation=function(d,p){this.rect.x=d,this.rect.y=p},h.prototype.moveBy=function(d,p){this.rect.x+=d,this.rect.y+=p},h.prototype.getEdgeListToNode=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==d){if(y.source!=g)throw"Incorrect edge source!";p.push(y)}}),p},h.prototype.getEdgesBetween=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==d||y.source==d)&&p.push(y)}),p},h.prototype.getNeighborsList=function(){var d=new Set,p=this;return p.edges.forEach(function(m){if(m.source==p)d.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";d.add(m.source)}}),d},h.prototype.withChildren=function(){var d=new Set,p,m;if(d.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;y<g.length;y++)p=g[y],m=p.withChildren(),m.forEach(function(v){d.add(v)});return d},h.prototype.getNoOfChildren=function(){var d=0,p;if(this.child==null)d=1;else for(var m=this.child.getNodes(),g=0;g<m.length;g++)p=m[g],d+=p.getNoOfChildren();return d==0&&(d=1),d},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},h.prototype.scatter=function(){var d,p,m=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;d=s.WORLD_CENTER_X+l.nextDouble()*(g-m)+m;var y=-s.INITIAL_WORLD_BOUNDARY,v=s.INITIAL_WORLD_BOUNDARY;p=s.WORLD_CENTER_Y+l.nextDouble()*(v-y)+y,this.rect.x=d,this.rect.y=p},h.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var d=this.getChild();if(d.updateBounds(!0),this.rect.x=d.getLeft(),this.rect.y=d.getTop(),this.setWidth(d.getRight()-d.getLeft()),this.setHeight(d.getBottom()-d.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var p=d.getRight()-d.getLeft(),m=d.getBottom()-d.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(p+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>p?(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(p+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(m+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>m?(this.rect.y-=(this.labelHeight-m)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(m+this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(d){var p=this.rect.x;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=this.rect.y;m>s.WORLD_BOUNDARY?m=s.WORLD_BOUNDARY:m<-s.WORLD_BOUNDARY&&(m=-s.WORLD_BOUNDARY);var g=new u(p,m),y=d.inverseTransformPoint(g);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=h},function(t,e,r){"use strict";var n=r(0);function i(){}o(i,"FDLayoutConstants");for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}o(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),l=r(3),u=r(1),h=r(13),f=r(12),d=r(11);function p(g,y,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,y!=null&&y instanceof s?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}o(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b)}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,w=0;w<b;w++)x=v[w],x.isInterGraph?this.graphManager.remove(x):x.source.owner.remove(x);var S=this.nodes.indexOf(y);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(g instanceof u){var x=g;if(x==null)throw"Edge is null!";if(!(x.source!=null&&x.target!=null))throw"Source and/or target is null!";if(!(x.source.owner!=null&&x.target.owner!=null&&x.source.owner==this&&x.target.owner==this))throw"Source and/or target owner is invalid!";var T=x.source.edges.indexOf(x),E=x.target.edges.indexOf(x);if(!(T>-1&&E>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(T,1),x.target!=x.source&&x.target.edges.splice(E,1);var S=x.source.owner.getEdges().indexOf(x);if(S==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(S,1)}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,w=this.getNodes(),S=w.length,T=0;T<S;T++){var E=w[T];v=E.getTop(),x=E.getLeft(),g>v&&(g=v),y>x&&(y=x)}return g==i.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new f(this.left,this.top))},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,w,S,T,E,_,A=this.nodes,L=A.length,M=0;M<L;M++){var N=A[M];g&&N.child!=null&&N.updateBounds(),w=N.getLeft(),S=N.getRight(),T=N.getTop(),E=N.getBottom(),y>w&&(y=w),v<S&&(v=S),x>T&&(x=T),b<E&&(b=E)}var k=new h(y,x,v-y,b-x);y==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),A[0].getParent().paddingLeft!=null?_=A[0].getParent().paddingLeft:_=this.margin,this.left=k.x-_,this.right=k.x+k.width+_,this.top=k.y-_,this.bottom=k.y+k.height+_},p.calculateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,w,S,T,E,_=g.length,A=0;A<_;A++){var L=g[A];w=L.getLeft(),S=L.getRight(),T=L.getTop(),E=L.getBottom(),y>w&&(y=w),v<S&&(v=S),x>T&&(x=T),b<E&&(b=E)}var M=new h(y,x,v-y,b-x);return M},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var g=0,y=this.nodes,v=y.length,x=0;x<v;x++){var b=y[x];g+=b.calcEstimatedSize()}return g==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize},p.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return}var y=new d,v=new Set,x=this.nodes[0],b,w,S=x.withChildren();for(S.forEach(function(M){y.push(M),v.add(M)});y.length!==0;){x=y.shift(),b=x.getEdges();for(var T=b.length,E=0;E<T;E++){var _=b[E];if(w=_.getOtherEndInGraph(x,this),w!=null&&!v.has(w)){var A=w.withChildren();A.forEach(function(M){y.push(M),v.add(M)})}}}if(this.isConnected=!1,v.size>=this.nodes.length){var L=0;v.forEach(function(M){M.owner==g&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},t.exports=p},function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}o(a,"LGraphManager"),a.prototype.addRoot=function(){var s=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(s,l);return this.setRootGraph(u),this.rootGraph},a.prototype.add=function(s,l,u,h,f){if(u==null&&h==null&&f==null){if(s==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return s.parent=l,l.child=s,s}else{f=u,h=l,u=s;var d=h.getOwner(),p=f.getOwner();if(!(d!=null&&d.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(d==p)return u.isInterGraph=!1,d.add(u,h,f);if(u.isInterGraph=!0,u.source=h,u.target=f,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},a.prototype.remove=function(s){if(s instanceof n){var l=s;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(l.getEdges());for(var h,f=u.length,d=0;d<f;d++)h=u[d],l.remove(h);var p=[];p=p.concat(l.getNodes());var m;f=p.length;for(var d=0;d<f;d++)m=p[d],l.remove(m);l==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(l);this.graphs.splice(g,1),l.parent=null}else if(s instanceof i){if(h=s,h==null)throw"Edge is null!";if(!h.isInterGraph)throw"Not an inter-graph edge!";if(!(h.source!=null&&h.target!=null))throw"Source and/or target is null!";if(!(h.source.edges.indexOf(h)!=-1&&h.target.edges.indexOf(h)!=-1))throw"Source and/or target doesn't know this edge!";var g=h.source.edges.indexOf(h);if(h.source.edges.splice(g,1),g=h.target.edges.indexOf(h),h.target.edges.splice(g,1),!(h.source.owner!=null&&h.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(h.source.owner.getGraphManager().edges.indexOf(h)==-1)throw"Not in owner graph manager's edge list!";var g=h.source.owner.getGraphManager().edges.indexOf(h);h.source.owner.getGraphManager().edges.splice(g,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],l=this.getGraphs(),u=l.length,h=0;h<u;h++)s=s.concat(l[h].getNodes());this.allNodes=s}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],l=this.getGraphs(),u=l.length,h=0;h<l.length;h++)s=s.concat(l[h].getEdges());s=s.concat(this.edges),this.allEdges=s}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(s,l){if(!(s!=null&&l!=null))throw"assert failed";if(s==l)return!0;var u=s.getOwner(),h;do{if(h=u.getParent(),h==null)break;if(h==l)return!0;if(u=h.getOwner(),u==null)break}while(!0);u=l.getOwner();do{if(h=u.getParent(),h==null)break;if(h==s)return!0;if(u=h.getOwner(),u==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var s,l,u,h,f,d=this.getAllEdges(),p=d.length,m=0;m<p;m++){if(s=d[m],l=s.source,u=s.target,s.lca=null,s.sourceInLca=l,s.targetInLca=u,l==u){s.lca=l.getOwner();continue}for(h=l.getOwner();s.lca==null;){for(s.targetInLca=u,f=u.getOwner();s.lca==null;){if(f==h){s.lca=f;break}if(f==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=f.getParent(),f=s.targetInLca.getOwner()}if(h==this.rootGraph)break;s.lca==null&&(s.sourceInLca=h.getParent(),h=s.sourceInLca.getOwner())}if(s.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(s,l){if(s==l)return s.getOwner();var u=s.getOwner();do{if(u==null)break;var h=l.getOwner();do{if(h==null)break;if(h==u)return h;h=h.getParent().getOwner()}while(!0);u=u.getParent().getOwner()}while(!0);return u},a.prototype.calcInclusionTreeDepths=function(s,l){s==null&&l==null&&(s=this.rootGraph,l=1);for(var u,h=s.getNodes(),f=h.length,d=0;d<f;d++)u=h[d],u.inclusionTreeDepth=l,u.child!=null&&this.calcInclusionTreeDepths(u.child,l+1)},a.prototype.includesInvalidEdge=function(){for(var s,l=[],u=this.edges.length,h=0;h<u;h++)s=this.edges[h],this.isOneAncestorOfOther(s.source,s.target)&&l.push(s);for(var h=0;h<l.length;h++)this.remove(l[h]);return!1},t.exports=a},function(t,e,r){"use strict";var n=r(12);function i(){}o(i,"IGeometry"),i.calcSeparationAmount=function(a,s,l,u){if(!a.intersects(s))throw"assert failed";var h=new Array(2);this.decideDirectionsForOverlappingNodes(a,s,h),l[0]=Math.min(a.getRight(),s.getRight())-Math.max(a.x,s.x),l[1]=Math.min(a.getBottom(),s.getBottom())-Math.max(a.y,s.y),a.getX()<=s.getX()&&a.getRight()>=s.getRight()?l[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?l[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var f=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(f=1);var d=f*l[0],p=l[1]/f;l[0]<p?p=l[0]:d=l[1],l[0]=-1*h[0]*(p/2+u),l[1]=-1*h[1]*(d/2+u)},i.decideDirectionsForOverlappingNodes=function(a,s,l){a.getCenterX()<s.getCenterX()?l[0]=-1:l[0]=1,a.getCenterY()<s.getCenterY()?l[1]=-1:l[1]=1},i.getIntersection2=function(a,s,l){var u=a.getCenterX(),h=a.getCenterY(),f=s.getCenterX(),d=s.getCenterY();if(a.intersects(s))return l[0]=u,l[1]=h,l[2]=f,l[3]=d,!0;var p=a.getX(),m=a.getY(),g=a.getRight(),y=a.getX(),v=a.getBottom(),x=a.getRight(),b=a.getWidthHalf(),w=a.getHeightHalf(),S=s.getX(),T=s.getY(),E=s.getRight(),_=s.getX(),A=s.getBottom(),L=s.getRight(),M=s.getWidthHalf(),N=s.getHeightHalf(),k=!1,I=!1;if(u===f){if(h>d)return l[0]=u,l[1]=m,l[2]=f,l[3]=A,!1;if(h<d)return l[0]=u,l[1]=v,l[2]=f,l[3]=T,!1}else if(h===d){if(u>f)return l[0]=p,l[1]=h,l[2]=E,l[3]=d,!1;if(u<f)return l[0]=g,l[1]=h,l[2]=S,l[3]=d,!1}else{var C=a.height/a.width,O=s.height/s.width,D=(d-h)/(f-u),P=void 0,F=void 0,B=void 0,$=void 0,z=void 0,Y=void 0;if(-C===D?u>f?(l[0]=y,l[1]=v,k=!0):(l[0]=g,l[1]=m,k=!0):C===D&&(u>f?(l[0]=p,l[1]=m,k=!0):(l[0]=x,l[1]=v,k=!0)),-O===D?f>u?(l[2]=_,l[3]=A,I=!0):(l[2]=E,l[3]=T,I=!0):O===D&&(f>u?(l[2]=S,l[3]=T,I=!0):(l[2]=L,l[3]=A,I=!0)),k&&I)return!1;if(u>f?h>d?(P=this.getCardinalDirection(C,D,4),F=this.getCardinalDirection(O,D,2)):(P=this.getCardinalDirection(-C,D,3),F=this.getCardinalDirection(-O,D,1)):h>d?(P=this.getCardinalDirection(-C,D,1),F=this.getCardinalDirection(-O,D,3)):(P=this.getCardinalDirection(C,D,2),F=this.getCardinalDirection(O,D,4)),!k)switch(P){case 1:$=m,B=u+-w/D,l[0]=B,l[1]=$;break;case 2:B=x,$=h+b*D,l[0]=B,l[1]=$;break;case 3:$=v,B=u+w/D,l[0]=B,l[1]=$;break;case 4:B=y,$=h+-b*D,l[0]=B,l[1]=$;break}if(!I)switch(F){case 1:Y=T,z=f+-N/D,l[2]=z,l[3]=Y;break;case 2:z=L,Y=d+M*D,l[2]=z,l[3]=Y;break;case 3:Y=A,z=f+N/D,l[2]=z,l[3]=Y;break;case 4:z=_,Y=d+-M*D,l[2]=z,l[3]=Y;break}}return!1},i.getCardinalDirection=function(a,s,l){return a>s?l:1+l%4},i.getIntersection=function(a,s,l,u){if(u==null)return this.getIntersection2(a,s,l);var h=a.x,f=a.y,d=s.x,p=s.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,w=void 0,S=void 0,T=void 0,E=void 0,_=void 0,A=void 0,L=void 0;return w=p-f,T=h-d,_=d*f-h*p,S=v-g,E=m-y,A=y*g-m*v,L=w*E-S*T,L===0?null:(x=(T*A-E*_)/L,b=(S*_-w*A)/L,new n(x,b))},i.angleOfVector=function(a,s,l,u){var h=void 0;return a!==l?(h=Math.atan((u-s)/(l-a)),l<a?h+=Math.PI:u<s&&(h+=this.TWO_PI)):u<s?h=this.ONE_AND_HALF_PI:h=this.HALF_PI,h},i.doIntersect=function(a,s,l,u){var h=a.x,f=a.y,d=s.x,p=s.y,m=l.x,g=l.y,y=u.x,v=u.y,x=(d-h)*(v-g)-(y-m)*(p-f);if(x===0)return!1;var b=((v-g)*(y-h)+(m-y)*(v-f))/x,w=((f-p)*(y-h)+(d-h)*(v-f))/x;return 0<b&&b<1&&0<w&&w<1},i.findCircleLineIntersections=function(a,s,l,u,h,f,d){var p=(l-a)*(l-a)+(u-s)*(u-s),m=2*((a-h)*(l-a)+(s-f)*(u-s)),g=(a-h)*(a-h)+(s-f)*(s-f)-d*d,y=m*m-4*p*g;if(y>=0){var v=(-m+Math.sqrt(m*m-4*p*g))/(2*p),x=(-m-Math.sqrt(m*m-4*p*g))/(2*p),b=null;return v>=0&&v<=1?[v]:x>=0&&x<=1?[x]:b}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i},function(t,e,r){"use strict";function n(){}o(n,"IMath"),n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}o(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function h(f,d){for(var p=0;p<d.length;p++){var m=d[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(f,m.key,m)}}return o(h,"defineProperties"),function(f,d,p){return d&&h(f.prototype,d),p&&h(f,p),f}}();function i(h,f){if(!(h instanceof f))throw new TypeError("Cannot call a class as a function")}o(i,"_classCallCheck");var a=o(function(f){return{value:f,next:null,prev:null}},"nodeFrom"),s=o(function(f,d,p,m){return f!==null?f.next=d:m.head=d,p!==null?p.prev=d:m.tail=d,d.prev=f,d.next=p,m.length++,d},"add"),l=o(function(f,d){var p=f.prev,m=f.next;return p!==null?p.next=m:d.head=m,m!==null?m.prev=p:d.tail=p,f.prev=f.next=null,d.length--,f},"_remove"),u=function(){function h(f){var d=this;i(this,h),this.length=0,this.head=null,this.tail=null,f?.forEach(function(p){return d.push(p)})}return o(h,"LinkedList"),n(h,[{key:"size",value:o(function(){return this.length},"size")},{key:"insertBefore",value:o(function(d,p){return s(p.prev,a(d),p,this)},"insertBefore")},{key:"insertAfter",value:o(function(d,p){return s(p,a(d),p.next,this)},"insertAfter")},{key:"insertNodeBefore",value:o(function(d,p){return s(p.prev,d,p,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:o(function(d,p){return s(p,d,p.next,this)},"insertNodeAfter")},{key:"push",value:o(function(d){return s(this.tail,a(d),null,this)},"push")},{key:"unshift",value:o(function(d){return s(null,a(d),this.head,this)},"unshift")},{key:"remove",value:o(function(d){return l(d,this)},"remove")},{key:"pop",value:o(function(){return l(this.tail,this).value},"pop")},{key:"popNode",value:o(function(){return l(this.tail,this)},"popNode")},{key:"shift",value:o(function(){return l(this.head,this).value},"shift")},{key:"shiftNode",value:o(function(){return l(this.head,this)},"shiftNode")},{key:"get_object_at",value:o(function(d){if(d<=this.length()){for(var p=1,m=this.head;p<d;)m=m.next,p++;return m.value}},"get_object_at")},{key:"set_object_at",value:o(function(d,p){if(d<=this.length()){for(var m=1,g=this.head;m<d;)g=g.next,m++;g.value=p}},"set_object_at")}]),h}();t.exports=u},function(t,e,r){"use strict";function n(i,a,s){this.x=null,this.y=null,i==null&&a==null&&s==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&s==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&s==null&&(s=i,this.x=s.x,this.y=s.y)}o(n,"Point"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(i,a,s){i.constructor.name=="Point"&&a==null&&s==null?(s=i,this.setLocation(s.x,s.y)):typeof i=="number"&&typeof a=="number"&&s==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)))},n.prototype.move=function(i,a){this.x=i,this.y=a},n.prototype.translate=function(i,a){this.x+=i,this.y+=a},n.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y}return this==i},n.prototype.toString=function(){return new n().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,r){"use strict";function n(i,a,s,l){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&s!=null&&l!=null&&(this.x=i,this.y=a,this.width=s,this.height=l)}o(n,"RectangleD"),n.prototype.getX=function(){return this.x},n.prototype.setX=function(i){this.x=i},n.prototype.getY=function(){return this.y},n.prototype.setY=function(i){this.y=i},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,r){"use strict";var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function i(){}o(i,"UniqueIDGeneretor"),i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID)},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a},i.isPrimitive=function(a){var s=typeof a>"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i},function(t,e,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g<m.length;g++)y[g]=m[g];return y}else return Array.from(m)}o(n,"_toConsumableArray");var i=r(0),a=r(7),s=r(3),l=r(1),u=r(6),h=r(5),f=r(17),d=r(29);function p(m){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,m!=null&&(this.isRemoteUse=m)}o(p,"Layout"),p.RANDOM_SEED=1,p.prototype=Object.create(d.prototype),p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},p.prototype.newGraphManager=function(){var m=new a(this);return this.graphManager=m,m},p.prototype.newGraph=function(m){return new u(null,this.graphManager,m)},p.prototype.newNode=function(m){return new s(this.graphManager,m)},p.prototype.newEdge=function(m){return new l(null,null,m)},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var m;return this.checkLayoutSuccess()?m=!1:m=this.layout(),i.ANIMATE==="during"?!1:(m&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,m)},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var m,g=this.graphManager.getAllEdges(),y=0;y<g.length;y++)m=g[y];for(var v,x=this.graphManager.getRoot().getNodes(),y=0;y<x.length;y++)v=x[y];this.update(this.graphManager.getRoot())}},p.prototype.update=function(m){if(m==null)this.update2();else if(m instanceof s){var g=m;if(g.getChild()!=null)for(var y=g.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);if(g.vGraphObject!=null){var x=g.vGraphObject;x.update(g)}}else if(m instanceof l){var b=m;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}else if(m instanceof u){var S=m;if(S.vGraphObject!=null){var T=S.vGraphObject;T.update(S)}}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},p.prototype.transform=function(m){if(m==null)this.transform(new h(0,0));else{var g=new f,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){g.setWorldOrgX(m.x),g.setWorldOrgY(m.y),g.setDeviceOrgX(y.x),g.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),x,b=0;b<v.length;b++)x=v[b],x.transform(g)}}},p.prototype.positionNodesRandomly=function(m){if(m==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,y,v=m.getNodes(),x=0;x<v.length;x++)g=v[x],y=g.getChild(),y==null||y.getNodes().length==0?g.scatter():(this.positionNodesRandomly(y),g.updateBounds())},p.prototype.getFlatForest=function(){for(var m=[],g=!0,y=this.graphManager.getRoot().getNodes(),v=!0,x=0;x<y.length;x++)y[x].getChild()!=null&&(v=!1);if(!v)return m;var b=new Set,w=[],S=new Map,T=[];for(T=T.concat(y);T.length>0&&g;){for(w.push(T[0]);w.length>0&&g;){var E=w[0];w.splice(0,1),b.add(E);for(var _=E.getEdges(),x=0;x<_.length;x++){var A=_[x].getOtherEnd(E);if(S.get(E)!=A)if(!b.has(A))w.push(A),S.set(A,E);else{g=!1;break}}}if(!g)m=[];else{var L=[].concat(n(b));m.push(L);for(var x=0;x<L.length;x++){var M=L[x],N=T.indexOf(M);N>-1&&T.splice(N,1)}b=new Set,S=new Map}}return m},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x<m.bendpoints.length;x++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),v.add(b);var w=this.newEdge(null);this.graphManager.add(w,y,b),g.add(b),y=b}var w=this.newEdge(null);return this.graphManager.add(w,y,m.target),this.edgeToDummyNodes.set(m,g),m.isInterGraph()?this.graphManager.remove(m):v.remove(m),g},p.prototype.createBendpointsFromDummyNodes=function(){var m=[];m=m.concat(this.graphManager.getAllEdges()),m=[].concat(n(this.edgeToDummyNodes.keys())).concat(m);for(var g=0;g<m.length;g++){var y=m[g];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),x=0;x<v.length;x++){var b=v[x],w=new h(b.getCenterX(),b.getCenterY()),S=y.bendpoints.get(x);S.x=w.x,S.y=w.y,b.getOwner().remove(b)}this.graphManager.add(y,y.source,y.target)}}},p.transform=function(m,g,y,v){if(y!=null&&v!=null){var x=g;if(m<=50){var b=g/y;x-=(g-b)/50*(50-m)}else{var w=g*v;x+=(w-g)/50*(m-50)}return x}else{var S,T;return m<=50?(S=9*g/500,T=g/10):(S=9*g/50,T=-8*g),S*m+T}},p.findCenterOfTree=function(m){var g=[];g=g.concat(m);var y=[],v=new Map,x=!1,b=null;(g.length==1||g.length==2)&&(x=!0,b=g[0]);for(var w=0;w<g.length;w++){var S=g[w],T=S.getNeighborsList().size;v.set(S,S.getNeighborsList().size),T==1&&y.push(S)}var E=[];for(E=E.concat(y);!x;){var _=[];_=_.concat(E),E=[];for(var w=0;w<g.length;w++){var S=g[w],A=g.indexOf(S);A>=0&&g.splice(A,1);var L=S.getNeighborsList();L.forEach(function(k){if(y.indexOf(k)<0){var I=v.get(k),C=I-1;C==1&&E.push(k),v.set(k,C)}})}y=y.concat(E),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},p.prototype.setGraphManager=function(m){this.graphManager=m},t.exports=p},function(t,e,r){"use strict";function n(){}o(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,l=this.lworldExtX;return l!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),s},i.prototype.transformY=function(a){var s=0,l=this.lworldExtY;return l!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),s},i.prototype.inverseTransformX=function(a){var s=0,l=this.ldeviceExtX;return l!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),s},i.prototype.inverseTransformY=function(a){var s=0,l=this.ldeviceExtY;return l!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i},function(t,e,r){"use strict";function n(d){if(Array.isArray(d)){for(var p=0,m=Array(d.length);p<d.length;p++)m[p]=d[p];return m}else return Array.from(d)}o(n,"_toConsumableArray");var i=r(15),a=r(4),s=r(0),l=r(8),u=r(9);function h(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}o(h,"FDLayout"),h.prototype=Object.create(i.prototype);for(var f in i)h[f]=i[f];h.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var d,p,m,g,y,v,x,b=this.getGraphManager().getAllEdges(),w=0;w<b.length;w++)d=b[w],p=d.idealLength,d.isInterGraph&&(g=d.getSource(),y=d.getTarget(),v=d.getSourceInLca().getEstimatedSize(),x=d.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(d.idealLength+=v+x-2*s.SIMPLE_NODE_SIZE),m=d.getLca().getInclusionTreeDepth(),d.idealLength+=p*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+y.getInclusionTreeDepth()-2*m))},h.prototype.initSpringEmbedder=function(){var d=this.getAllNodes().length;this.incremental?(d>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(d>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var d=this.getAllEdges(),p,m=0;m<d.length;m++)p=d[m],this.calcSpringForce(p,p.idealLength)},h.prototype.calcRepulsionForces=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&d&&this.updateGrid(),b=new Set,m=0;m<x.length;m++)y=x[m],this.calculateRepulsionForceOfANode(y,b,d,p),b.add(y);else for(m=0;m<x.length;m++)for(y=x[m],g=m+1;g<x.length;g++)v=x[g],y.getOwner()==v.getOwner()&&this.calcRepulsionForce(y,v)},h.prototype.calcGravitationalForces=function(){for(var d,p=this.getAllNodesToApplyGravitation(),m=0;m<p.length;m++)d=p[m],this.calcGravitationalForce(d)},h.prototype.moveNodes=function(){for(var d=this.getAllNodes(),p,m=0;m<d.length;m++)p=d[m],p.move()},h.prototype.calcSpringForce=function(d,p){var m=d.getSource(),g=d.getTarget(),y,v,x,b;if(this.uniformLeafNodeSizes&&m.getChild()==null&&g.getChild()==null)d.updateLengthSimple();else if(d.updateLength(),d.isOverlapingSourceAndTarget)return;y=d.getLength(),y!=0&&(v=d.edgeElasticity*(y-p),x=v*(d.lengthX/y),b=v*(d.lengthY/y),m.springForceX+=x,m.springForceY+=b,g.springForceX-=x,g.springForceY-=b)},h.prototype.calcRepulsionForce=function(d,p){var m=d.getRect(),g=p.getRect(),y=new Array(2),v=new Array(4),x,b,w,S,T,E,_;if(m.intersects(g)){l.calcSeparationAmount(m,g,y,a.DEFAULT_EDGE_LENGTH/2),E=2*y[0],_=2*y[1];var A=d.noOfChildren*p.noOfChildren/(d.noOfChildren+p.noOfChildren);d.repulsionForceX-=A*E,d.repulsionForceY-=A*_,p.repulsionForceX+=A*E,p.repulsionForceY+=A*_}else this.uniformLeafNodeSizes&&d.getChild()==null&&p.getChild()==null?(x=g.getCenterX()-m.getCenterX(),b=g.getCenterY()-m.getCenterY()):(l.getIntersection(m,g,v),x=v[2]-v[0],b=v[3]-v[1]),Math.abs(x)<a.MIN_REPULSION_DIST&&(x=u.sign(x)*a.MIN_REPULSION_DIST),Math.abs(b)<a.MIN_REPULSION_DIST&&(b=u.sign(b)*a.MIN_REPULSION_DIST),w=x*x+b*b,S=Math.sqrt(w),T=(d.nodeRepulsion/2+p.nodeRepulsion/2)*d.noOfChildren*p.noOfChildren/w,E=T*x/S,_=T*b/S,d.repulsionForceX-=E,d.repulsionForceY-=_,p.repulsionForceX+=E,p.repulsionForceY+=_},h.prototype.calcGravitationalForce=function(d){var p,m,g,y,v,x,b,w;p=d.getOwner(),m=(p.getRight()+p.getLeft())/2,g=(p.getTop()+p.getBottom())/2,y=d.getCenterX()-m,v=d.getCenterY()-g,x=Math.abs(y)+d.getWidth()/2,b=Math.abs(v)+d.getHeight()/2,d.getOwner()==this.graphManager.getRoot()?(w=p.getEstimatedSize()*this.gravityRangeFactor,(x>w||b>w)&&(d.gravitationForceX=-this.gravityConstant*y,d.gravitationForceY=-this.gravityConstant*v)):(w=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>w||b>w)&&(d.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,d.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},h.prototype.isConverged=function(){var d,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),d=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,d||p},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var d,p=this.graphManager.getAllNodes(),m=0;m<p.length;m++)d=p[m],d.noOfChildren=d.getNoOfChildren()},h.prototype.calcGrid=function(d){var p=0,m=0;p=parseInt(Math.ceil((d.getRight()-d.getLeft())/this.repulsionRange)),m=parseInt(Math.ceil((d.getBottom()-d.getTop())/this.repulsionRange));for(var g=new Array(p),y=0;y<p;y++)g[y]=new Array(m);for(var y=0;y<p;y++)for(var v=0;v<m;v++)g[y][v]=new Array;return g},h.prototype.addNodeToGrid=function(d,p,m){var g=0,y=0,v=0,x=0;g=parseInt(Math.floor((d.getRect().x-p)/this.repulsionRange)),y=parseInt(Math.floor((d.getRect().width+d.getRect().x-p)/this.repulsionRange)),v=parseInt(Math.floor((d.getRect().y-m)/this.repulsionRange)),x=parseInt(Math.floor((d.getRect().height+d.getRect().y-m)/this.repulsionRange));for(var b=g;b<=y;b++)for(var w=v;w<=x;w++)this.grid[b][w].push(d),d.setGridCoordinates(g,y,v,x)},h.prototype.updateGrid=function(){var d,p,m=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),d=0;d<m.length;d++)p=m[d],this.addNodeToGrid(p,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(d,p,m,g){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&m||g){var y=new Set;d.surrounding=new Array;for(var v,x=this.grid,b=d.startX-1;b<d.finishX+2;b++)for(var w=d.startY-1;w<d.finishY+2;w++)if(!(b<0||w<0||b>=x.length||w>=x[0].length)){for(var S=0;S<x[b][w].length;S++)if(v=x[b][w][S],!(d.getOwner()!=v.getOwner()||d==v)&&!p.has(v)&&!y.has(v)){var T=Math.abs(d.getCenterX()-v.getCenterX())-(d.getWidth()/2+v.getWidth()/2),E=Math.abs(d.getCenterY()-v.getCenterY())-(d.getHeight()/2+v.getHeight()/2);T<=this.repulsionRange&&E<=this.repulsionRange&&y.add(v)}}d.surrounding=[].concat(n(y))}for(b=0;b<d.surrounding.length;b++)this.calcRepulsionForce(d,d.surrounding[b])},h.prototype.calcRepulsionRange=function(){return 0},t.exports=h},function(t,e,r){"use strict";var n=r(1),i=r(4);function a(l,u,h){n.call(this,l,u,h),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}o(a,"FDLayoutEdge"),a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];t.exports=a},function(t,e,r){"use strict";var n=r(3),i=r(4);function a(l,u,h,f){n.call(this,l,u,h,f),this.nodeRepulsion=i.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}o(a,"FDLayoutNode"),a.prototype=Object.create(n.prototype);for(var s in n)a[s]=n[s];a.prototype.setGridCoordinates=function(l,u,h,f){this.startX=l,this.finishX=u,this.startY=h,this.finishY=f},t.exports=a},function(t,e,r){"use strict";function n(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i)}o(n,"DimensionD"),n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(i){this.width=i},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(i){this.height=i},t.exports=n},function(t,e,r){"use strict";var n=r(14);function i(){this.map={},this.keys=[]}o(i,"HashMap"),i.prototype.put=function(a,s){var l=n.createID(a);this.contains(l)||(this.map[l]=s,this.keys.push(a))},i.prototype.contains=function(a){var s=n.createID(a);return this.map[a]!=null},i.prototype.get=function(a){var s=n.createID(a);return this.map[s]},i.prototype.keySet=function(){return this.keys},t.exports=i},function(t,e,r){"use strict";var n=r(14);function i(){this.set={}}o(i,"HashSet"),i.prototype.add=function(a){var s=n.createID(a);this.contains(s)||(this.set[s]=a)},i.prototype.remove=function(a){delete this.set[n.createID(a)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(a){return this.set[n.createID(a)]==a},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(a){for(var s=Object.keys(this.set),l=s.length,u=0;u<l;u++)a.push(this.set[s[u]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(a){for(var s=a.length,l=0;l<s;l++){var u=a[l];this.add(u)}},t.exports=i},function(t,e,r){"use strict";function n(){}o(n,"Matrix"),n.multMat=function(i,a){for(var s=[],l=0;l<i.length;l++){s[l]=[];for(var u=0;u<a[0].length;u++){s[l][u]=0;for(var h=0;h<i[0].length;h++)s[l][u]+=i[l][h]*a[h][u]}}return s},n.transpose=function(i){for(var a=[],s=0;s<i[0].length;s++){a[s]=[];for(var l=0;l<i.length;l++)a[s][l]=i[l][s]}return a},n.multCons=function(i,a){for(var s=[],l=0;l<i.length;l++)s[l]=i[l]*a;return s},n.minusOp=function(i,a){for(var s=[],l=0;l<i.length;l++)s[l]=i[l]-a[l];return s},n.dotProduct=function(i,a){for(var s=0,l=0;l<i.length;l++)s+=i[l]*a[l];return s},n.mag=function(i){return Math.sqrt(this.dotProduct(i,i))},n.normalize=function(i){for(var a=[],s=this.mag(i),l=0;l<i.length;l++)a[l]=i[l]/s;return a},n.multGamma=function(i){for(var a=[],s=0,l=0;l<i.length;l++)s+=i[l];s*=-1/i.length;for(var u=0;u<i.length;u++)a[u]=s+i[u];return a},n.multL=function(i,a,s){for(var l=[],u=[],h=[],f=0;f<a[0].length;f++){for(var d=0,p=0;p<a.length;p++)d+=-.5*a[p][f]*i[p];u[f]=d}for(var m=0;m<s.length;m++){for(var g=0,y=0;y<s.length;y++)g+=s[m][y]*u[y];h[m]=g}for(var v=0;v<a.length;v++){for(var x=0,b=0;b<a[0].length;b++)x+=a[v][b]*h[b];l[v]=x}return l},t.exports=n},function(t,e,r){"use strict";var n=function(){function l(u,h){for(var f=0;f<h.length;f++){var d=h[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}return o(l,"defineProperties"),function(u,h,f){return h&&l(u.prototype,h),f&&l(u,f),u}}();function i(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}o(i,"_classCallCheck");var a=r(11),s=function(){function l(u,h){i(this,l),(h!==null||h!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;u instanceof a?f=u.size():f=u.length,this._quicksort(u,0,f-1)}return o(l,"Quicksort"),n(l,[{key:"_quicksort",value:o(function(h,f,d){if(f<d){var p=this._partition(h,f,d);this._quicksort(h,f,p),this._quicksort(h,p+1,d)}},"_quicksort")},{key:"_partition",value:o(function(h,f,d){for(var p=this._get(h,f),m=f,g=d;;){for(;this.compareFunction(p,this._get(h,g));)g--;for(;this.compareFunction(this._get(h,m),p);)m++;if(m<g)this._swap(h,m,g),m++,g--;else return g}},"_partition")},{key:"_get",value:o(function(h,f){return h instanceof a?h.get_object_at(f):h[f]},"_get")},{key:"_set",value:o(function(h,f,d){h instanceof a?h.set_object_at(f,d):h[f]=d},"_set")},{key:"_swap",value:o(function(h,f,d){var p=this._get(h,f);this._set(h,f,this._get(h,d)),this._set(h,d,p)},"_swap")},{key:"_defaultCompareFunction",value:o(function(h,f){return f>h},"_defaultCompareFunction")}]),l}();t.exports=s},function(t,e,r){"use strict";function n(){}o(n,"SVD"),n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(it){for(var dt=[];it-- >0;)dt.push(0);return dt}(Math.min(this.m+1,this.n)),this.U=function(it){var dt=o(function lt(It){if(It.length==0)return 0;for(var mt=[],St=0;St<It[0];St++)mt.push(lt(It.slice(1)));return mt},"allocate");return dt(it)}([this.m,a]),this.V=function(it){var dt=o(function lt(It){if(It.length==0)return 0;for(var mt=[],St=0;St<It[0];St++)mt.push(lt(It.slice(1)));return mt},"allocate");return dt(it)}([this.n,this.n]);for(var s=function(it){for(var dt=[];it-- >0;)dt.push(0);return dt}(this.n),l=function(it){for(var dt=[];it-- >0;)dt.push(0);return dt}(this.m),u=!0,h=!0,f=Math.min(this.m-1,this.n),d=Math.max(0,Math.min(this.n-2,this.m)),p=0;p<Math.max(f,d);p++){if(p<f){this.s[p]=0;for(var m=p;m<this.m;m++)this.s[p]=n.hypot(this.s[p],i[m][p]);if(this.s[p]!==0){i[p][p]<0&&(this.s[p]=-this.s[p]);for(var g=p;g<this.m;g++)i[g][p]/=this.s[p];i[p][p]+=1}this.s[p]=-this.s[p]}for(var y=p+1;y<this.n;y++){if(function(it,dt){return it&&dt}(p<f,this.s[p]!==0)){for(var v=0,x=p;x<this.m;x++)v+=i[x][p]*i[x][y];v=-v/i[p][p];for(var b=p;b<this.m;b++)i[b][y]+=v*i[b][p]}s[y]=i[p][y]}if(function(it,dt){return it&&dt}(u,p<f))for(var w=p;w<this.m;w++)this.U[w][p]=i[w][p];if(p<d){s[p]=0;for(var S=p+1;S<this.n;S++)s[p]=n.hypot(s[p],s[S]);if(s[p]!==0){s[p+1]<0&&(s[p]=-s[p]);for(var T=p+1;T<this.n;T++)s[T]/=s[p];s[p+1]+=1}if(s[p]=-s[p],function(it,dt){return it&&dt}(p+1<this.m,s[p]!==0)){for(var E=p+1;E<this.m;E++)l[E]=0;for(var _=p+1;_<this.n;_++)for(var A=p+1;A<this.m;A++)l[A]+=s[_]*i[A][_];for(var L=p+1;L<this.n;L++)for(var M=-s[L]/s[p+1],N=p+1;N<this.m;N++)i[N][L]+=M*l[N]}if(h)for(var k=p+1;k<this.n;k++)this.V[k][p]=s[k]}}var I=Math.min(this.n,this.m+1);if(f<this.n&&(this.s[f]=i[f][f]),this.m<I&&(this.s[I-1]=0),d+1<I&&(s[d]=i[d][I-1]),s[I-1]=0,u){for(var C=f;C<a;C++){for(var O=0;O<this.m;O++)this.U[O][C]=0;this.U[C][C]=1}for(var D=f-1;D>=0;D--)if(this.s[D]!==0){for(var P=D+1;P<a;P++){for(var F=0,B=D;B<this.m;B++)F+=this.U[B][D]*this.U[B][P];F=-F/this.U[D][D];for(var $=D;$<this.m;$++)this.U[$][P]+=F*this.U[$][D]}for(var z=D;z<this.m;z++)this.U[z][D]=-this.U[z][D];this.U[D][D]=1+this.U[D][D];for(var Y=0;Y<D-1;Y++)this.U[Y][D]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][D]=0;this.U[D][D]=1}}if(h)for(var X=this.n-1;X>=0;X--){if(function(it,dt){return it&&dt}(X<d,s[X]!==0))for(var ie=X+1;ie<a;ie++){for(var j=0,J=X+1;J<this.n;J++)j+=this.V[J][X]*this.V[J][ie];j=-j/this.V[X+1][X];for(var Z=X+1;Z<this.n;Z++)this.V[Z][ie]+=j*this.V[Z][X]}for(var H=0;H<this.n;H++)this.V[H][X]=0;this.V[X][X]=1}for(var q=I-1,K=0,se=Math.pow(2,-52),ce=Math.pow(2,-966);I>0;){var ue=void 0,te=void 0;for(ue=I-2;ue>=-1&&ue!==-1;ue--)if(Math.abs(s[ue])<=ce+se*(Math.abs(this.s[ue])+Math.abs(this.s[ue+1]))){s[ue]=0;break}if(ue===I-2)te=4;else{var De=void 0;for(De=I-1;De>=ue&&De!==ue;De--){var oe=(De!==I?Math.abs(s[De]):0)+(De!==ue+1?Math.abs(s[De-1]):0);if(Math.abs(this.s[De])<=ce+se*oe){this.s[De]=0;break}}De===ue?te=3:De===I-1?te=1:(te=2,ue=De)}switch(ue++,te){case 1:{var ke=s[I-2];s[I-2]=0;for(var Ie=I-2;Ie>=ue;Ie--){var Se=n.hypot(this.s[Ie],ke),Ue=this.s[Ie]/Se,Pe=ke/Se;if(this.s[Ie]=Se,Ie!==ue&&(ke=-Pe*s[Ie-1],s[Ie-1]=Ue*s[Ie-1]),h)for(var _e=0;_e<this.n;_e++)Se=Ue*this.V[_e][Ie]+Pe*this.V[_e][I-1],this.V[_e][I-1]=-Pe*this.V[_e][Ie]+Ue*this.V[_e][I-1],this.V[_e][Ie]=Se}}break;case 2:{var me=s[ue-1];s[ue-1]=0;for(var W=ue;W<I;W++){var fe=n.hypot(this.s[W],me),ge=this.s[W]/fe,re=me/fe;if(this.s[W]=fe,me=-re*s[W],s[W]=ge*s[W],u)for(var he=0;he<this.m;he++)fe=ge*this.U[he][W]+re*this.U[he][ue-1],this.U[he][ue-1]=-re*this.U[he][W]+ge*this.U[he][ue-1],this.U[he][W]=fe}}break;case 3:{var ne=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[I-1]),Math.abs(this.s[I-2])),Math.abs(s[I-2])),Math.abs(this.s[ue])),Math.abs(s[ue])),ae=this.s[I-1]/ne,we=this.s[I-2]/ne,Te=s[I-2]/ne,Ce=this.s[ue]/ne,Ae=s[ue]/ne,Ge=((we+ae)*(we-ae)+Te*Te)/2,Me=ae*Te*(ae*Te),ye=0;(function(it,dt){return it||dt})(Ge!==0,Me!==0)&&(ye=Math.sqrt(Ge*Ge+Me),Ge<0&&(ye=-ye),ye=Me/(Ge+ye));for(var He=(Ce+ae)*(Ce-ae)+ye,ze=Ce*Ae,Ze=ue;Ze<I-1;Ze++){var gt=n.hypot(He,ze),yt=He/gt,tt=ze/gt;if(Ze!==ue&&(s[Ze-1]=gt),He=yt*this.s[Ze]+tt*s[Ze],s[Ze]=yt*s[Ze]-tt*this.s[Ze],ze=tt*this.s[Ze+1],this.s[Ze+1]=yt*this.s[Ze+1],h)for(var Ye=0;Ye<this.n;Ye++)gt=yt*this.V[Ye][Ze]+tt*this.V[Ye][Ze+1],this.V[Ye][Ze+1]=-tt*this.V[Ye][Ze]+yt*this.V[Ye][Ze+1],this.V[Ye][Ze]=gt;if(gt=n.hypot(He,ze),yt=He/gt,tt=ze/gt,this.s[Ze]=gt,He=yt*s[Ze]+tt*this.s[Ze+1],this.s[Ze+1]=-tt*s[Ze]+yt*this.s[Ze+1],ze=tt*s[Ze+1],s[Ze+1]=yt*s[Ze+1],u&&Ze<this.m-1)for(var Je=0;Je<this.m;Je++)gt=yt*this.U[Je][Ze]+tt*this.U[Je][Ze+1],this.U[Je][Ze+1]=-tt*this.U[Je][Ze]+yt*this.U[Je][Ze+1],this.U[Je][Ze]=gt}s[I-2]=He,K=K+1}break;case 4:{if(this.s[ue]<=0&&(this.s[ue]=this.s[ue]<0?-this.s[ue]:0,h))for(var Ve=0;Ve<=q;Ve++)this.V[Ve][ue]=-this.V[Ve][ue];for(;ue<q&&!(this.s[ue]>=this.s[ue+1]);){var je=this.s[ue];if(this.s[ue]=this.s[ue+1],this.s[ue+1]=je,h&&ue<this.n-1)for(var kt=0;kt<this.n;kt++)je=this.V[kt][ue+1],this.V[kt][ue+1]=this.V[kt][ue],this.V[kt][ue]=je;if(u&&ue<this.m-1)for(var at=0;at<this.m;at++)je=this.U[at][ue+1],this.U[at][ue+1]=this.U[at][ue],this.U[at][ue]=je;ue++}K=0,I--}break}}var xt={U:this.U,V:this.V,S:this.s};return xt},n.hypot=function(i,a){var s=void 0;return Math.abs(i)>Math.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},t.exports=n},function(t,e,r){"use strict";var n=function(){function s(l,u){for(var h=0;h<u.length;h++){var f=u[h];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(l,f.key,f)}}return o(s,"defineProperties"),function(l,u,h){return u&&s(l.prototype,u),h&&s(l,h),l}}();function i(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}o(i,"_classCallCheck");var a=function(){function s(l,u){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=f,this.gap_penalty=d,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.grid[p]=new Array(this.jMax);for(var m=0;m<this.jMax;m++)this.grid[p][m]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.tracebackGrid[g][y]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(s,"NeedlemanWunsch"),n(s,[{key:"getScore",value:o(function(){return this.score},"getScore")},{key:"getAlignments",value:o(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:o(function(){for(var u=1;u<this.jMax;u++)this.grid[0][u]=this.grid[0][u-1]+this.gap_penalty,this.tracebackGrid[0][u]=[!1,!1,!0];for(var h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var f=1;f<this.iMax;f++)for(var d=1;d<this.jMax;d++){var p=void 0;this.sequence1[f-1]===this.sequence2[d-1]?p=this.grid[f-1][d-1]+this.match_score:p=this.grid[f-1][d-1]+this.mismatch_penalty;var m=this.grid[f-1][d]+this.gap_penalty,g=this.grid[f][d-1]+this.gap_penalty,y=[p,m,g],v=this.arrayAllMaxIndexes(y);this.grid[f][d]=y[v[0]],this.tracebackGrid[f][d]=[v.includes(0),v.includes(1),v.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:o(function(){var u=[];for(u.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});u[0];){var h=u[0],f=this.tracebackGrid[h.pos[0]][h.pos[1]];f[0]&&u.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),f[1]&&u.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),f[2]&&u.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),u.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:o(function(u,h){for(var f=[],d=-1;(d=u.indexOf(h,d+1))!==-1;)f.push(d);return f},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:o(function(u){return this.getAllIndexes(u,Math.max.apply(null,u))},"arrayAllMaxIndexes")}]),s}();t.exports=a},function(t,e,r){"use strict";var n=o(function(){},"layoutBase");n.FDLayout=r(18),n.FDLayoutConstants=r(4),n.FDLayoutEdge=r(19),n.FDLayoutNode=r(20),n.DimensionD=r(21),n.HashMap=r(22),n.HashSet=r(23),n.IGeometry=r(8),n.IMath=r(9),n.Integer=r(10),n.Point=r(12),n.PointD=r(5),n.RandomSeed=r(16),n.RectangleD=r(13),n.Transform=r(17),n.UniqueIDGeneretor=r(14),n.Quicksort=r(25),n.LinkedList=r(11),n.LGraphObject=r(2),n.LGraph=r(6),n.LEdge=r(1),n.LGraphManager=r(7),n.LNode=r(3),n.Layout=r(15),n.LayoutConstants=r(0),n.NeedlemanWunsch=r(27),n.Matrix=r(24),n.SVD=r(26),t.exports=n},function(t,e,r){"use strict";function n(){this.listeners=[]}o(n,"Emitter");var i=n.prototype;i.addListener=function(a,s){this.listeners.push({event:a,callback:s})},i.removeListener=function(a,s){for(var l=this.listeners.length;l>=0;l--){var u=this.listeners[l];u.event===a&&u.callback===s&&this.listeners.splice(l,1)}},i.emit=function(a,s){for(var l=0;l<this.listeners.length;l++){var u=this.listeners[l];a===u.event&&u.callback(s)}},t.exports=n}])})});var ZB=gi((vb,QB)=>{"use strict";o(function(e,r){typeof vb=="object"&&typeof QB=="object"?QB.exports=r(KB()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof vb=="object"?vb.coseBase=r(KB()):e.coseBase=r(e.layoutBase)},"webpackUniversalModuleDefinition")(vb,function(t){return(()=>{"use strict";var e={45:(a,s,l)=>{var u={};u.layoutBase=l(551),u.CoSEConstants=l(806),u.CoSEEdge=l(767),u.CoSEGraph=l(880),u.CoSEGraphManager=l(578),u.CoSELayout=l(765),u.CoSENode=l(991),u.ConstraintHandler=l(902),a.exports=u},806:(a,s,l)=>{var u=l(551).FDLayoutConstants;function h(){}o(h,"CoSEConstants");for(var f in u)h[f]=u[f];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,a.exports=h},767:(a,s,l)=>{var u=l(551).FDLayoutEdge;function h(d,p,m){u.call(this,d,p,m)}o(h,"CoSEEdge"),h.prototype=Object.create(u.prototype);for(var f in u)h[f]=u[f];a.exports=h},880:(a,s,l)=>{var u=l(551).LGraph;function h(d,p,m){u.call(this,d,p,m)}o(h,"CoSEGraph"),h.prototype=Object.create(u.prototype);for(var f in u)h[f]=u[f];a.exports=h},578:(a,s,l)=>{var u=l(551).LGraphManager;function h(d){u.call(this,d)}o(h,"CoSEGraphManager"),h.prototype=Object.create(u.prototype);for(var f in u)h[f]=u[f];a.exports=h},765:(a,s,l)=>{var u=l(551).FDLayout,h=l(578),f=l(880),d=l(991),p=l(767),m=l(806),g=l(902),y=l(551).FDLayoutConstants,v=l(551).LayoutConstants,x=l(551).Point,b=l(551).PointD,w=l(551).DimensionD,S=l(551).Layout,T=l(551).Integer,E=l(551).IGeometry,_=l(551).LGraph,A=l(551).Transform,L=l(551).LinkedList;function M(){u.call(this),this.toBeTiled={},this.constraints={}}o(M,"CoSELayout"),M.prototype=Object.create(u.prototype);for(var N in u)M[N]=u[N];M.prototype.newGraphManager=function(){var k=new h(this);return this.graphManager=k,k},M.prototype.newGraph=function(k){return new f(null,this.graphManager,k)},M.prototype.newNode=function(k){return new d(this.graphManager,k)},M.prototype.newEdge=function(k){return new p(null,null,k)},M.prototype.initParameters=function(){u.prototype.initParameters.call(this,arguments),this.isSubLayout||(m.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=m.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=m.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=y.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=y.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=y.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/y.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var k=v.DEFAULT_CREATE_BENDS_AS_NEEDED;return k&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(m.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var I=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(P){return I.has(P)});this.graphManager.setAllNodesToApplyGravitation(C)}}else{var k=this.getFlatForest();if(k.length>0)this.positionNodesRadially(k);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var I=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(O){return I.has(O)});this.graphManager.setAllNodesToApplyGravitation(C),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),m.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%y.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(D){return k.has(D)});this.graphManager.setAllNodesToApplyGravitation(I),this.graphManager.updateBounds(),this.updateGrid(),m.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),m.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var C=!this.isTreeGrowing&&!this.isGrowthFinished,O=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(C,O),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var k=this.graphManager.getAllNodes(),I={},C=0;C<k.length;C++){var O=k[C].rect,D=k[C].id;I[D]={id:D,x:O.getCenterX(),y:O.getCenterY(),w:O.width,h:O.height}}return I},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var k=!1;if(y.ANIMATE==="during")this.emit("layoutstarted");else{for(;!k;)k=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var k=this.getAllNodes(),I,C=0;C<k.length;C++)I=k[C],I.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var C=0;C<k.length;C++)I=k[C],I.move()},M.prototype.initConstraintVariables=function(){var k=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var I=this.graphManager.getAllNodes(),C=0;C<I.length;C++){var O=I[C];this.idToNodeMap.set(O.id,O)}var D=o(function J(Z){for(var H=Z.getChild().getNodes(),q,K=0,se=0;se<H.length;se++)q=H[se],q.getChild()==null?k.fixedNodeSet.has(q.id)&&(K+=100):K+=J(q);return K},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(H){k.fixedNodeSet.add(H.nodeId)});for(var I=this.graphManager.getAllNodes(),O,C=0;C<I.length;C++)if(O=I[C],O.getChild()!=null){var P=D(O);P>0&&(O.fixedNodeWeight=P)}}if(this.constraints.relativePlacementConstraint){var F=new Map,B=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(J){k.fixedNodesOnHorizontal.add(J),k.fixedNodesOnVertical.add(J)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var $=this.constraints.alignmentConstraint.vertical,C=0;C<$.length;C++)this.dummyToNodeForVerticalAlignment.set("dummy"+C,[]),$[C].forEach(function(Z){F.set(Z,"dummy"+C),k.dummyToNodeForVerticalAlignment.get("dummy"+C).push(Z),k.fixedNodeSet.has(Z)&&k.fixedNodesOnHorizontal.add("dummy"+C)});if(this.constraints.alignmentConstraint.horizontal)for(var z=this.constraints.alignmentConstraint.horizontal,C=0;C<z.length;C++)this.dummyToNodeForHorizontalAlignment.set("dummy"+C,[]),z[C].forEach(function(Z){B.set(Z,"dummy"+C),k.dummyToNodeForHorizontalAlignment.get("dummy"+C).push(Z),k.fixedNodeSet.has(Z)&&k.fixedNodesOnVertical.add("dummy"+C)})}if(m.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(J){var Z,H,q;for(q=J.length-1;q>=2*J.length/3;q--)Z=Math.floor(Math.random()*(q+1)),H=J[q],J[q]=J[Z],J[Z]=H;return J},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(J){if(J.left){var Z=F.has(J.left)?F.get(J.left):J.left,H=F.has(J.right)?F.get(J.right):J.right;k.nodesInRelativeHorizontal.includes(Z)||(k.nodesInRelativeHorizontal.push(Z),k.nodeToRelativeConstraintMapHorizontal.set(Z,[]),k.dummyToNodeForVerticalAlignment.has(Z)?k.nodeToTempPositionMapHorizontal.set(Z,k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(Z)[0]).getCenterX()):k.nodeToTempPositionMapHorizontal.set(Z,k.idToNodeMap.get(Z).getCenterX())),k.nodesInRelativeHorizontal.includes(H)||(k.nodesInRelativeHorizontal.push(H),k.nodeToRelativeConstraintMapHorizontal.set(H,[]),k.dummyToNodeForVerticalAlignment.has(H)?k.nodeToTempPositionMapHorizontal.set(H,k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):k.nodeToTempPositionMapHorizontal.set(H,k.idToNodeMap.get(H).getCenterX())),k.nodeToRelativeConstraintMapHorizontal.get(Z).push({right:H,gap:J.gap}),k.nodeToRelativeConstraintMapHorizontal.get(H).push({left:Z,gap:J.gap})}else{var q=B.has(J.top)?B.get(J.top):J.top,K=B.has(J.bottom)?B.get(J.bottom):J.bottom;k.nodesInRelativeVertical.includes(q)||(k.nodesInRelativeVertical.push(q),k.nodeToRelativeConstraintMapVertical.set(q,[]),k.dummyToNodeForHorizontalAlignment.has(q)?k.nodeToTempPositionMapVertical.set(q,k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(q)[0]).getCenterY()):k.nodeToTempPositionMapVertical.set(q,k.idToNodeMap.get(q).getCenterY())),k.nodesInRelativeVertical.includes(K)||(k.nodesInRelativeVertical.push(K),k.nodeToRelativeConstraintMapVertical.set(K,[]),k.dummyToNodeForHorizontalAlignment.has(K)?k.nodeToTempPositionMapVertical.set(K,k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):k.nodeToTempPositionMapVertical.set(K,k.idToNodeMap.get(K).getCenterY())),k.nodeToRelativeConstraintMapVertical.get(q).push({bottom:K,gap:J.gap}),k.nodeToRelativeConstraintMapVertical.get(K).push({top:q,gap:J.gap})}});else{var Y=new Map,Q=new Map;this.constraints.relativePlacementConstraint.forEach(function(J){if(J.left){var Z=F.has(J.left)?F.get(J.left):J.left,H=F.has(J.right)?F.get(J.right):J.right;Y.has(Z)?Y.get(Z).push(H):Y.set(Z,[H]),Y.has(H)?Y.get(H).push(Z):Y.set(H,[Z])}else{var q=B.has(J.top)?B.get(J.top):J.top,K=B.has(J.bottom)?B.get(J.bottom):J.bottom;Q.has(q)?Q.get(q).push(K):Q.set(q,[K]),Q.has(K)?Q.get(K).push(q):Q.set(K,[q])}});var X=o(function(Z,H){var q=[],K=[],se=new L,ce=new Set,ue=0;return Z.forEach(function(te,De){if(!ce.has(De)){q[ue]=[],K[ue]=!1;var oe=De;for(se.push(oe),ce.add(oe),q[ue].push(oe);se.length!=0;){oe=se.shift(),H.has(oe)&&(K[ue]=!0);var ke=Z.get(oe);ke.forEach(function(Ie){ce.has(Ie)||(se.push(Ie),ce.add(Ie),q[ue].push(Ie))})}ue++}}),{components:q,isFixed:K}},"constructComponents"),ie=X(Y,k.fixedNodesOnHorizontal);this.componentsOnHorizontal=ie.components,this.fixedComponentsOnHorizontal=ie.isFixed;var j=X(Q,k.fixedNodesOnVertical);this.componentsOnVertical=j.components,this.fixedComponentsOnVertical=j.isFixed}}},M.prototype.updateDisplacements=function(){var k=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(j){var J=k.idToNodeMap.get(j.nodeId);J.displacementX=0,J.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var I=this.constraints.alignmentConstraint.vertical,C=0;C<I.length;C++){for(var O=0,D=0;D<I[C].length;D++){if(this.fixedNodeSet.has(I[C][D])){O=0;break}O+=this.idToNodeMap.get(I[C][D]).displacementX}for(var P=O/I[C].length,D=0;D<I[C].length;D++)this.idToNodeMap.get(I[C][D]).displacementX=P}if(this.constraints.alignmentConstraint.horizontal)for(var F=this.constraints.alignmentConstraint.horizontal,C=0;C<F.length;C++){for(var B=0,D=0;D<F[C].length;D++){if(this.fixedNodeSet.has(F[C][D])){B=0;break}B+=this.idToNodeMap.get(F[C][D]).displacementY}for(var $=B/F[C].length,D=0;D<F[C].length;D++)this.idToNodeMap.get(F[C][D]).displacementY=$}}if(this.constraints.relativePlacementConstraint)if(m.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(j){if(!k.fixedNodesOnHorizontal.has(j)){var J=0;k.dummyToNodeForVerticalAlignment.has(j)?J=k.idToNodeMap.get(k.dummyToNodeForVerticalAlignment.get(j)[0]).displacementX:J=k.idToNodeMap.get(j).displacementX,k.nodeToRelativeConstraintMapHorizontal.get(j).forEach(function(Z){if(Z.right){var H=k.nodeToTempPositionMapHorizontal.get(Z.right)-k.nodeToTempPositionMapHorizontal.get(j)-J;H<Z.gap&&(J-=Z.gap-H)}else{var H=k.nodeToTempPositionMapHorizontal.get(j)-k.nodeToTempPositionMapHorizontal.get(Z.left)+J;H<Z.gap&&(J+=Z.gap-H)}}),k.nodeToTempPositionMapHorizontal.set(j,k.nodeToTempPositionMapHorizontal.get(j)+J),k.dummyToNodeForVerticalAlignment.has(j)?k.dummyToNodeForVerticalAlignment.get(j).forEach(function(Z){k.idToNodeMap.get(Z).displacementX=J}):k.idToNodeMap.get(j).displacementX=J}}),this.nodesInRelativeVertical.forEach(function(j){if(!k.fixedNodesOnHorizontal.has(j)){var J=0;k.dummyToNodeForHorizontalAlignment.has(j)?J=k.idToNodeMap.get(k.dummyToNodeForHorizontalAlignment.get(j)[0]).displacementY:J=k.idToNodeMap.get(j).displacementY,k.nodeToRelativeConstraintMapVertical.get(j).forEach(function(Z){if(Z.bottom){var H=k.nodeToTempPositionMapVertical.get(Z.bottom)-k.nodeToTempPositionMapVertical.get(j)-J;H<Z.gap&&(J-=Z.gap-H)}else{var H=k.nodeToTempPositionMapVertical.get(j)-k.nodeToTempPositionMapVertical.get(Z.top)+J;H<Z.gap&&(J+=Z.gap-H)}}),k.nodeToTempPositionMapVertical.set(j,k.nodeToTempPositionMapVertical.get(j)+J),k.dummyToNodeForHorizontalAlignment.has(j)?k.dummyToNodeForHorizontalAlignment.get(j).forEach(function(Z){k.idToNodeMap.get(Z).displacementY=J}):k.idToNodeMap.get(j).displacementY=J}});else{for(var C=0;C<this.componentsOnHorizontal.length;C++){var z=this.componentsOnHorizontal[C];if(this.fixedComponentsOnHorizontal[C])for(var D=0;D<z.length;D++)this.dummyToNodeForVerticalAlignment.has(z[D])?this.dummyToNodeForVerticalAlignment.get(z[D]).forEach(function(Z){k.idToNodeMap.get(Z).displacementX=0}):this.idToNodeMap.get(z[D]).displacementX=0;else{for(var Y=0,Q=0,D=0;D<z.length;D++)if(this.dummyToNodeForVerticalAlignment.has(z[D])){var X=this.dummyToNodeForVerticalAlignment.get(z[D]);Y+=X.length*this.idToNodeMap.get(X[0]).displacementX,Q+=X.length}else Y+=this.idToNodeMap.get(z[D]).displacementX,Q++;for(var ie=Y/Q,D=0;D<z.length;D++)this.dummyToNodeForVerticalAlignment.has(z[D])?this.dummyToNodeForVerticalAlignment.get(z[D]).forEach(function(Z){k.idToNodeMap.get(Z).displacementX=ie}):this.idToNodeMap.get(z[D]).displacementX=ie}}for(var C=0;C<this.componentsOnVertical.length;C++){var z=this.componentsOnVertical[C];if(this.fixedComponentsOnVertical[C])for(var D=0;D<z.length;D++)this.dummyToNodeForHorizontalAlignment.has(z[D])?this.dummyToNodeForHorizontalAlignment.get(z[D]).forEach(function(H){k.idToNodeMap.get(H).displacementY=0}):this.idToNodeMap.get(z[D]).displacementY=0;else{for(var Y=0,Q=0,D=0;D<z.length;D++)if(this.dummyToNodeForHorizontalAlignment.has(z[D])){var X=this.dummyToNodeForHorizontalAlignment.get(z[D]);Y+=X.length*this.idToNodeMap.get(X[0]).displacementY,Q+=X.length}else Y+=this.idToNodeMap.get(z[D]).displacementY,Q++;for(var ie=Y/Q,D=0;D<z.length;D++)this.dummyToNodeForHorizontalAlignment.has(z[D])?this.dummyToNodeForHorizontalAlignment.get(z[D]).forEach(function(se){k.idToNodeMap.get(se).displacementY=ie}):this.idToNodeMap.get(z[D]).displacementY=ie}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var k=[],I,C=this.graphManager.getGraphs(),O=C.length,D;for(D=0;D<O;D++)I=C[D],I.updateConnected(),I.isConnected||(k=k.concat(I.getNodes()));return k},M.prototype.createBendpoints=function(){var k=[];k=k.concat(this.graphManager.getAllEdges());var I=new Set,C;for(C=0;C<k.length;C++){var O=k[C];if(!I.has(O)){var D=O.getSource(),P=O.getTarget();if(D==P)O.getBendpoints().push(new b),O.getBendpoints().push(new b),this.createDummyNodesForBendpoints(O),I.add(O);else{var F=[];if(F=F.concat(D.getEdgeListToNode(P)),F=F.concat(P.getEdgeListToNode(D)),!I.has(F[0])){if(F.length>1){var B;for(B=0;B<F.length;B++){var $=F[B];$.getBendpoints().push(new b),this.createDummyNodesForBendpoints($)}}F.forEach(function(z){I.add(z)})}}}if(I.size==k.length)break}},M.prototype.positionNodesRadially=function(k){for(var I=new x(0,0),C=Math.ceil(Math.sqrt(k.length)),O=0,D=0,P=0,F=new b(0,0),B=0;B<k.length;B++){B%C==0&&(P=0,D=O,B!=0&&(D+=m.DEFAULT_COMPONENT_SEPERATION),O=0);var $=k[B],z=S.findCenterOfTree($);I.x=P,I.y=D,F=M.radialLayout($,z,I),F.y>O&&(O=Math.floor(F.y)),P=Math.floor(F.x+m.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(v.WORLD_CENTER_X-F.x/2,v.WORLD_CENTER_Y-F.y/2))},M.radialLayout=function(k,I,C){var O=Math.max(this.maxDiagonalInTree(k),m.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(I,null,0,359,0,O);var D=_.calculateBounds(k),P=new A;P.setDeviceOrgX(D.getMinX()),P.setDeviceOrgY(D.getMinY()),P.setWorldOrgX(C.x),P.setWorldOrgY(C.y);for(var F=0;F<k.length;F++){var B=k[F];B.transform(P)}var $=new b(D.getMaxX(),D.getMaxY());return P.inverseTransformPoint($)},M.branchRadialLayout=function(k,I,C,O,D,P){var F=(O-C+1)/2;F<0&&(F+=180);var B=(F+C)%360,$=B*E.TWO_PI/360,z=Math.cos($),Y=D*Math.cos($),Q=D*Math.sin($);k.setCenter(Y,Q);var X=[];X=X.concat(k.getEdges());var ie=X.length;I!=null&&ie--;for(var j=0,J=X.length,Z,H=k.getEdgesBetween(I);H.length>1;){var q=H[0];H.splice(0,1);var K=X.indexOf(q);K>=0&&X.splice(K,1),J--,ie--}I!=null?Z=(X.indexOf(H[0])+1)%J:Z=0;for(var se=Math.abs(O-C)/ie,ce=Z;j!=ie;ce=++ce%J){var ue=X[ce].getOtherEnd(k);if(ue!=I){var te=(C+j*se)%360,De=(te+se)%360;M.branchRadialLayout(ue,k,te,De,D+P,P),j++}}},M.maxDiagonalInTree=function(k){for(var I=T.MIN_VALUE,C=0;C<k.length;C++){var O=k[C],D=O.getDiagonal();D>I&&(I=D)}return I},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var k=this,I={};this.memberGroups={},this.idToDummyNode={};for(var C=[],O=this.graphManager.getAllNodes(),D=0;D<O.length;D++){var P=O[D],F=P.getParent();this.getNodeDegreeWithChildren(P)===0&&(F.id==null||!this.getToBeTiled(F))&&C.push(P)}for(var D=0;D<C.length;D++){var P=C[D],B=P.getParent().id;typeof I[B]>"u"&&(I[B]=[]),I[B]=I[B].concat(P)}Object.keys(I).forEach(function($){if(I[$].length>1){var z="DummyCompound_"+$;k.memberGroups[z]=I[$];var Y=I[$][0].getParent(),Q=new d(k.graphManager);Q.id=z,Q.paddingLeft=Y.paddingLeft||0,Q.paddingRight=Y.paddingRight||0,Q.paddingBottom=Y.paddingBottom||0,Q.paddingTop=Y.paddingTop||0,k.idToDummyNode[z]=Q;var X=k.getGraphManager().add(k.newGraph(),Q),ie=Y.getChild();ie.add(Q);for(var j=0;j<I[$].length;j++){var J=I[$][j];ie.remove(J),X.add(J)}}})},M.prototype.clearCompounds=function(){var k={},I={};this.performDFSOnCompounds();for(var C=0;C<this.compoundOrder.length;C++)I[this.compoundOrder[C].id]=this.compoundOrder[C],k[this.compoundOrder[C].id]=[].concat(this.compoundOrder[C].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[C].getChild()),this.compoundOrder[C].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(k,I)},M.prototype.clearZeroDegreeMembers=function(){var k=this,I=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(C){var O=k.idToDummyNode[C];if(I[C]=k.tileNodes(k.memberGroups[C],O.paddingLeft+O.paddingRight),O.rect.width=I[C].width,O.rect.height=I[C].height,O.setCenter(I[C].centerX,I[C].centerY),O.labelMarginLeft=0,O.labelMarginTop=0,m.NODE_DIMENSIONS_INCLUDE_LABELS){var D=O.rect.width,P=O.rect.height;O.labelWidth&&(O.labelPosHorizontal=="left"?(O.rect.x-=O.labelWidth,O.setWidth(D+O.labelWidth),O.labelMarginLeft=O.labelWidth):O.labelPosHorizontal=="center"&&O.labelWidth>D?(O.rect.x-=(O.labelWidth-D)/2,O.setWidth(O.labelWidth),O.labelMarginLeft=(O.labelWidth-D)/2):O.labelPosHorizontal=="right"&&O.setWidth(D+O.labelWidth)),O.labelHeight&&(O.labelPosVertical=="top"?(O.rect.y-=O.labelHeight,O.setHeight(P+O.labelHeight),O.labelMarginTop=O.labelHeight):O.labelPosVertical=="center"&&O.labelHeight>P?(O.rect.y-=(O.labelHeight-P)/2,O.setHeight(O.labelHeight),O.labelMarginTop=(O.labelHeight-P)/2):O.labelPosVertical=="bottom"&&O.setHeight(P+O.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var k=this.compoundOrder.length-1;k>=0;k--){var I=this.compoundOrder[k],C=I.id,O=I.paddingLeft,D=I.paddingTop,P=I.labelMarginLeft,F=I.labelMarginTop;this.adjustLocations(this.tiledMemberPack[C],I.rect.x,I.rect.y,O,D,P,F)}},M.prototype.repopulateZeroDegreeMembers=function(){var k=this,I=this.tiledZeroDegreePack;Object.keys(I).forEach(function(C){var O=k.idToDummyNode[C],D=O.paddingLeft,P=O.paddingTop,F=O.labelMarginLeft,B=O.labelMarginTop;k.adjustLocations(I[C],O.rect.x,O.rect.y,D,P,F,B)})},M.prototype.getToBeTiled=function(k){var I=k.id;if(this.toBeTiled[I]!=null)return this.toBeTiled[I];var C=k.getChild();if(C==null)return this.toBeTiled[I]=!1,!1;for(var O=C.getNodes(),D=0;D<O.length;D++){var P=O[D];if(this.getNodeDegree(P)>0)return this.toBeTiled[I]=!1,!1;if(P.getChild()==null){this.toBeTiled[P.id]=!1;continue}if(!this.getToBeTiled(P))return this.toBeTiled[I]=!1,!1}return this.toBeTiled[I]=!0,!0},M.prototype.getNodeDegree=function(k){for(var I=k.id,C=k.getEdges(),O=0,D=0;D<C.length;D++){var P=C[D];P.getSource().id!==P.getTarget().id&&(O=O+1)}return O},M.prototype.getNodeDegreeWithChildren=function(k){var I=this.getNodeDegree(k);if(k.getChild()==null)return I;for(var C=k.getChild().getNodes(),O=0;O<C.length;O++){var D=C[O];I+=this.getNodeDegreeWithChildren(D)}return I},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(k){for(var I=0;I<k.length;I++){var C=k[I];C.getChild()!=null&&this.fillCompexOrderByDFS(C.getChild().getNodes()),this.getToBeTiled(C)&&this.compoundOrder.push(C)}},M.prototype.adjustLocations=function(k,I,C,O,D,P,F){I+=O+P,C+=D+F;for(var B=I,$=0;$<k.rows.length;$++){var z=k.rows[$];I=B;for(var Y=0,Q=0;Q<z.length;Q++){var X=z[Q];X.rect.x=I,X.rect.y=C,I+=X.rect.width+k.horizontalPadding,X.rect.height>Y&&(Y=X.rect.height)}C+=Y+k.verticalPadding}},M.prototype.tileCompoundMembers=function(k,I){var C=this;this.tiledMemberPack=[],Object.keys(k).forEach(function(O){var D=I[O];if(C.tiledMemberPack[O]=C.tileNodes(k[O],D.paddingLeft+D.paddingRight),D.rect.width=C.tiledMemberPack[O].width,D.rect.height=C.tiledMemberPack[O].height,D.setCenter(C.tiledMemberPack[O].centerX,C.tiledMemberPack[O].centerY),D.labelMarginLeft=0,D.labelMarginTop=0,m.NODE_DIMENSIONS_INCLUDE_LABELS){var P=D.rect.width,F=D.rect.height;D.labelWidth&&(D.labelPosHorizontal=="left"?(D.rect.x-=D.labelWidth,D.setWidth(P+D.labelWidth),D.labelMarginLeft=D.labelWidth):D.labelPosHorizontal=="center"&&D.labelWidth>P?(D.rect.x-=(D.labelWidth-P)/2,D.setWidth(D.labelWidth),D.labelMarginLeft=(D.labelWidth-P)/2):D.labelPosHorizontal=="right"&&D.setWidth(P+D.labelWidth)),D.labelHeight&&(D.labelPosVertical=="top"?(D.rect.y-=D.labelHeight,D.setHeight(F+D.labelHeight),D.labelMarginTop=D.labelHeight):D.labelPosVertical=="center"&&D.labelHeight>F?(D.rect.y-=(D.labelHeight-F)/2,D.setHeight(D.labelHeight),D.labelMarginTop=(D.labelHeight-F)/2):D.labelPosVertical=="bottom"&&D.setHeight(F+D.labelHeight))}})},M.prototype.tileNodes=function(k,I){var C=this.tileNodesByFavoringDim(k,I,!0),O=this.tileNodesByFavoringDim(k,I,!1),D=this.getOrgRatio(C),P=this.getOrgRatio(O),F;return P<D?F=O:F=C,F},M.prototype.getOrgRatio=function(k){var I=k.width,C=k.height,O=I/C;return O<1&&(O=1/O),O},M.prototype.calcIdealRowWidth=function(k,I){var C=m.TILING_PADDING_VERTICAL,O=m.TILING_PADDING_HORIZONTAL,D=k.length,P=0,F=0,B=0;k.forEach(function(j){P+=j.getWidth(),F+=j.getHeight(),j.getWidth()>B&&(B=j.getWidth())});var $=P/D,z=F/D,Y=Math.pow(C-O,2)+4*($+O)*(z+C)*D,Q=(O-C+Math.sqrt(Y))/(2*($+O)),X;I?(X=Math.ceil(Q),X==Q&&X++):X=Math.floor(Q);var ie=X*($+O)-O;return B>ie&&(ie=B),ie+=O*2,ie},M.prototype.tileNodesByFavoringDim=function(k,I,C){var O=m.TILING_PADDING_VERTICAL,D=m.TILING_PADDING_HORIZONTAL,P=m.TILING_COMPARE_BY,F={rows:[],rowWidth:[],rowHeight:[],width:0,height:I,verticalPadding:O,horizontalPadding:D,centerX:0,centerY:0};P&&(F.idealRowWidth=this.calcIdealRowWidth(k,C));var B=o(function(J){return J.rect.width*J.rect.height},"getNodeArea"),$=o(function(J,Z){return B(Z)-B(J)},"areaCompareFcn");k.sort(function(j,J){var Z=$;return F.idealRowWidth?(Z=P,Z(j.id,J.id)):Z(j,J)});for(var z=0,Y=0,Q=0;Q<k.length;Q++){var X=k[Q];z+=X.getCenterX(),Y+=X.getCenterY()}F.centerX=z/k.length,F.centerY=Y/k.length;for(var Q=0;Q<k.length;Q++){var X=k[Q];if(F.rows.length==0)this.insertNodeToRow(F,X,0,I);else if(this.canAddHorizontal(F,X.rect.width,X.rect.height)){var ie=F.rows.length-1;F.idealRowWidth||(ie=this.getShortestRowIndex(F)),this.insertNodeToRow(F,X,ie,I)}else this.insertNodeToRow(F,X,F.rows.length,I);this.shiftToLastRow(F)}return F},M.prototype.insertNodeToRow=function(k,I,C,O){var D=O;if(C==k.rows.length){var P=[];k.rows.push(P),k.rowWidth.push(D),k.rowHeight.push(0)}var F=k.rowWidth[C]+I.rect.width;k.rows[C].length>0&&(F+=k.horizontalPadding),k.rowWidth[C]=F,k.width<F&&(k.width=F);var B=I.rect.height;C>0&&(B+=k.verticalPadding);var $=0;B>k.rowHeight[C]&&($=k.rowHeight[C],k.rowHeight[C]=B,$=k.rowHeight[C]-$),k.height+=$,k.rows[C].push(I)},M.prototype.getShortestRowIndex=function(k){for(var I=-1,C=Number.MAX_VALUE,O=0;O<k.rows.length;O++)k.rowWidth[O]<C&&(I=O,C=k.rowWidth[O]);return I},M.prototype.getLongestRowIndex=function(k){for(var I=-1,C=Number.MIN_VALUE,O=0;O<k.rows.length;O++)k.rowWidth[O]>C&&(I=O,C=k.rowWidth[O]);return I},M.prototype.canAddHorizontal=function(k,I,C){if(k.idealRowWidth){var O=k.rows.length-1,D=k.rowWidth[O];return D+I+k.horizontalPadding<=k.idealRowWidth}var P=this.getShortestRowIndex(k);if(P<0)return!0;var F=k.rowWidth[P];if(F+k.horizontalPadding+I<=k.width)return!0;var B=0;k.rowHeight[P]<C&&P>0&&(B=C+k.verticalPadding-k.rowHeight[P]);var $;k.width-F>=I+k.horizontalPadding?$=(k.height+B)/(F+I+k.horizontalPadding):$=(k.height+B)/k.width,B=C+k.verticalPadding;var z;return k.width<I?z=(k.height+B)/I:z=(k.height+B)/k.width,z<1&&(z=1/z),$<1&&($=1/$),$<z},M.prototype.shiftToLastRow=function(k){var I=this.getLongestRowIndex(k),C=k.rowWidth.length-1,O=k.rows[I],D=O[O.length-1],P=D.width+k.horizontalPadding;if(k.width-k.rowWidth[C]>P&&I!=C){O.splice(-1,1),k.rows[C].push(D),k.rowWidth[I]=k.rowWidth[I]-P,k.rowWidth[C]=k.rowWidth[C]+P,k.width=k.rowWidth[instance.getLongestRowIndex(k)];for(var F=Number.MIN_VALUE,B=0;B<O.length;B++)O[B].height>F&&(F=O[B].height);I>0&&(F+=k.verticalPadding);var $=k.rowHeight[I]+k.rowHeight[C];k.rowHeight[I]=F,k.rowHeight[C]<D.height+k.verticalPadding&&(k.rowHeight[C]=D.height+k.verticalPadding);var z=k.rowHeight[I]+k.rowHeight[C];k.height+=z-$,this.shiftToLastRow(k)}},M.prototype.tilingPreLayout=function(){m.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){m.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var k=[],I=!0,C;I;){var O=this.graphManager.getAllNodes(),D=[];I=!1;for(var P=0;P<O.length;P++)if(C=O[P],C.getEdges().length==1&&!C.getEdges()[0].isInterGraph&&C.getChild()==null){if(m.PURE_INCREMENTAL){var F=C.getEdges()[0].getOtherEnd(C),B=new w(C.getCenterX()-F.getCenterX(),C.getCenterY()-F.getCenterY());D.push([C,C.getEdges()[0],C.getOwner(),B])}else D.push([C,C.getEdges()[0],C.getOwner()]);I=!0}if(I==!0){for(var $=[],z=0;z<D.length;z++)D[z][0].getEdges().length==1&&($.push(D[z]),D[z][0].getOwner().remove(D[z][0]));k.push($),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=k},M.prototype.growTree=function(k){for(var I=k.length,C=k[I-1],O,D=0;D<C.length;D++)O=C[D],this.findPlaceforPrunedNode(O),O[2].add(O[0]),O[2].add(O[1],O[1].source,O[1].target);k.splice(k.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(k){var I,C,O=k[0];if(O==k[1].source?C=k[1].target:C=k[1].source,m.PURE_INCREMENTAL)O.setCenter(C.getCenterX()+k[3].getWidth(),C.getCenterY()+k[3].getHeight());else{var D=C.startX,P=C.finishX,F=C.startY,B=C.finishY,$=0,z=0,Y=0,Q=0,X=[$,Y,z,Q];if(F>0)for(var ie=D;ie<=P;ie++)X[0]+=this.grid[ie][F-1].length+this.grid[ie][F].length-1;if(P<this.grid.length-1)for(var ie=F;ie<=B;ie++)X[1]+=this.grid[P+1][ie].length+this.grid[P][ie].length-1;if(B<this.grid[0].length-1)for(var ie=D;ie<=P;ie++)X[2]+=this.grid[ie][B+1].length+this.grid[ie][B].length-1;if(D>0)for(var ie=F;ie<=B;ie++)X[3]+=this.grid[D-1][ie].length+this.grid[D][ie].length-1;for(var j=T.MAX_VALUE,J,Z,H=0;H<X.length;H++)X[H]<j?(j=X[H],J=1,Z=H):X[H]==j&&J++;if(J==3&&j==0)X[0]==0&&X[1]==0&&X[2]==0?I=1:X[0]==0&&X[1]==0&&X[3]==0?I=0:X[0]==0&&X[2]==0&&X[3]==0?I=3:X[1]==0&&X[2]==0&&X[3]==0&&(I=2);else if(J==2&&j==0){var q=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?q==0?I=0:I=1:X[0]==0&&X[2]==0?q==0?I=0:I=2:X[0]==0&&X[3]==0?q==0?I=0:I=3:X[1]==0&&X[2]==0?q==0?I=1:I=2:X[1]==0&&X[3]==0?q==0?I=1:I=3:q==0?I=2:I=3}else if(J==4&&j==0){var q=Math.floor(Math.random()*4);I=q}else I=Z;I==0?O.setCenter(C.getCenterX(),C.getCenterY()-C.getHeight()/2-y.DEFAULT_EDGE_LENGTH-O.getHeight()/2):I==1?O.setCenter(C.getCenterX()+C.getWidth()/2+y.DEFAULT_EDGE_LENGTH+O.getWidth()/2,C.getCenterY()):I==2?O.setCenter(C.getCenterX(),C.getCenterY()+C.getHeight()/2+y.DEFAULT_EDGE_LENGTH+O.getHeight()/2):O.setCenter(C.getCenterX()-C.getWidth()/2-y.DEFAULT_EDGE_LENGTH-O.getWidth()/2,C.getCenterY())}},a.exports=M},991:(a,s,l)=>{var u=l(551).FDLayoutNode,h=l(551).IMath;function f(p,m,g,y){u.call(this,p,m,g,y)}o(f,"CoSENode"),f.prototype=Object.create(u.prototype);for(var d in u)f[d]=u[d];f.prototype.calculateDisplacement=function(){var p=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=p.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=p.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=p.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=p.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>p.coolingFactor*p.maxNodeDisplacement&&(this.displacementX=p.coolingFactor*p.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>p.coolingFactor*p.maxNodeDisplacement&&(this.displacementY=p.coolingFactor*p.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(p,m){for(var g=this.getChild().getNodes(),y,v=0;v<g.length;v++)y=g[v],y.getChild()==null?(y.displacementX+=p,y.displacementY+=m):y.propogateDisplacementToChildren(p,m)},f.prototype.move=function(){var p=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),p.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},f.prototype.setPred1=function(p){this.pred1=p},f.prototype.getPred1=function(){return pred1},f.prototype.getPred2=function(){return pred2},f.prototype.setNext=function(p){this.next=p},f.prototype.getNext=function(){return next},f.prototype.setProcessed=function(p){this.processed=p},f.prototype.isProcessed=function(){return processed},a.exports=f},902:(a,s,l)=>{function u(g){if(Array.isArray(g)){for(var y=0,v=Array(g.length);y<g.length;y++)v[y]=g[y];return v}else return Array.from(g)}o(u,"_toConsumableArray");var h=l(806),f=l(551).LinkedList,d=l(551).Matrix,p=l(551).SVD;function m(){}o(m,"ConstraintHandler"),m.handleConstraints=function(g){var y={};y.fixedNodeConstraint=g.constraints.fixedNodeConstraint,y.alignmentConstraint=g.constraints.alignmentConstraint,y.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var v=new Map,x=new Map,b=[],w=[],S=g.getAllNodes(),T=0,E=0;E<S.length;E++){var _=S[E];_.getChild()==null&&(x.set(_.id,T++),b.push(_.getCenterX()),w.push(_.getCenterY()),v.set(_.id,_))}y.relativePlacementConstraint&&y.relativePlacementConstraint.forEach(function(ne){!ne.gap&&ne.gap!=0&&(ne.left?ne.gap=h.DEFAULT_EDGE_LENGTH+v.get(ne.left).getWidth()/2+v.get(ne.right).getWidth()/2:ne.gap=h.DEFAULT_EDGE_LENGTH+v.get(ne.top).getHeight()/2+v.get(ne.bottom).getHeight()/2)});var A=o(function(ae,we){return{x:ae.x-we.x,y:ae.y-we.y}},"calculatePositionDiff"),L=o(function(ae){var we=0,Te=0;return ae.forEach(function(Ce){we+=b[x.get(Ce)],Te+=w[x.get(Ce)]}),{x:we/ae.size,y:Te/ae.size}},"calculateAvgPosition"),M=o(function(ae,we,Te,Ce,Ae){function Ge(tt,Ye){var Je=new Set(tt),Ve=!0,je=!1,kt=void 0;try{for(var at=Ye[Symbol.iterator](),xt;!(Ve=(xt=at.next()).done);Ve=!0){var it=xt.value;Je.add(it)}}catch(dt){je=!0,kt=dt}finally{try{!Ve&&at.return&&at.return()}finally{if(je)throw kt}}return Je}o(Ge,"setUnion");var Me=new Map;ae.forEach(function(tt,Ye){Me.set(Ye,0)}),ae.forEach(function(tt,Ye){tt.forEach(function(Je){Me.set(Je.id,Me.get(Je.id)+1)})});var ye=new Map,He=new Map,ze=new f;Me.forEach(function(tt,Ye){tt==0?(ze.push(Ye),Te||(we=="horizontal"?ye.set(Ye,x.has(Ye)?b[x.get(Ye)]:Ce.get(Ye)):ye.set(Ye,x.has(Ye)?w[x.get(Ye)]:Ce.get(Ye)))):ye.set(Ye,Number.NEGATIVE_INFINITY),Te&&He.set(Ye,new Set([Ye]))}),Te&&Ae.forEach(function(tt){var Ye=[];if(tt.forEach(function(je){Te.has(je)&&Ye.push(je)}),Ye.length>0){var Je=0;Ye.forEach(function(je){we=="horizontal"?(ye.set(je,x.has(je)?b[x.get(je)]:Ce.get(je)),Je+=ye.get(je)):(ye.set(je,x.has(je)?w[x.get(je)]:Ce.get(je)),Je+=ye.get(je))}),Je=Je/Ye.length,tt.forEach(function(je){Te.has(je)||ye.set(je,Je)})}else{var Ve=0;tt.forEach(function(je){we=="horizontal"?Ve+=x.has(je)?b[x.get(je)]:Ce.get(je):Ve+=x.has(je)?w[x.get(je)]:Ce.get(je)}),Ve=Ve/tt.length,tt.forEach(function(je){ye.set(je,Ve)})}});for(var Ze=o(function(){var Ye=ze.shift(),Je=ae.get(Ye);Je.forEach(function(Ve){if(ye.get(Ve.id)<ye.get(Ye)+Ve.gap)if(Te&&Te.has(Ve.id)){var je=void 0;if(we=="horizontal"?je=x.has(Ve.id)?b[x.get(Ve.id)]:Ce.get(Ve.id):je=x.has(Ve.id)?w[x.get(Ve.id)]:Ce.get(Ve.id),ye.set(Ve.id,je),je<ye.get(Ye)+Ve.gap){var kt=ye.get(Ye)+Ve.gap-je;He.get(Ye).forEach(function(at){ye.set(at,ye.get(at)-kt)})}}else ye.set(Ve.id,ye.get(Ye)+Ve.gap);Me.set(Ve.id,Me.get(Ve.id)-1),Me.get(Ve.id)==0&&ze.push(Ve.id),Te&&He.set(Ve.id,Ge(He.get(Ye),He.get(Ve.id)))})},"_loop");ze.length!=0;)Ze();if(Te){var gt=new Set;ae.forEach(function(tt,Ye){tt.length==0&&gt.add(Ye)});var yt=[];He.forEach(function(tt,Ye){if(gt.has(Ye)){var Je=!1,Ve=!0,je=!1,kt=void 0;try{for(var at=tt[Symbol.iterator](),xt;!(Ve=(xt=at.next()).done);Ve=!0){var it=xt.value;Te.has(it)&&(Je=!0)}}catch(It){je=!0,kt=It}finally{try{!Ve&&at.return&&at.return()}finally{if(je)throw kt}}if(!Je){var dt=!1,lt=void 0;yt.forEach(function(It,mt){It.has([].concat(u(tt))[0])&&(dt=!0,lt=mt)}),dt?tt.forEach(function(It){yt[lt].add(It)}):yt.push(new Set(tt))}}}),yt.forEach(function(tt,Ye){var Je=Number.POSITIVE_INFINITY,Ve=Number.POSITIVE_INFINITY,je=Number.NEGATIVE_INFINITY,kt=Number.NEGATIVE_INFINITY,at=!0,xt=!1,it=void 0;try{for(var dt=tt[Symbol.iterator](),lt;!(at=(lt=dt.next()).done);at=!0){var It=lt.value,mt=void 0;we=="horizontal"?mt=x.has(It)?b[x.get(It)]:Ce.get(It):mt=x.has(It)?w[x.get(It)]:Ce.get(It);var St=ye.get(It);mt<Je&&(Je=mt),mt>je&&(je=mt),St<Ve&&(Ve=St),St>kt&&(kt=St)}}catch(Qn){xt=!0,it=Qn}finally{try{!at&&dt.return&&dt.return()}finally{if(xt)throw it}}var gr=(Je+je)/2-(Ve+kt)/2,xn=!0,jt=!1,rn=void 0;try{for(var Er=tt[Symbol.iterator](),Kn;!(xn=(Kn=Er.next()).done);xn=!0){var hn=Kn.value;ye.set(hn,ye.get(hn)+gr)}}catch(Qn){jt=!0,rn=Qn}finally{try{!xn&&Er.return&&Er.return()}finally{if(jt)throw rn}}})}return ye},"findAppropriatePositionForRelativePlacement"),N=o(function(ae){var we=0,Te=0,Ce=0,Ae=0;if(ae.forEach(function(He){He.left?b[x.get(He.left)]-b[x.get(He.right)]>=0?we++:Te++:w[x.get(He.top)]-w[x.get(He.bottom)]>=0?Ce++:Ae++}),we>Te&&Ce>Ae)for(var Ge=0;Ge<x.size;Ge++)b[Ge]=-1*b[Ge],w[Ge]=-1*w[Ge];else if(we>Te)for(var Me=0;Me<x.size;Me++)b[Me]=-1*b[Me];else if(Ce>Ae)for(var ye=0;ye<x.size;ye++)w[ye]=-1*w[ye]},"applyReflectionForRelativePlacement"),k=o(function(ae){var we=[],Te=new f,Ce=new Set,Ae=0;return ae.forEach(function(Ge,Me){if(!Ce.has(Me)){we[Ae]=[];var ye=Me;for(Te.push(ye),Ce.add(ye),we[Ae].push(ye);Te.length!=0;){ye=Te.shift();var He=ae.get(ye);He.forEach(function(ze){Ce.has(ze.id)||(Te.push(ze.id),Ce.add(ze.id),we[Ae].push(ze.id))})}Ae++}}),we},"findComponents"),I=o(function(ae){var we=new Map;return ae.forEach(function(Te,Ce){we.set(Ce,[])}),ae.forEach(function(Te,Ce){Te.forEach(function(Ae){we.get(Ce).push(Ae),we.get(Ae.id).push({id:Ce,gap:Ae.gap,direction:Ae.direction})})}),we},"dagToUndirected"),C=o(function(ae){var we=new Map;return ae.forEach(function(Te,Ce){we.set(Ce,[])}),ae.forEach(function(Te,Ce){Te.forEach(function(Ae){we.get(Ae.id).push({id:Ce,gap:Ae.gap,direction:Ae.direction})})}),we},"dagToReversed"),O=[],D=[],P=!1,F=!1,B=new Set,$=new Map,z=new Map,Y=[];if(y.fixedNodeConstraint&&y.fixedNodeConstraint.forEach(function(ne){B.add(ne.nodeId)}),y.relativePlacementConstraint&&(y.relativePlacementConstraint.forEach(function(ne){ne.left?($.has(ne.left)?$.get(ne.left).push({id:ne.right,gap:ne.gap,direction:"horizontal"}):$.set(ne.left,[{id:ne.right,gap:ne.gap,direction:"horizontal"}]),$.has(ne.right)||$.set(ne.right,[])):($.has(ne.top)?$.get(ne.top).push({id:ne.bottom,gap:ne.gap,direction:"vertical"}):$.set(ne.top,[{id:ne.bottom,gap:ne.gap,direction:"vertical"}]),$.has(ne.bottom)||$.set(ne.bottom,[]))}),z=I($),Y=k(z)),h.TRANSFORM_ON_CONSTRAINT_HANDLING){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>1)y.fixedNodeConstraint.forEach(function(ne,ae){O[ae]=[ne.position.x,ne.position.y],D[ae]=[b[x.get(ne.nodeId)],w[x.get(ne.nodeId)]]}),P=!0;else if(y.alignmentConstraint)(function(){var ne=0;if(y.alignmentConstraint.vertical){for(var ae=y.alignmentConstraint.vertical,we=o(function(ye){var He=new Set;ae[ye].forEach(function(gt){He.add(gt)});var ze=new Set([].concat(u(He)).filter(function(gt){return B.has(gt)})),Ze=void 0;ze.size>0?Ze=b[x.get(ze.values().next().value)]:Ze=L(He).x,ae[ye].forEach(function(gt){O[ne]=[Ze,w[x.get(gt)]],D[ne]=[b[x.get(gt)],w[x.get(gt)]],ne++})},"_loop2"),Te=0;Te<ae.length;Te++)we(Te);P=!0}if(y.alignmentConstraint.horizontal){for(var Ce=y.alignmentConstraint.horizontal,Ae=o(function(ye){var He=new Set;Ce[ye].forEach(function(gt){He.add(gt)});var ze=new Set([].concat(u(He)).filter(function(gt){return B.has(gt)})),Ze=void 0;ze.size>0?Ze=b[x.get(ze.values().next().value)]:Ze=L(He).y,Ce[ye].forEach(function(gt){O[ne]=[b[x.get(gt)],Ze],D[ne]=[b[x.get(gt)],w[x.get(gt)]],ne++})},"_loop3"),Ge=0;Ge<Ce.length;Ge++)Ae(Ge);P=!0}y.relativePlacementConstraint&&(F=!0)})();else if(y.relativePlacementConstraint){for(var Q=0,X=0,ie=0;ie<Y.length;ie++)Y[ie].length>Q&&(Q=Y[ie].length,X=ie);if(Q<z.size/2)N(y.relativePlacementConstraint),P=!1,F=!1;else{var j=new Map,J=new Map,Z=[];Y[X].forEach(function(ne){$.get(ne).forEach(function(ae){ae.direction=="horizontal"?(j.has(ne)?j.get(ne).push(ae):j.set(ne,[ae]),j.has(ae.id)||j.set(ae.id,[]),Z.push({left:ne,right:ae.id})):(J.has(ne)?J.get(ne).push(ae):J.set(ne,[ae]),J.has(ae.id)||J.set(ae.id,[]),Z.push({top:ne,bottom:ae.id}))})}),N(Z),F=!1;var H=M(j,"horizontal"),q=M(J,"vertical");Y[X].forEach(function(ne,ae){D[ae]=[b[x.get(ne)],w[x.get(ne)]],O[ae]=[],H.has(ne)?O[ae][0]=H.get(ne):O[ae][0]=b[x.get(ne)],q.has(ne)?O[ae][1]=q.get(ne):O[ae][1]=w[x.get(ne)]}),P=!0}}if(P){for(var K=void 0,se=d.transpose(O),ce=d.transpose(D),ue=0;ue<se.length;ue++)se[ue]=d.multGamma(se[ue]),ce[ue]=d.multGamma(ce[ue]);var te=d.multMat(se,d.transpose(ce)),De=p.svd(te);K=d.multMat(De.V,d.transpose(De.U));for(var oe=0;oe<x.size;oe++){var ke=[b[oe],w[oe]],Ie=[K[0][0],K[1][0]],Se=[K[0][1],K[1][1]];b[oe]=d.dotProduct(ke,Ie),w[oe]=d.dotProduct(ke,Se)}F&&N(y.relativePlacementConstraint)}}if(h.ENFORCE_CONSTRAINTS){if(y.fixedNodeConstraint&&y.fixedNodeConstraint.length>0){var Ue={x:0,y:0};y.fixedNodeConstraint.forEach(function(ne,ae){var we={x:b[x.get(ne.nodeId)],y:w[x.get(ne.nodeId)]},Te=ne.position,Ce=A(Te,we);Ue.x+=Ce.x,Ue.y+=Ce.y}),Ue.x/=y.fixedNodeConstraint.length,Ue.y/=y.fixedNodeConstraint.length,b.forEach(function(ne,ae){b[ae]+=Ue.x}),w.forEach(function(ne,ae){w[ae]+=Ue.y}),y.fixedNodeConstraint.forEach(function(ne){b[x.get(ne.nodeId)]=ne.position.x,w[x.get(ne.nodeId)]=ne.position.y})}if(y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var Pe=y.alignmentConstraint.vertical,_e=o(function(ae){var we=new Set;Pe[ae].forEach(function(Ae){we.add(Ae)});var Te=new Set([].concat(u(we)).filter(function(Ae){return B.has(Ae)})),Ce=void 0;Te.size>0?Ce=b[x.get(Te.values().next().value)]:Ce=L(we).x,we.forEach(function(Ae){B.has(Ae)||(b[x.get(Ae)]=Ce)})},"_loop4"),me=0;me<Pe.length;me++)_e(me);if(y.alignmentConstraint.horizontal)for(var W=y.alignmentConstraint.horizontal,fe=o(function(ae){var we=new Set;W[ae].forEach(function(Ae){we.add(Ae)});var Te=new Set([].concat(u(we)).filter(function(Ae){return B.has(Ae)})),Ce=void 0;Te.size>0?Ce=w[x.get(Te.values().next().value)]:Ce=L(we).y,we.forEach(function(Ae){B.has(Ae)||(w[x.get(Ae)]=Ce)})},"_loop5"),ge=0;ge<W.length;ge++)fe(ge)}y.relativePlacementConstraint&&function(){var ne=new Map,ae=new Map,we=new Map,Te=new Map,Ce=new Map,Ae=new Map,Ge=new Set,Me=new Set;if(B.forEach(function(Ot){Ge.add(Ot),Me.add(Ot)}),y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var ye=y.alignmentConstraint.vertical,He=o(function(pe){we.set("dummy"+pe,[]),ye[pe].forEach(function(ur){ne.set(ur,"dummy"+pe),we.get("dummy"+pe).push(ur),B.has(ur)&&Ge.add("dummy"+pe)}),Ce.set("dummy"+pe,b[x.get(ye[pe][0])])},"_loop6"),ze=0;ze<ye.length;ze++)He(ze);if(y.alignmentConstraint.horizontal)for(var Ze=y.alignmentConstraint.horizontal,gt=o(function(pe){Te.set("dummy"+pe,[]),Ze[pe].forEach(function(ur){ae.set(ur,"dummy"+pe),Te.get("dummy"+pe).push(ur),B.has(ur)&&Me.add("dummy"+pe)}),Ae.set("dummy"+pe,w[x.get(Ze[pe][0])])},"_loop7"),yt=0;yt<Ze.length;yt++)gt(yt)}var tt=new Map,Ye=new Map,Je=o(function(pe){$.get(pe).forEach(function(ur){var be=void 0,Ir=void 0;ur.direction=="horizontal"?(be=ne.get(pe)?ne.get(pe):pe,ne.get(ur.id)?Ir={id:ne.get(ur.id),gap:ur.gap,direction:ur.direction}:Ir=ur,tt.has(be)?tt.get(be).push(Ir):tt.set(be,[Ir]),tt.has(Ir.id)||tt.set(Ir.id,[])):(be=ae.get(pe)?ae.get(pe):pe,ae.get(ur.id)?Ir={id:ae.get(ur.id),gap:ur.gap,direction:ur.direction}:Ir=ur,Ye.has(be)?Ye.get(be).push(Ir):Ye.set(be,[Ir]),Ye.has(Ir.id)||Ye.set(Ir.id,[]))})},"_loop8"),Ve=!0,je=!1,kt=void 0;try{for(var at=$.keys()[Symbol.iterator](),xt;!(Ve=(xt=at.next()).done);Ve=!0){var it=xt.value;Je(it)}}catch(Ot){je=!0,kt=Ot}finally{try{!Ve&&at.return&&at.return()}finally{if(je)throw kt}}var dt=I(tt),lt=I(Ye),It=k(dt),mt=k(lt),St=C(tt),gr=C(Ye),xn=[],jt=[];It.forEach(function(Ot,pe){xn[pe]=[],Ot.forEach(function(ur){St.get(ur).length==0&&xn[pe].push(ur)})}),mt.forEach(function(Ot,pe){jt[pe]=[],Ot.forEach(function(ur){gr.get(ur).length==0&&jt[pe].push(ur)})});var rn=M(tt,"horizontal",Ge,Ce,xn),Er=M(Ye,"vertical",Me,Ae,jt),Kn=o(function(pe){we.get(pe)?we.get(pe).forEach(function(ur){b[x.get(ur)]=rn.get(pe)}):b[x.get(pe)]=rn.get(pe)},"_loop9"),hn=!0,Qn=!1,on=void 0;try{for(var Rn=rn.keys()[Symbol.iterator](),Ha;!(hn=(Ha=Rn.next()).done);hn=!0){var _a=Ha.value;Kn(_a)}}catch(Ot){Qn=!0,on=Ot}finally{try{!hn&&Rn.return&&Rn.return()}finally{if(Qn)throw on}}var To=o(function(pe){Te.get(pe)?Te.get(pe).forEach(function(ur){w[x.get(ur)]=Er.get(pe)}):w[x.get(pe)]=Er.get(pe)},"_loop10"),qi=!0,ht=!1,At=void 0;try{for(var $t=Er.keys()[Symbol.iterator](),rt;!(qi=(rt=$t.next()).done);qi=!0){var _a=rt.value;To(_a)}}catch(Ot){ht=!0,At=Ot}finally{try{!qi&&$t.return&&$t.return()}finally{if(ht)throw At}}}()}for(var re=0;re<S.length;re++){var he=S[re];he.getChild()==null&&he.setCenter(b[x.get(he.id)],w[x.get(he.id)])}},a.exports=m},551:a=>{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return e[a](l,l.exports,n),l.exports}o(n,"__webpack_require__");var i=n(45);return i})()})});var X1e=gi((xb,JB)=>{"use strict";o(function(e,r){typeof xb=="object"&&typeof JB=="object"?JB.exports=r(ZB()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof xb=="object"?xb.cytoscapeFcose=r(ZB()):e.cytoscapeFcose=r(e.coseBase)},"webpackUniversalModuleDefinition")(xb,function(t){return(()=>{"use strict";var e={658:a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var l=arguments.length,u=Array(l>1?l-1:0),h=1;h<l;h++)u[h-1]=arguments[h];return u.forEach(function(f){Object.keys(f).forEach(function(d){return s[d]=f[d]})}),s}},548:(a,s,l)=>{var u=function(){function d(p,m){var g=[],y=!0,v=!1,x=void 0;try{for(var b=p[Symbol.iterator](),w;!(y=(w=b.next()).done)&&(g.push(w.value),!(m&&g.length===m));y=!0);}catch(S){v=!0,x=S}finally{try{!y&&b.return&&b.return()}finally{if(v)throw x}}return g}return o(d,"sliceIterator"),function(p,m){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return d(p,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=l(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(d){for(var p={},m=0;m<d.length;m++)p[d[m].id()]=!0;var g=d.filter(function(y,v){typeof y=="number"&&(y=v);for(var x=y.parent()[0];x!=null;){if(p[x.id()])return!1;x=x.parent()[0]}return!0});return g},f.connectComponents=function(d,p,m,g){var y=new h,v=new Set,x=[],b=void 0,w=void 0,S=void 0,T=!1,E=1,_=[],A=[],L=o(function(){var N=d.collection();A.push(N);var k=m[0],I=d.collection();I.merge(k).merge(k.descendants().intersection(p)),x.push(k),I.forEach(function(D){y.push(D),v.add(D),N.merge(D)});for(var C=o(function(){k=y.shift();var P=d.collection();k.neighborhood().nodes().forEach(function(z){p.intersection(k.edgesWith(z)).length>0&&P.merge(z)});for(var F=0;F<P.length;F++){var B=P[F];if(b=m.intersection(B.union(B.ancestors())),b!=null&&!v.has(b[0])){var $=b.union(b.descendants());$.forEach(function(z){y.push(z),v.add(z),N.merge(z),m.has(z)&&x.push(z)})}}},"_loop2");y.length!=0;)C();if(N.forEach(function(D){p.intersection(D.connectedEdges()).forEach(function(P){N.has(P.source())&&N.has(P.target())&&N.merge(P)})}),x.length==m.length&&(T=!0),!T||T&&E>1){w=x[0],S=w.connectedEdges().length,x.forEach(function(D){D.connectedEdges().length<S&&(S=D.connectedEdges().length,w=D)}),_.push(w.id());var O=d.collection();O.merge(x[0]),x.forEach(function(D){O.merge(D)}),x=[],m=m.difference(O),E++}},"_loop");do L();while(!T);return g&&_.length>0&&g.set("dummy"+(g.size+1),_),A},f.relocateComponent=function(d,p,m){if(!m.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(m.quality=="draft"){var b=!0,w=!1,S=void 0;try{for(var T=p.nodeIndexes[Symbol.iterator](),E;!(b=(E=T.next()).done);b=!0){var _=E.value,A=u(_,2),L=A[0],M=A[1],N=m.cy.getElementById(L);if(N){var k=N.boundingBox(),I=p.xCoords[M]-k.w/2,C=p.xCoords[M]+k.w/2,O=p.yCoords[M]-k.h/2,D=p.yCoords[M]+k.h/2;I<g&&(g=I),C>y&&(y=C),O<v&&(v=O),D>x&&(x=D)}}}catch(z){w=!0,S=z}finally{try{!b&&T.return&&T.return()}finally{if(w)throw S}}var P=d.x-(y+g)/2,F=d.y-(x+v)/2;p.xCoords=p.xCoords.map(function(z){return z+P}),p.yCoords=p.yCoords.map(function(z){return z+F})}else{Object.keys(p).forEach(function(z){var Y=p[z],Q=Y.getRect().x,X=Y.getRect().x+Y.getRect().width,ie=Y.getRect().y,j=Y.getRect().y+Y.getRect().height;Q<g&&(g=Q),X>y&&(y=X),ie<v&&(v=ie),j>x&&(x=j)});var B=d.x-(y+g)/2,$=d.y-(x+v)/2;Object.keys(p).forEach(function(z){var Y=p[z];Y.setCenter(Y.getCenterX()+B,Y.getCenterY()+$)})}}},f.calcBoundingBox=function(d,p,m,g){for(var y=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,w=void 0,S=void 0,T=void 0,E=void 0,_=d.descendants().not(":parent"),A=_.length,L=0;L<A;L++){var M=_[L];w=p[g.get(M.id())]-M.width()/2,S=p[g.get(M.id())]+M.width()/2,T=m[g.get(M.id())]-M.height()/2,E=m[g.get(M.id())]+M.height()/2,y>w&&(y=w),v<S&&(v=S),x>T&&(x=T),b<E&&(b=E)}var N={};return N.topLeftX=y,N.topLeftY=x,N.width=v-y,N.height=b-x,N},f.calcParentsWithoutChildren=function(d,p){var m=d.collection();return p.nodes(":parent").forEach(function(g){var y=!1;g.children().forEach(function(v){v.css("display")!="none"&&(y=!0)}),y||m.merge(g)}),m},a.exports=f},816:(a,s,l)=>{var u=l(548),h=l(140).CoSELayout,f=l(140).CoSENode,d=l(140).layoutBase.PointD,p=l(140).layoutBase.DimensionD,m=l(140).layoutBase.LayoutConstants,g=l(140).layoutBase.FDLayoutConstants,y=l(140).CoSEConstants,v=o(function(b,w){var S=b.cy,T=b.eles,E=T.nodes(),_=T.edges(),A=void 0,L=void 0,M=void 0,N={};b.randomize&&(A=w.nodeIndexes,L=w.xCoords,M=w.yCoords);var k=o(function(z){return typeof z=="function"},"isFn"),I=o(function(z,Y){return k(z)?z(Y):z},"optFn"),C=u.calcParentsWithoutChildren(S,T),O=o(function $(z,Y,Q,X){for(var ie=Y.length,j=0;j<ie;j++){var J=Y[j],Z=null;J.intersection(C).length==0&&(Z=J.children());var H=void 0,q=J.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(X.randomize)if(!J.isParent())H=z.add(new f(Q.graphManager,new d(L[A.get(J.id())]-q.w/2,M[A.get(J.id())]-q.h/2),new p(parseFloat(q.w),parseFloat(q.h))));else{var K=u.calcBoundingBox(J,L,M,A);J.intersection(C).length==0?H=z.add(new f(Q.graphManager,new d(K.topLeftX,K.topLeftY),new p(K.width,K.height))):H=z.add(new f(Q.graphManager,new d(K.topLeftX,K.topLeftY),new p(parseFloat(q.w),parseFloat(q.h))))}else H=z.add(new f(Q.graphManager,new d(J.position("x")-q.w/2,J.position("y")-q.h/2),new p(parseFloat(q.w),parseFloat(q.h))));else H=z.add(new f(this.graphManager));if(H.id=J.data("id"),H.nodeRepulsion=I(X.nodeRepulsion,J),H.paddingLeft=parseInt(J.css("padding")),H.paddingTop=parseInt(J.css("padding")),H.paddingRight=parseInt(J.css("padding")),H.paddingBottom=parseInt(J.css("padding")),X.nodeDimensionsIncludeLabels&&(H.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,H.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,H.labelPosVertical=J.css("text-valign"),H.labelPosHorizontal=J.css("text-halign")),N[J.data("id")]=H,isNaN(H.rect.x)&&(H.rect.x=0),isNaN(H.rect.y)&&(H.rect.y=0),Z!=null&&Z.length>0){var se=void 0;se=Q.getGraphManager().add(Q.newGraph(),H),$(se,Z,Q,X)}}},"processChildrenList"),D=o(function(z,Y,Q){for(var X=0,ie=0,j=0;j<Q.length;j++){var J=Q[j],Z=N[J.data("source")],H=N[J.data("target")];if(Z&&H&&Z!==H&&Z.getEdgesBetween(H).length==0){var q=Y.add(z.newEdge(),Z,H);q.id=J.id(),q.idealLength=I(b.idealEdgeLength,J),q.edgeElasticity=I(b.edgeElasticity,J),X+=q.idealLength,ie++}}b.idealEdgeLength!=null&&(ie>0?y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=X/ie:k(b.idealEdgeLength)?y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,y.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,y.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},"processEdges"),P=o(function(z,Y){Y.fixedNodeConstraint&&(z.constraints.fixedNodeConstraint=Y.fixedNodeConstraint),Y.alignmentConstraint&&(z.constraints.alignmentConstraint=Y.alignmentConstraint),Y.relativePlacementConstraint&&(z.constraints.relativePlacementConstraint=Y.relativePlacementConstraint)},"processConstraints");b.nestingFactor!=null&&(y.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(y.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(y.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(y.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(y.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(y.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?m.QUALITY=2:m.QUALITY=0,y.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,y.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=!b.randomize,y.ANIMATE=g.ANIMATE=m.ANIMATE=b.animate,y.TILE=b.tile,y.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,y.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,y.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=!0,y.PURE_INCREMENTAL=!b.randomize,m.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!1),b.step=="enforced"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!1),b.step=="cose"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?y.TREE_REDUCTION_ON_INCREMENTAL=!1:y.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new h,B=F.newGraphManager();return O(B.addRoot(),u.getTopMostNodes(E),F,b),D(F,B,_),P(F,b),F.runLayout(),N},"coseLayout");a.exports={coseLayout:v}},212:(a,s,l)=>{var u=function(){function b(w,S){for(var T=0;T<S.length;T++){var E=S[T];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return o(b,"defineProperties"),function(w,S,T){return S&&b(w.prototype,S),T&&b(w,T),w}}();function h(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}o(h,"_classCallCheck");var f=l(658),d=l(548),p=l(657),m=p.spectralLayout,g=l(816),y=g.coseLayout,v=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:o(function(w){return 4500},"nodeRepulsion"),idealEdgeLength:o(function(w){return 50},"idealEdgeLength"),edgeElasticity:o(function(w){return .45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:o(function(){},"ready"),stop:o(function(){},"stop")}),x=function(){function b(w){h(this,b),this.options=f({},v,w)}return o(b,"Layout"),u(b,[{key:"run",value:o(function(){var S=this,T=this.options,E=T.cy,_=T.eles,A=[],L=void 0,M=void 0,N=[],k=void 0,I=[];T.fixedNodeConstraint&&(!Array.isArray(T.fixedNodeConstraint)||T.fixedNodeConstraint.length==0)&&(T.fixedNodeConstraint=void 0),T.alignmentConstraint&&(T.alignmentConstraint.vertical&&(!Array.isArray(T.alignmentConstraint.vertical)||T.alignmentConstraint.vertical.length==0)&&(T.alignmentConstraint.vertical=void 0),T.alignmentConstraint.horizontal&&(!Array.isArray(T.alignmentConstraint.horizontal)||T.alignmentConstraint.horizontal.length==0)&&(T.alignmentConstraint.horizontal=void 0)),T.relativePlacementConstraint&&(!Array.isArray(T.relativePlacementConstraint)||T.relativePlacementConstraint.length==0)&&(T.relativePlacementConstraint=void 0);var C=T.fixedNodeConstraint||T.alignmentConstraint||T.relativePlacementConstraint;C&&(T.tile=!1,T.packComponents=!1);var O=void 0,D=!1;if(E.layoutUtilities&&T.packComponents&&(O=E.layoutUtilities("get"),O||(O=E.layoutUtilities()),D=!0),_.nodes().length>0)if(D){var B=d.getTopMostNodes(T.eles.nodes());if(k=d.connectComponents(E,T.eles,B),k.forEach(function(oe){var ke=oe.boundingBox();I.push({x:ke.x1+ke.w/2,y:ke.y1+ke.h/2})}),T.randomize&&k.forEach(function(oe){T.eles=oe,A.push(m(T))}),T.quality=="default"||T.quality=="proof"){var $=E.collection();if(T.tile){var z=new Map,Y=[],Q=[],X=0,ie={nodeIndexes:z,xCoords:Y,yCoords:Q},j=[];if(k.forEach(function(oe,ke){oe.edges().length==0&&(oe.nodes().forEach(function(Ie,Se){$.merge(oe.nodes()[Se]),Ie.isParent()||(ie.nodeIndexes.set(oe.nodes()[Se].id(),X++),ie.xCoords.push(oe.nodes()[0].position().x),ie.yCoords.push(oe.nodes()[0].position().y))}),j.push(ke))}),$.length>1){var J=$.boundingBox();I.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),k.push($),A.push(ie);for(var Z=j.length-1;Z>=0;Z--)k.splice(j[Z],1),A.splice(j[Z],1),I.splice(j[Z],1)}}k.forEach(function(oe,ke){T.eles=oe,N.push(y(T,A[ke])),d.relocateComponent(I[ke],N[ke],T)})}else k.forEach(function(oe,ke){d.relocateComponent(I[ke],A[ke],T)});var H=new Set;if(k.length>1){var q=[],K=_.filter(function(oe){return oe.css("display")=="none"});k.forEach(function(oe,ke){var Ie=void 0;if(T.quality=="draft"&&(Ie=A[ke].nodeIndexes),oe.nodes().not(K).length>0){var Se={};Se.edges=[],Se.nodes=[];var Ue=void 0;oe.nodes().not(K).forEach(function(Pe){if(T.quality=="draft")if(!Pe.isParent())Ue=Ie.get(Pe.id()),Se.nodes.push({x:A[ke].xCoords[Ue]-Pe.boundingbox().w/2,y:A[ke].yCoords[Ue]-Pe.boundingbox().h/2,width:Pe.boundingbox().w,height:Pe.boundingbox().h});else{var _e=d.calcBoundingBox(Pe,A[ke].xCoords,A[ke].yCoords,Ie);Se.nodes.push({x:_e.topLeftX,y:_e.topLeftY,width:_e.width,height:_e.height})}else N[ke][Pe.id()]&&Se.nodes.push({x:N[ke][Pe.id()].getLeft(),y:N[ke][Pe.id()].getTop(),width:N[ke][Pe.id()].getWidth(),height:N[ke][Pe.id()].getHeight()})}),oe.edges().forEach(function(Pe){var _e=Pe.source(),me=Pe.target();if(_e.css("display")!="none"&&me.css("display")!="none")if(T.quality=="draft"){var W=Ie.get(_e.id()),fe=Ie.get(me.id()),ge=[],re=[];if(_e.isParent()){var he=d.calcBoundingBox(_e,A[ke].xCoords,A[ke].yCoords,Ie);ge.push(he.topLeftX+he.width/2),ge.push(he.topLeftY+he.height/2)}else ge.push(A[ke].xCoords[W]),ge.push(A[ke].yCoords[W]);if(me.isParent()){var ne=d.calcBoundingBox(me,A[ke].xCoords,A[ke].yCoords,Ie);re.push(ne.topLeftX+ne.width/2),re.push(ne.topLeftY+ne.height/2)}else re.push(A[ke].xCoords[fe]),re.push(A[ke].yCoords[fe]);Se.edges.push({startX:ge[0],startY:ge[1],endX:re[0],endY:re[1]})}else N[ke][_e.id()]&&N[ke][me.id()]&&Se.edges.push({startX:N[ke][_e.id()].getCenterX(),startY:N[ke][_e.id()].getCenterY(),endX:N[ke][me.id()].getCenterX(),endY:N[ke][me.id()].getCenterY()})}),Se.nodes.length>0&&(q.push(Se),H.add(ke))}});var se=O.packComponents(q,T.randomize).shifts;if(T.quality=="draft")A.forEach(function(oe,ke){var Ie=oe.xCoords.map(function(Ue){return Ue+se[ke].dx}),Se=oe.yCoords.map(function(Ue){return Ue+se[ke].dy});oe.xCoords=Ie,oe.yCoords=Se});else{var ce=0;H.forEach(function(oe){Object.keys(N[oe]).forEach(function(ke){var Ie=N[oe][ke];Ie.setCenter(Ie.getCenterX()+se[ce].dx,Ie.getCenterY()+se[ce].dy)}),ce++})}}}else{var P=T.eles.boundingBox();if(I.push({x:P.x1+P.w/2,y:P.y1+P.h/2}),T.randomize){var F=m(T);A.push(F)}T.quality=="default"||T.quality=="proof"?(N.push(y(T,A[0])),d.relocateComponent(I[0],N[0],T)):d.relocateComponent(I[0],A[0],T)}var ue=o(function(ke,Ie){if(T.quality=="default"||T.quality=="proof"){typeof ke=="number"&&(ke=Ie);var Se=void 0,Ue=void 0,Pe=ke.data("id");return N.forEach(function(me){Pe in me&&(Se={x:me[Pe].getRect().getCenterX(),y:me[Pe].getRect().getCenterY()},Ue=me[Pe])}),T.nodeDimensionsIncludeLabels&&(Ue.labelWidth&&(Ue.labelPosHorizontal=="left"?Se.x+=Ue.labelWidth/2:Ue.labelPosHorizontal=="right"&&(Se.x-=Ue.labelWidth/2)),Ue.labelHeight&&(Ue.labelPosVertical=="top"?Se.y+=Ue.labelHeight/2:Ue.labelPosVertical=="bottom"&&(Se.y-=Ue.labelHeight/2))),Se==null&&(Se={x:ke.position("x"),y:ke.position("y")}),{x:Se.x,y:Se.y}}else{var _e=void 0;return A.forEach(function(me){var W=me.nodeIndexes.get(ke.id());W!=null&&(_e={x:me.xCoords[W],y:me.yCoords[W]})}),_e==null&&(_e={x:ke.position("x"),y:ke.position("y")}),{x:_e.x,y:_e.y}}},"getPositions");if(T.quality=="default"||T.quality=="proof"||T.randomize){var te=d.calcParentsWithoutChildren(E,_),De=_.filter(function(oe){return oe.css("display")=="none"});T.eles=_.not(De),_.nodes().not(":parent").not(De).layoutPositions(S,T,ue),te.length>0&&te.forEach(function(oe){oe.position(ue(oe))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),b}();a.exports=x},657:(a,s,l)=>{var u=l(548),h=l(140).layoutBase.Matrix,f=l(140).layoutBase.SVD,d=o(function(m){var g=m.cy,y=m.eles,v=y.nodes(),x=y.nodes(":parent"),b=new Map,w=new Map,S=new Map,T=[],E=[],_=[],A=[],L=[],M=[],N=[],k=[],I=void 0,C=void 0,O=1e8,D=1e-9,P=m.piTol,F=m.samplingType,B=m.nodeSeparation,$=void 0,z=o(function(){for(var we=0,Te=0,Ce=!1;Te<$;){we=Math.floor(Math.random()*C),Ce=!1;for(var Ae=0;Ae<Te;Ae++)if(A[Ae]==we){Ce=!0;break}if(!Ce)A[Te]=we,Te++;else continue}},"randomSampleCR"),Y=o(function(we,Te,Ce){for(var Ae=[],Ge=0,Me=0,ye=0,He=void 0,ze=[],Ze=0,gt=1,yt=0;yt<C;yt++)ze[yt]=O;for(Ae[Me]=we,ze[we]=0;Me>=Ge;){ye=Ae[Ge++];for(var tt=T[ye],Ye=0;Ye<tt.length;Ye++)He=w.get(tt[Ye]),ze[He]==O&&(ze[He]=ze[ye]+1,Ae[++Me]=He);M[ye][Te]=ze[ye]*B}if(Ce){for(var Je=0;Je<C;Je++)M[Je][Te]<L[Je]&&(L[Je]=M[Je][Te]);for(var Ve=0;Ve<C;Ve++)L[Ve]>Ze&&(Ze=L[Ve],gt=Ve)}return gt},"BFS"),Q=o(function(we){var Te=void 0;if(we){Te=Math.floor(Math.random()*C),I=Te;for(var Ae=0;Ae<C;Ae++)L[Ae]=O;for(var Ge=0;Ge<$;Ge++)A[Ge]=Te,Te=Y(Te,Ge,we)}else{z();for(var Ce=0;Ce<$;Ce++)Y(A[Ce],Ce,we,!1)}for(var Me=0;Me<C;Me++)for(var ye=0;ye<$;ye++)M[Me][ye]*=M[Me][ye];for(var He=0;He<$;He++)N[He]=[];for(var ze=0;ze<$;ze++)for(var Ze=0;Ze<$;Ze++)N[ze][Ze]=M[A[Ze]][ze]},"allBFS"),X=o(function(){for(var we=f.svd(N),Te=we.S,Ce=we.U,Ae=we.V,Ge=Te[0]*Te[0]*Te[0],Me=[],ye=0;ye<$;ye++){Me[ye]=[];for(var He=0;He<$;He++)Me[ye][He]=0,ye==He&&(Me[ye][He]=Te[ye]/(Te[ye]*Te[ye]+Ge/(Te[ye]*Te[ye])))}k=h.multMat(h.multMat(Ae,Me),h.transpose(Ce))},"sample"),ie=o(function(){for(var we=void 0,Te=void 0,Ce=[],Ae=[],Ge=[],Me=[],ye=0;ye<C;ye++)Ce[ye]=Math.random(),Ae[ye]=Math.random();Ce=h.normalize(Ce),Ae=h.normalize(Ae);for(var He=0,ze=D,Ze=D,gt=void 0;;){He++;for(var yt=0;yt<C;yt++)Ge[yt]=Ce[yt];if(Ce=h.multGamma(h.multL(h.multGamma(Ge),M,k)),we=h.dotProduct(Ge,Ce),Ce=h.normalize(Ce),ze=h.dotProduct(Ge,Ce),gt=Math.abs(ze/Ze),gt<=1+P&&gt>=1)break;Ze=ze}for(var tt=0;tt<C;tt++)Ge[tt]=Ce[tt];for(He=0,Ze=D;;){He++;for(var Ye=0;Ye<C;Ye++)Me[Ye]=Ae[Ye];if(Me=h.minusOp(Me,h.multCons(Ge,h.dotProduct(Ge,Me))),Ae=h.multGamma(h.multL(h.multGamma(Me),M,k)),Te=h.dotProduct(Me,Ae),Ae=h.normalize(Ae),ze=h.dotProduct(Me,Ae),gt=Math.abs(ze/Ze),gt<=1+P&&gt>=1)break;Ze=ze}for(var Je=0;Je<C;Je++)Me[Je]=Ae[Je];E=h.multCons(Ge,Math.sqrt(Math.abs(we))),_=h.multCons(Me,Math.sqrt(Math.abs(Te)))},"powerIteration");u.connectComponents(g,y,u.getTopMostNodes(v),b),x.forEach(function(ae){u.connectComponents(g,y,u.getTopMostNodes(ae.descendants().intersection(y)),b)});for(var j=0,J=0;J<v.length;J++)v[J].isParent()||w.set(v[J].id(),j++);var Z=!0,H=!1,q=void 0;try{for(var K=b.keys()[Symbol.iterator](),se;!(Z=(se=K.next()).done);Z=!0){var ce=se.value;w.set(ce,j++)}}catch(ae){H=!0,q=ae}finally{try{!Z&&K.return&&K.return()}finally{if(H)throw q}}for(var ue=0;ue<w.size;ue++)T[ue]=[];x.forEach(function(ae){for(var we=ae.children().intersection(y);we.nodes(":childless").length==0;)we=we.nodes()[0].children().intersection(y);var Te=0,Ce=we.nodes(":childless")[0].connectedEdges().length;we.nodes(":childless").forEach(function(Ae,Ge){Ae.connectedEdges().length<Ce&&(Ce=Ae.connectedEdges().length,Te=Ge)}),S.set(ae.id(),we.nodes(":childless")[Te].id())}),v.forEach(function(ae){var we=void 0;ae.isParent()?we=w.get(S.get(ae.id())):we=w.get(ae.id()),ae.neighborhood().nodes().forEach(function(Te){y.intersection(ae.edgesWith(Te)).length>0&&(Te.isParent()?T[we].push(S.get(Te.id())):T[we].push(Te.id()))})});var te=o(function(we){var Te=w.get(we),Ce=void 0;b.get(we).forEach(function(Ae){g.getElementById(Ae).isParent()?Ce=S.get(Ae):Ce=Ae,T[Te].push(Ce),T[w.get(Ce)].push(we)})},"_loop"),De=!0,oe=!1,ke=void 0;try{for(var Ie=b.keys()[Symbol.iterator](),Se;!(De=(Se=Ie.next()).done);De=!0){var Ue=Se.value;te(Ue)}}catch(ae){oe=!0,ke=ae}finally{try{!De&&Ie.return&&Ie.return()}finally{if(oe)throw ke}}C=w.size;var Pe=void 0;if(C>2){$=C<m.sampleSize?C:m.sampleSize;for(var _e=0;_e<C;_e++)M[_e]=[];for(var me=0;me<$;me++)k[me]=[];return m.quality=="draft"||m.step=="all"?(Q(F),X(),ie(),Pe={nodeIndexes:w,xCoords:E,yCoords:_}):(w.forEach(function(ae,we){E.push(g.getElementById(we).position("x")),_.push(g.getElementById(we).position("y"))}),Pe={nodeIndexes:w,xCoords:E,yCoords:_}),Pe}else{var W=w.keys(),fe=g.getElementById(W.next().value),ge=fe.position(),re=fe.outerWidth();if(E.push(ge.x),_.push(ge.y),C==2){var he=g.getElementById(W.next().value),ne=he.outerWidth();E.push(ge.x+re/2+ne/2+m.idealEdgeLength),_.push(ge.y)}return Pe={nodeIndexes:w,xCoords:E,yCoords:_},Pe}},"spectralLayout");a.exports={spectralLayout:d}},579:(a,s,l)=>{var u=l(212),h=o(function(d){d&&d("layout","fcose",u)},"register");typeof cytoscape<"u"&&h(cytoscape),a.exports=h},140:a=>{a.exports=t}},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return e[a](l,l.exports,n),l.exports}o(n,"__webpack_require__");var i=n(579);return i})()})});var T1,J0,eF=R(()=>{"use strict";V1();T1=o(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),J0={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:T1('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:T1('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:T1('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:T1('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:T1('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:FC,blank:{body:T1("")}}}});var j1e,K1e,Q1e,Z1e,J1e=R(()=>{"use strict";V1();_t();Al();gb();eF();cC();j1e=o(async function(t,e){let r=Ci("padding"),n=Ci("iconSize"),i=n/2,a=n/6,s=a/2;await Promise.all(e.edges().map(async l=>{let{source:u,sourceDir:h,sourceArrow:f,sourceGroup:d,target:p,targetDir:m,targetArrow:g,targetGroup:y,label:v}=lC(l),{x,y:b}=l[0].sourceEndpoint(),{x:w,y:S}=l[0].midpoint(),{x:T,y:E}=l[0].targetEndpoint(),_=r+4;if(d&&(cs(h)?x+=h==="L"?-_:_:b+=h==="T"?-_:_+18),y&&(cs(m)?T+=m==="L"?-_:_:E+=m==="T"?-_:_+18),!d&&Z0.getNode(u)?.type==="junction"&&(cs(h)?x+=h==="L"?i:-i:b+=h==="T"?i:-i),!y&&Z0.getNode(p)?.type==="junction"&&(cs(m)?T+=m==="L"?i:-i:E+=m==="T"?i:-i),l[0]._private.rscratch){let A=t.insert("g");if(A.insert("path").attr("d",`M ${x},${b} L ${w},${S} L${T},${E} `).attr("class","edge"),f){let L=cs(h)?pb[h](x,a):x-s,M=Wc(h)?pb[h](b,a):b-s;A.insert("polygon").attr("points",qB[h](a)).attr("transform",`translate(${L},${M})`).attr("class","arrow")}if(g){let L=cs(m)?pb[m](T,a):T-s,M=Wc(m)?pb[m](E,a):E-s;A.insert("polygon").attr("points",qB[m](a)).attr("transform",`translate(${L},${M})`).attr("class","arrow")}if(v){let L=oC(h,m)?"XY":cs(h)?"X":"Y",M=0;L==="X"?M=Math.abs(x-T):L==="Y"?M=Math.abs(b-E)/1.5:M=Math.abs(x-T)/2;let N=A.append("g");if(await ta(N,v,{useHtmlLabels:!1,width:M,classes:"architecture-service-label"},de()),N.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),L==="X")N.attr("transform","translate("+w+", "+S+")");else if(L==="Y")N.attr("transform","translate("+w+", "+S+") rotate(-90)");else if(L==="XY"){let k=mb(h,m);if(k&&F1e(k)){let I=N.node().getBoundingClientRect(),[C,O]=G1e(k);N.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*C*O*45})`);let D=N.node().getBoundingClientRect();N.attr("transform",`
2106 `)}}}}}))},"drawEdges"),K1e=o(async function(t,e){let n=Ci("padding")*.75,i=Ci("fontSize"),s=Ci("iconSize")/2;await Promise.all(e.nodes().map(async l=>{let u=If(l);if(u.type==="group"){let{h,w:f,x1:d,y1:p}=l.boundingBox();t.append("rect").attr("x",d+s).attr("y",p+s).attr("width",f).attr("height",h).attr("class","node-bkg");let m=t.append("g"),g=d,y=p;if(u.icon){let v=m.append("g");v.html(`<g>${await zb(u.icon,{height:n,width:n,fallbackPrefix:J0.prefix})}</g>`),v.attr("transform","translate("+(g+s+1)+", "+(y+s+1)+")"),g+=n,y+=i/2-1-2}if(u.label){let v=m.append("g");await ta(v,u.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},de()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(g+s+4)+", "+(y+s+2)+")")}}}))},"drawGroups"),Q1e=o(async function(t,e,r){for(let n of r){let i=e.append("g"),a=Ci("iconSize");if(n.title){let h=i.append("g");await ta(h,n.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},de()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),h.attr("transform","translate("+a/2+", "+a+")")}let s=i.append("g");if(n.icon)s.html(`<g>${await zb(n.icon,{height:a,width:a,fallbackPrefix:J0.prefix})}</g>`);else if(n.iconText){s.html(`<g>${await zb("blank",{height:a,width:a,fallbackPrefix:J0.prefix})}</g>`);let d=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),p=parseInt(window.getComputedStyle(d.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;d.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/p)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`);i.attr("class","architecture-service");let{width:l,height:u}=i._groups[0][0].getBBox();n.width=l,n.height=u,t.setElementForId(n.id,i)}return 0},"drawServices"),Z1e=o(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=Ci("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:l,height:u}=i._groups[0][0].getBBox();i.width=l,i.height=u,t.setElementForId(n.id,i)})},"drawJunctions")});function iet(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"service",id:r.id,icon:r.icon,label:r.title,parent:r.in,width:Ci("iconSize"),height:Ci("iconSize")},classes:"node-service"})})}function aet(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"junction",id:r.id,parent:r.in,width:Ci("iconSize"),height:Ci("iconSize")},classes:"node-junction"})})}function set(t,e){e.nodes().map(r=>{let n=If(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function oet(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function cet(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:l,lhsDir:u,rhsDir:h,rhsGroup:f,title:d}=r,p=oC(r.lhsDir,r.rhsDir)?"segments":"straight",m={id:`${n}-${i}`,label:d,source:n,sourceDir:u,sourceArrow:a,sourceGroup:s,sourceEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%",target:i,targetDir:h,targetArrow:l,targetGroup:f,targetEndpoint:h==="L"?"0 50%":h==="R"?"100% 50%":h==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:m,classes:p})})}function uet(t){let e=t.map(i=>{let a={},s={};return Object.entries(i).forEach(([l,[u,h]])=>{a[h]||(a[h]=[]),s[u]||(s[u]=[]),a[h].push(l),s[u].push(l)}),{horiz:Object.values(a).filter(l=>l.length>1),vert:Object.values(s).filter(l=>l.length>1)}}),[r,n]=e.reduce(([i,a],{horiz:s,vert:l})=>[[...i,...s],[...a,...l]],[[],[]]);return{horizontal:r,vertical:n}}function het(t){let e=[],r=o(i=>`${i[0]},${i[1]}`,"posToStr"),n=o(i=>i.split(",").map(a=>parseInt(a)),"strToPos");return t.forEach(i=>{let a=Object.fromEntries(Object.entries(i).map(([h,f])=>[r(f),h])),s=[r([0,0])],l={},u={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){let h=s.shift();if(h){l[h]=1;let f=a[h];if(f){let d=n(h);Object.entries(u).forEach(([p,m])=>{let g=r([d[0]+m[0],d[1]+m[1]]),y=a[g];y&&!l[g]&&(s.push(g),e.push({[WB[p]]:y,[WB[B1e(p)]]:f,gap:1.5*Ci("iconSize")}))})}}}}),e}function fet(t,e,r,n,{spatialMaps:i}){return new Promise(a=>{let s=$e("body").append("div").attr("id","cy").attr("style","display:none"),l=rl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Ci("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Ci("padding")}px`}}]});s.remove(),oet(r,l),iet(t,l),aet(e,l),cet(n,l);let u=uet(i),h=het(i),f=l.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(d){let[p,m]=d.connectedNodes(),{parent:g}=If(p),{parent:y}=If(m);return g===y?1.5*Ci("iconSize"):.5*Ci("iconSize")},edgeElasticity(d){let[p,m]=d.connectedNodes(),{parent:g}=If(p),{parent:y}=If(m);return g===y?.45:.001},alignmentConstraint:u,relativePlacementConstraint:h});f.one("layoutstop",()=>{function d(p,m,g,y){let v,x,{x:b,y:w}=p,{x:S,y:T}=m;x=(y-w+(b-g)*(w-T)/(b-S))/Math.sqrt(1+Math.pow((w-T)/(b-S),2)),v=Math.sqrt(Math.pow(y-w,2)+Math.pow(g-b,2)-Math.pow(x,2));let E=Math.sqrt(Math.pow(S-b,2)+Math.pow(T-w,2));v=v/E;let _=(S-b)*(y-w)-(T-w)*(g-b);switch(!0){case _>=0:_=1;break;case _<0:_=-1;break}let A=(S-b)*(g-b)+(T-w)*(y-w);switch(!0){case A>=0:A=1;break;case A<0:A=-1;break}return x=Math.abs(x)*_,v=v*A,{distances:x,weights:v}}o(d,"getSegmentWeights"),l.startBatch();for(let p of Object.values(l.edges()))if(p.data?.()){let{x:m,y:g}=p.source().position(),{x:y,y:v}=p.target().position();if(m!==y&&g!==v){let x=p.sourceEndpoint(),b=p.targetEndpoint(),{sourceDir:w}=lC(p),[S,T]=Wc(w)?[x.x,b.y]:[b.x,x.y],{weights:E,distances:_}=d(x,b,S,T);p.style("segment-distances",_),p.style("segment-weights",E)}}l.endBatch(),f.run()}),f.run(),l.ready(d=>{V.info("Ready",d),a(l)})})}var eye,det,tye,rye=R(()=>{"use strict";V1();vB();eye=Xi(X1e(),1);Zt();ut();pf();Yn();gb();eF();cC();J1e();Fb([{name:J0.prefix,icons:J0}]);rl.use(eye.default);o(iet,"addServices");o(aet,"addJunctions");o(set,"positionNodes");o(oet,"addGroups");o(cet,"addEdges");o(uet,"getAlignments");o(het,"getRelativeConstraints");o(fet,"layoutArchitecture");det=o(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),l=i.getGroups(),u=i.getEdges(),h=i.getDataStructures(),f=Ps(e),d=f.append("g");d.attr("class","architecture-edges");let p=f.append("g");p.attr("class","architecture-services");let m=f.append("g");m.attr("class","architecture-groups"),await Q1e(i,p,a),Z1e(i,p,s);let g=await fet(a,s,l,u,h);await j1e(d,g),await K1e(m,g),set(i,g),Lo(void 0,f,Ci("padding"),Ci("useMaxWidth"))},"draw"),tye={draw:det}});var nye={};hr(nye,{diagram:()=>pet});var pet,iye=R(()=>{"use strict";Y1e();gb();q1e();rye();pet={parser:H1e,db:Z0,renderer:tye,styles:W1e}});var knt={};hr(knt,{default:()=>Tnt});V1();zC();Hf();var BX="c4",mCe=o(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),gCe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(PX(),OX));return{id:BX,diagram:t}},"loader"),yCe={id:BX,detector:mCe,loader:gCe},FX=yCe;var Zre="flowchart",SNe=o((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),ANe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(uT(),cT));return{id:Zre,diagram:t}},"loader"),_Ne={id:Zre,detector:SNe,loader:ANe},Jre=_Ne;var ene="flowchart-v2",LNe=o((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"),DNe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(uT(),cT));return{id:ene,diagram:t}},"loader"),RNe={id:ene,detector:LNe,loader:DNe},tne=RNe;var Dne="er",sMe=o(t=>/^\s*erDiagram/.test(t),"detector"),oMe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Lne(),_ne));return{id:Dne,diagram:t}},"loader"),lMe={id:Dne,detector:sMe,loader:oMe},Rne=lMe;var $le="gitGraph",NBe=o(t=>/^\s*gitGraph/.test(t),"detector"),MBe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Gle(),zle));return{id:$le,diagram:t}},"loader"),IBe={id:$le,detector:NBe,loader:MBe},Vle=IBe;var vce="gantt",wFe=o(t=>/^\s*gantt/.test(t),"detector"),TFe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(yce(),gce));return{id:vce,diagram:t}},"loader"),kFe={id:vce,detector:wFe,loader:TFe},xce=kFe;var _ce="info",LFe=o(t=>/^\s*info/.test(t),"detector"),DFe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ace(),Sce));return{id:_ce,diagram:t}},"loader"),Lce={id:_ce,detector:LFe,loader:DFe};var zce="pie",UFe=o(t=>/^\s*pie/.test(t),"detector"),HFe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Fce(),Bce));return{id:zce,diagram:t}},"loader"),Gce={id:zce,detector:UFe,loader:HFe};var Jce="quadrantChart",lze=o(t=>/^\s*quadrantChart/.test(t),"detector"),cze=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zce(),Qce));return{id:Jce,diagram:t}},"loader"),uze={id:Jce,detector:lze,loader:cze},eue=uze;var Aue="xychart",Sze=o(t=>/^\s*xychart-beta/.test(t),"detector"),Aze=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Sue(),Cue));return{id:Aue,diagram:t}},"loader"),_ze={id:Aue,detector:Sze,loader:Aze},_ue=_ze;var Hue="requirement",rGe=o(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),nGe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Uue(),Vue));return{id:Hue,diagram:t}},"loader"),iGe={id:Hue,detector:rGe,loader:nGe},Yue=iGe;var vhe="sequence",o$e=o(t=>/^\s*sequenceDiagram/.test(t),"detector"),l$e=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(yhe(),ghe));return{id:vhe,diagram:t}},"loader"),c$e={id:vhe,detector:o$e,loader:l$e},xhe=c$e;var Ihe="class",U$e=o((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),H$e=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Mhe(),Nhe));return{id:Ihe,diagram:t}},"loader"),Y$e={id:Ihe,detector:U$e,loader:H$e},Ohe=Y$e;var cfe="classDiagram",vVe=o((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),xVe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(lfe(),ofe));return{id:cfe,diagram:t}},"loader"),bVe={id:cfe,detector:vVe,loader:xVe},ufe=bVe;var tde="state",mUe=o((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),gUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ede(),Jfe));return{id:tde,diagram:t}},"loader"),yUe={id:tde,detector:mUe,loader:gUe},rde=yUe;var ade="stateDiagram",xUe=o((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),bUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ide(),nde));return{id:ade,diagram:t}},"loader"),wUe={id:ade,detector:xUe,loader:bUe},sde=wUe;var Tde="journey",VUe=o(t=>/^\s*journey/.test(t),"detector"),UUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wde(),bde));return{id:Tde,diagram:t}},"loader"),HUe={id:Tde,detector:VUe,loader:UUe},kde=HUe;ut();pf();Yn();var YUe=o((t,e,r)=>{V.debug(`rendering svg for syntax error
2107 `);let n=Ps(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Sr(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),fP={draw:YUe},Ede=fP;var WUe={db:{},renderer:fP,parser:{parse:o(()=>{},"parse")}},Cde=WUe;var Sde="flowchart-elk",qUe=o((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),XUe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(uT(),cT));return{id:Sde,diagram:t}},"loader"),jUe={id:Sde,detector:qUe,loader:XUe},Ade=jUe;var Jde="timeline",pHe=o(t=>/^\s*timeline/.test(t),"detector"),mHe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Zde(),Qde));return{id:Jde,diagram:t}},"loader"),gHe={id:Jde,detector:pHe,loader:mHe},e0e=gHe;var vge="mindmap",TZe=o(t=>/^\s*mindmap/.test(t),"detector"),kZe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(yge(),gge));return{id:vge,diagram:t}},"loader"),EZe={id:vge,detector:TZe,loader:kZe},xge=EZe;var Zge="sankey",WZe=o(t=>/^\s*sankey-beta/.test(t),"detector"),qZe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Qge(),Kge));return{id:Zge,diagram:t}},"loader"),XZe={id:Zge,detector:WZe,loader:qZe},Jge=XZe;var c1e="packet",oJe=o(t=>/^\s*packet-beta/.test(t),"detector"),lJe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(l1e(),o1e));return{id:c1e,diagram:t}},"loader"),u1e={id:c1e,detector:oJe,loader:lJe};var O1e="block",FJe=o(t=>/^\s*block-beta/.test(t),"detector"),zJe=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(I1e(),M1e));return{id:O1e,diagram:t}},"loader"),GJe={id:O1e,detector:FJe,loader:zJe},P1e=GJe;var aye="architecture",met=o(t=>/^\s*architecture/.test(t),"detector"),get=o(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(iye(),nye));return{id:aye,diagram:t}},"loader"),yet={id:aye,detector:met,loader:get},sye=yet;Hf();_t();var oye=!1,k1=o(()=>{oye||(oye=!0,Jf("error",Cde,t=>t.toLowerCase().trim()==="error"),Jf("---",{db:{clear:o(()=>{},"clear")},styles:{},renderer:{draw:o(()=>{},"draw")},parser:{parse:o(()=>{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:o(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Ub(FX,ufe,Ohe,Rne,xce,Lce,Gce,Yue,xhe,Ade,tne,Jre,xge,e0e,Vle,sde,rde,kde,eue,Jge,u1e,_ue,P1e,sye))},"addDiagrams");ut();Hf();_t();var lye=o(async()=>{V.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Uf).map(async([r,{detector:n,loader:i}])=>{if(i)try{cy(r)}catch{try{let{diagram:a,id:s}=await i();Jf(s,a,n)}catch(a){throw V.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Uf[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){V.error(`Failed to load ${e.length} external diagrams`);for(let r of e)V.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");ut();Zt();var uC="comm",hC="rule",fC="decl";var cye="@import";var uye="@keyframes";var hye="@layer";var tF=Math.abs,bb=String.fromCharCode;function dC(t){return t.trim()}o(dC,"trim");function wb(t,e,r){return t.replace(e,r)}o(wb,"replace");function fye(t,e,r){return t.indexOf(e,r)}o(fye,"indexof");function ep(t,e){return t.charCodeAt(e)|0}o(ep,"charat");function Of(t,e,r){return t.slice(e,r)}o(Of,"substr");function wo(t){return t.length}o(wo,"strlen");function dye(t){return t.length}o(dye,"sizeof");function E1(t,e){return e.push(t),t}o(E1,"append");var pC=1,C1=1,pye=0,nl=0,Si=0,A1="";function mC(t,e,r,n,i,a,s,l){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:pC,column:C1,length:s,return:"",siblings:l}}o(mC,"node");function mye(){return Si}o(mye,"char");function gye(){return Si=nl>0?ep(A1,--nl):0,C1--,Si===10&&(C1=1,pC--),Si}o(gye,"prev");function il(){return Si=nl<pye?ep(A1,nl++):0,C1++,Si===10&&(C1=1,pC++),Si}o(il,"next");function th(){return ep(A1,nl)}o(th,"peek");function Tb(){return nl}o(Tb,"caret");function gC(t,e){return Of(A1,t,e)}o(gC,"slice");function S1(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}o(S1,"token");function yye(t){return pC=C1=1,pye=wo(A1=t),nl=0,[]}o(yye,"alloc");function vye(t){return A1="",t}o(vye,"dealloc");function yC(t){return dC(gC(nl-1,rF(t===91?t+2:t===40?t+1:t)))}o(yC,"delimit");function xye(t){for(;(Si=th())&&Si<33;)il();return S1(t)>2||S1(Si)>3?"":" "}o(xye,"whitespace");function bye(t,e){for(;--e&&il()&&!(Si<48||Si>102||Si>57&&Si<65||Si>70&&Si<97););return gC(t,Tb()+(e<6&&th()==32&&il()==32))}o(bye,"escaping");function rF(t){for(;il();)switch(Si){case t:return nl;case 34:case 39:t!==34&&t!==39&&rF(Si);break;case 40:t===41&&rF(t);break;case 92:il();break}return nl}o(rF,"delimiter");function wye(t,e){for(;il()&&t+Si!==57;)if(t+Si===84&&th()===47)break;return"/*"+gC(e,nl-1)+"*"+bb(t===47?t:il())}o(wye,"commenter");function Tye(t){for(;!S1(th());)il();return gC(t,nl)}o(Tye,"identifier");function Cye(t){return vye(vC("",null,null,null,[""],t=yye(t),0,[0],t))}o(Cye,"compile");function vC(t,e,r,n,i,a,s,l,u){for(var h=0,f=0,d=s,p=0,m=0,g=0,y=1,v=1,x=1,b=0,w="",S=i,T=a,E=n,_=w;v;)switch(g=b,b=il()){case 40:if(g!=108&&ep(_,d-1)==58){fye(_+=wb(yC(b),"&","&\f"),"&\f",tF(h?l[h-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:_+=yC(b);break;case 9:case 10:case 13:case 32:_+=xye(g);break;case 92:_+=bye(Tb()-1,7);continue;case 47:switch(th()){case 42:case 47:E1(vet(wye(il(),Tb()),e,r,u),u),(S1(g||1)==5||S1(th()||1)==5)&&wo(_)&&Of(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/"}break;case 123*y:l[h++]=wo(_)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+f:x==-1&&(_=wb(_,/\f/g,"")),m>0&&(wo(_)-d||y===0&&g===47)&&E1(m>32?Eye(_+";",n,r,d-1,u):Eye(wb(_," ","")+";",n,r,d-2,u),u);break;case 59:_+=";";default:if(E1(E=kye(_,e,r,h,f,i,l,w,S=[],T=[],d,a),a),b===123)if(f===0)vC(_,e,E,E,S,a,d,l,T);else switch(p===99&&ep(_,3)===110?100:p){case 100:case 108:case 109:case 115:vC(t,E,E,n&&E1(kye(t,E,E,0,0,i,l,w,i,S=[],d,T),T),i,T,d,l,n?S:T);break;default:vC(_,E,E,E,[""],T,0,l,T)}}h=f=m=0,y=x=1,w=_="",d=s;break;case 58:d=1+wo(_),m=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&gye()==125)continue}switch(_+=bb(b),b*y){case 38:x=f>0?1:(_+="\f",-1);break;case 44:l[h++]=(wo(_)-1)*x,x=1;break;case 64:th()===45&&(_+=yC(il())),p=th(),f=d=wo(w=_+=Tye(Tb())),b++;break;case 45:g===45&&wo(_)==2&&(y=0)}}return a}o(vC,"parse");function kye(t,e,r,n,i,a,s,l,u,h,f,d){for(var p=i-1,m=i===0?a:[""],g=dye(m),y=0,v=0,x=0;y<n;++y)for(var b=0,w=Of(t,p+1,p=tF(v=s[y])),S=t;b<g;++b)(S=dC(v>0?m[b]+" "+w:wb(w,/&\f/g,m[b])))&&(u[x++]=S);return mC(t,e,r,i===0?hC:l,u,h,f,d)}o(kye,"ruleset");function vet(t,e,r,n){return mC(t,e,r,uC,bb(mye()),Of(t,2,-2),0,n)}o(vet,"comment");function Eye(t,e,r,n,i){return mC(t,e,r,fC,Of(t,0,n),Of(t,n+1,-1),n,i)}o(Eye,"declaration");function xC(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}o(xC,"serialize");function Sye(t,e,r,n){switch(t.type){case hye:if(t.children.length)break;case cye:case fC:return t.return=t.return||t.value;case uC:return"";case uye:return t.return=t.value+"{"+xC(t.children,n)+"}";case hC:if(!wo(t.value=t.props.join(",")))return""}return wo(r=xC(t.children,n))?t.return=t.value+"{"+r+"}":""}o(Sye,"stringify");var Sve=Xi(o7(),1);Ww();HI();var xet="graphics-document document";function Aye(t,e){t.attr("role",xet),e!==""&&t.attr("aria-roledescription",e)}o(Aye,"setA11yDiagramInfo");function _ye(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}o(_ye,"addSVGa11yTitleDescription");cp();qs();qs();_t();Hf();GC();xr();var _1=class t{constructor(e,r,n,i,a){this.type=e;this.text=r;this.db=n;this.parser=i;this.renderer=a}static{o(this,"Diagram")}static async fromText(e,r={}){let n=Or(),i=lp(e,n);e=SX(e)+`
2146 </iframe>`},"putIntoIFrame"),Eve=o((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Krt);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function Cve(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}o(Cve,"sandboxedIframe");var fnt=o((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),dnt=o(async function(t,e,r){k1();let n=Ave(e);e=n.code;let i=Or();V.debug(i),e.length>(i?.maxTextSize??Wrt)&&(e=qrt);let a="#"+t,s="i"+t,l="#"+s,u="d"+t,h="#"+u,f=o(()=>{let I=$e(p?l:h).node();I&&"remove"in I&&I.remove()},"removeTempElements"),d=$e("body"),p=i.securityLevel===Xrt,m=i.securityLevel===jrt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let k=Cve($e(r),s);d=$e(k.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=$e(r);Eve(d,t,u,`font-family: ${g}`,Qrt)}else{if(fnt(document,t,u,s),p){let k=Cve($e("body"),s);d=$e(k.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=$e("body");Eve(d,t,u)}let y,v;try{y=await _1.fromText(e,{title:n.title})}catch(k){if(i.suppressErrorRendering)throw f(),k;y=await _1.fromText("error"),v=k}let x=d.select(h).node(),b=y.type,w=x.firstChild,S=w.firstChild,T=y.renderer.getClasses?.(e,y),E=cnt(i,b,T,a),_=document.createElement("style");_.innerHTML=E,w.insertBefore(_,S);try{await y.renderer.draw(e,t,fx,y)}catch(k){throw i.suppressErrorRendering?f():Ede.draw(e,t,fx),k}let A=d.select(`${h} svg`),L=y.db.getAccTitle?.(),M=y.db.getAccDescription?.();mnt(b,A,L,M),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Zrt);let N=d.select(h).node().innerHTML;if(V.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),N=unt(N,p,yr(i.arrowMarkerAbsolute)),p){let k=d.select(h+" svg").node();N=hnt(N,k)}else m||(N=Sve.default.sanitize(N,{ADD_TAGS:ant,ADD_ATTR:snt}));if(Dye(),v)throw v;return f(),{diagramType:b,svg:N,bindFunctions:y.db.bindFunctions}},"render");function pnt(t={}){let e=On({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Wz(e),e?.theme&&e.theme in Co?e.themeVariables=Co[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Co.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?n7(e):i7();$1(r.logLevel),k1()}o(pnt,"initialize");var _ve=o((t,e={})=>{let{code:r}=gF(t);return _1.fromText(r,e)},"getDiagramFromText");function mnt(t,e,r,n){Aye(e,t),_ye(e,r,n,e.attr("id"))}o(mnt,"addA11yInfo");var Ff=Object.freeze({render:dnt,parse:ont,getDiagramFromText:_ve,initialize:pnt,getConfig:Or,setConfig:Zb,getSiteConfig:i7,updateSiteConfig:qz,reset:o(()=>{Q1()},"reset"),globalReset:o(()=>{Q1(uh)},"globalReset"),defaultConfig:uh});$1(Or().logLevel);Q1(Or());oT();xr();var gnt=o((t,e,r)=>{V.warn(t),r9(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"),Lve=o(async function(t={querySelector:".mermaid"}){try{await ynt(t)}catch(e){if(r9(e)&&V.error(e.str),nh.parseError&&nh.parseError(e),!t.suppressErrors)throw V.error("Use the suppressErrors option to suppress these errors"),e}},"run"),ynt=o(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=Ff.getConfig();V.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");V.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(V.debug("Start On Load: "+n?.startOnLoad),Ff.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new Lt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,l=[];for(let u of Array.from(i)){V.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;s=u.innerHTML,s=Gb(Lt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");let f=Lt.detectInit(s);f&&V.debug("Detected early reinit: ",f);try{let{svg:d,bindFunctions:p}=await Mve(h,s,u);u.innerHTML=d,t&&await t(h),p&&p(u)}catch(d){gnt(d,l,nh.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),Dve=o(function(t){Ff.initialize(t)},"initialize"),vnt=o(async function(t,e,r){V.warn("mermaid.init is deprecated. Please use run instead."),t&&Dve(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await Lve(n)},"init"),xnt=o(async(t,{lazyLoad:e=!0}={})=>{k1(),Ub(...t),e===!1&&await lye()},"registerExternalDiagrams"),Rve=o(function(){if(nh.startOnLoad){let{startOnLoad:t}=Ff.getConfig();t&&nh.run().catch(e=>V.error("Mermaid failed to initialize",e))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Rve,!1)}var bnt=o(function(t){nh.parseError=t},"setParseErrorHandler"),SC=[],yF=!1,Nve=o(async()=>{if(!yF){for(yF=!0;SC.length>0;){let t=SC.shift();if(t)try{await t()}catch(e){V.error("Error executing queue",e)}}yF=!1}},"executeQueue"),wnt=o(async(t,e)=>new Promise((r,n)=>{let i=o(()=>new Promise((a,s)=>{Ff.parse(t,e).then(l=>{a(l),r(l)},l=>{V.error("Error parsing",l),nh.parseError?.(l),s(l),n(l)})}),"performCall");SC.push(i),Nve().catch(n)}),"parse"),Mve=o((t,e,r)=>new Promise((n,i)=>{let a=o(()=>new Promise((s,l)=>{Ff.render(t,e,r).then(u=>{s(u),n(u)},u=>{V.error("Error parsing",u),nh.parseError?.(u),l(u),i(u)})}),"performCall");SC.push(a),Nve().catch(i)}),"render"),nh={startOnLoad:!0,mermaidAPI:Ff,parse:wnt,render:Mve,init:vnt,run:Lve,registerExternalDiagrams:xnt,registerLayoutLoaders:gD,initialize:Dve,parseError:void 0,contentLoaded:Rve,setParseErrorHandler:bnt,detectType:lp,registerIconPacks:Fb},Tnt=nh;return $ve(knt);})();