var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var i,s,b,x,T,k,w,S,E=Object.create,_=Object.defineProperty,A=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,D=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,mt=(e,t)=>_(e,"name",{value:t,configurable:!0}),O=(t,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of N(r))M.call(t,e)||e===i||_(t,e,{get:()=>r[e],enumerable:!(n=A(r,e))||n.enumerable});return t},j=(e,t,r)=>(r=null!=e?E(D(e)):{},O(!t&&e&&e.__esModule?r:_(r,"default",{value:e,enumerable:!0}),e)),W=(r=(e,t)=>()=>t=e?e(e=0):t)(()=>{i=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),b=Object.freeze({...i,...s}),x=Object.freeze({...b,body:"",hidden:!1})}),U=r(()=>{W(),T=Object.freeze({width:null,height:null}),k=Object.freeze({...T,...s})}),G=r(()=>{w=mt((e,t,r,i="")=>{var n,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function V(e,t){var r={};return!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0),(e=((e.rotate||0)+(t.rotate||0))%4)&&(r.rotate=e),r}var Y=r(()=>{mt(V,"mergeIconTransformations")});function H(e,t){var r,i=V(e,t);for(r in x)r in s?r in e&&!(r in i)&&(i[r]=s[r]):r in t?i[r]=t[r]:r in e&&(i[r]=e[r]);return i}var te=r(()=>{W(),Y(),mt(H,"mergeIconData")});function re(e,t){let i=e.icons,n=e.aliases||Object.create(null),a=Object.create(null);function s(e){var t,r;return i[e]?a[e]=[]:(e in a||(a[e]=null,(r=(t=n[e]&&n[e].parent)&&s(t))&&(a[e]=[t].concat(r))),a[e])}return mt(s,"resolve"),(t||Object.keys(i).concat(Object.keys(n))).forEach(s),a}var ie=r(()=>{mt(re,"getIconsTree")});function ne(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function s(e){a=H(i[e]||n[e],a)}return mt(s,"parse"),s(t),r.forEach(s),H(e,a)}function ae(e,t){var r;return e.icons[t]?ne(e,t,[]):(r=re(e,[t])[t])?ne(e,t,r):null}var se=r(()=>{te(),ie(),mt(ne,"internalGetIconData"),mt(ae,"getIconData")});function oe(e,t,r){if(1===t)return e;if(r=r||100,"number"==typeof e)return Math.ceil(e*t*r)/r;if("string"!=typeof e)return e;var i,n=e.split(le);if(null===n||!n.length)return e;let a=[],s=n.shift(),o=ce.test(s);for(;;){if(!o||(i=parseFloat(s),isNaN(i))?a.push(s):a.push(Math.ceil(i*t*r)/r),void 0===(s=n.shift()))return a.join("");o=!o}}var le,ce,ue=r(()=>{le=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ce=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(oe,"calculateSize")});function de(e,t="defs"){let r="",i=e.indexOf("<"+t);for(;0<=i;){var n=e.indexOf(">",i),a=e.indexOf("",a);if(-1===s)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function pe(e,t){return e?""+e+""+t:t}function ge(e,t,r){return pe((e=de(e)).defs,t+e.content+r)}var fe=r(()=>{mt(de,"splitSVGDefs"),mt(pe,"mergeDefsAndContent"),mt(ge,"wrapSVGContent")});function me(e,t){let r={...b,...e},i={...k,...t},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,n=([r,i].forEach(e=>{let t=[],r=e.hFlip,i=e.vFlip,n=e.rotate;r?i?n+=2:(t.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),t.push("scale(-1 1)"),s.top=s.left=0):i&&(t.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),t.push("scale(1 -1)"),s.top=s.left=0);let a;switch(n<0&&(n-=4*Math.floor(n/4)),n%=4){case 1:a=s.height/2+s.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}n%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),t.length&&(o=ge(o,'',""))}),i.width),a=i.height,l=s.width,c=s.height,h,u,d=(null===n?(u=null===a?"1em":"auto"===a?c:a,h=oe(u,l/c)):(h="auto"===n?l:n,u=null===a?oe(h,c/l):"auto"===a?c:a),{}),p=mt((e,t)=>{ye(t)||(d[e]=t.toString())},"setAttr");return p("width",h),p("height",u),e=[s.left,s.top,l,c],d.viewBox=e.join(" "),{attributes:d,viewBox:e,body:o}}var ye,ve=r(()=>{W(),U(),ue(),fe(),ye=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(me,"iconToSVG")});function be(i,n=Te){for(var e,t=[];e=xe.exec(i);)t.push(e[1]);if(t.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);t.forEach(e=>{var t="function"==typeof n?n(e):n+(ke++).toString(),e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+e+')([")]|\\.[a-z])',"g"),"$1"+t+r+"$3")}),i=i.replace(new RegExp(r,"g"),"")}return i}var xe,Te,ke,we=r(()=>{xe=/\sid="(\S+)"/g,Te="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),ke=0,mt(be,"replaceIDs")});function Ce(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var Se,Ee,_e,Ae,P,Re,Le,Ie,Ne,De,Me,Oe,Pe,Be,$e,Fe,ze,qe,je,We,Ue,Ge,Ve,Ye,He,Xe,Ke,Ze,Qe,Je,et,tt,rt,it,nt,at,st,ot,lt,ct,ht,ut,dt,pt,gt,ft,bt,R,xt,L,Tt,kt,wt,n,Ct,St,Et,a,_t,At,Rt,Lt,It,Nt,Dt,Mt,Ot,Pt,Bt,$t,Ft,zt,qt,jt,Wt,Ut,Gt,Vt,Yt,Ht,Xt,Kt,Zt,Qt,Jt,er,tr,rr,ir,nr,ar,sr,or,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,br,xr,Tr,kr,wr,Cr,Sr,Er,_r,Ar=r(()=>{mt(Ce,"iconToHTML")}),Rr=r(()=>{G(),se(),ve(),we(),Ar()}),Lr=r(()=>{Se=mt((t,r,{depth:i=2,clobber:n=!1}={})=>{let a={depth:i,clobber:n};return Array.isArray(r)&&!Array.isArray(t)?(r.forEach(e=>Se(t,e,a)),t):Array.isArray(r)&&Array.isArray(t)?(r.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof r?Object.assign(t,r):r:(void 0!==r&&"object"==typeof t&&"object"==typeof r&&Object.keys(r).forEach(e=>{"object"!=typeof r[e]||null===r[e]||void 0!==t[e]&&"object"!=typeof t[e]?(n||"object"!=typeof t[e]&&"object"!=typeof r[e])&&(t[e]=r[e]):(void 0===t[e]&&(t[e]=Array.isArray(r[e])?[]:{}),t[e]=Se(t[e],r[e],{depth:i-1,clobber:n}))}),t)},"assignWithDepth"),Ee=Se}),Ir=(qat=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e,t)=>{function r(){var n="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",t="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,e={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:mt(function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},"ordinal")},i=mt(function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},"m"),r={s:i,z:mt(function(e){var e=-e.utcOffset(),t=Math.abs(e),r=Math.floor(t/60),t=t%60;return(e<=0?"+":"-")+i(r,2,"0")+":"+i(t,2,"0")},"z"),m:mt(function e(t,r){var i,n,a;return t.date(){var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var r,i,n=e.match(s);if(n)return r=n[2]-1||0,i=(n[7]||"0").substring(0,3),t?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}return new Date(e)})(),this.init()},e.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},e.$utils=function(){return T},e.isValid=function(){return this.$d.toString()!==t},e.isSame=function(e,t){return e=x(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return x(e){switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return T.s(d.$y,4,"0");case"M":return s+1;case"MM":return T.s(s+1,2,"0");case"MMM":return c(p.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return d.$D;case"DD":return T.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return c(p.weekdaysMin,d.$W,o,2);case"ddd":return c(p.weekdaysShort,d.$W,o,3);case"dddd":return o[d.$W];case"H":return String(i);case"HH":return T.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(i,a,!0);case"A":return u(i,a,!1);case"m":return String(a);case"mm":return T.s(a,2,"0");case"s":return String(d.$s);case"ss":return T.s(d.$s,2,"0");case"SSS":return T.s(d.$ms,3,"0");case"Z":return r}return null})()||r.replace(":","")})):p.invalidDate||t},e.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},e.diff=function(e,t,r){var i,n=this,t=T.p(t),a=x(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return T.m(n,a)},"D");switch(t){case y:i=l()/12;break;case m:i=l();break;case"quarter":i=l()/3;break;case f:i=(o-s)/6048e5;break;case g:i=(o-s)/864e5;break;case p:i=o/36e5;break;case d:i=o/6e4;break;case u:i=o/1e3;break;default:i=o}return r?i:T.a(i)},e.daysInMonth=function(){return this.endOf(m).$D},e.$locale=function(){return l[this.$L]},e.locale=function(e,t){var r;return e?(r=this.clone(),(e=h(e,t,!0))&&(r.$L=e),r):this.$L},e.clone=function(){return T.w(this.$d,this)},e.toDate=function(){return new Date(this.valueOf())},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toISOString=function(){return this.$d.toISOString()},e.toString=function(){return this.$d.toUTCString()},C),w=k.prototype;function C(e){this.$L=h(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return x.prototype=w,[["$ms",n],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(t){w[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),x.extend=function(e,t){return e.$i||(e(t,k,x),e.$i=!0),x},x.locale=h,x.isDayjs=c,x.unix=function(e){return x(1e3*e)},x.en=l[o],x.Ls=l,x.p={},x}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=r()}),e=r(()=>{_e=j(Ir(),1),Ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},Re=mt(function(e="fatal"){let t=Ae.fatal;"string"==typeof e?e.toLowerCase()in Ae&&(t=Ae[e]):"number"==typeof e&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Ae.fatal&&(P.fatal=console.error?console.error.bind(console,Le("FATAL"),"color: orange"):console.log.bind(console,"",Le("FATAL"))),t<=Ae.error&&(P.error=console.error?console.error.bind(console,Le("ERROR"),"color: orange"):console.log.bind(console,"",Le("ERROR"))),t<=Ae.warn&&(P.warn=console.warn?console.warn.bind(console,Le("WARN"),"color: orange"):console.log.bind(console,"",Le("WARN"))),t<=Ae.info&&(P.info=console.info?console.info.bind(console,Le("INFO"),"color: lightblue"):console.log.bind(console,"",Le("INFO"))),t<=Ae.debug&&(P.debug=console.debug?console.debug.bind(console,Le("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Le("DEBUG"))),t<=Ae.trace&&(P.trace=console.debug?console.debug.bind(console,Le("TRACE"),"color: lightgreen"):console.log.bind(console,"",Le("TRACE")))},"setLogLevel"),Le=mt(e=>`%c${(0,_e.default)().format("ss.SSS")} : ${e} : `,"format")}),Nr=r(()=>{Ie={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:mt(e=>255<=e?255:e<0?0:e,"r"),g:mt(e=>255<=e?255:e<0?0:e,"g"),b:mt(e=>255<=e?255:e<0?0:e,"b"),h:mt(e=>e%360,"h"),s:mt(e=>100<=e?100:e<0?0:e,"s"),l:mt(e=>100<=e?100:e<0?0:e,"l"),a:mt(e=>1<=e?1:e<0?0:e,"a")},toLinear:mt(e=>{var t=e/255;return.03928(r<0&&(r+=1),1{if(!t)return 2.55*r;e/=360,t/=100;var n=(r/=100)<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return 255*Ie.hue2rgb(a,n,e+.3333333333333333);case"g":return 255*Ie.hue2rgb(a,n,e);case"b":return 255*Ie.hue2rgb(a,n,e-.3333333333333333)}},"hsl2rgb"),rgb2hsl:mt(({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;var n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if("l"===i)return 100*s;if(n===a)return 0;var o=n-a;if("s"===i)return 100*(.5{De={clamp:mt((e,t,r)=>rMath.round(1e10*e)/1e10,"round")},Me=De}),Mr=r(()=>{Oe={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},Pe=Oe}),Or=r(()=>{Nr(),Dr(),Mr(),Be={channel:Ne,lang:Me,unit:Pe}}),Pr=r(()=>{Or(),$e={};for(let e=0;e<=255;e++)$e[e]=Be.unit.dec2hex(e);Fe={ALL:0,RGB:1,HSL:2}}),Br=r(()=>{Pr(),ze=class{static{mt(this,"Type")}constructor(){this.type=Fe.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=Fe.ALL}is(e){return this.type===e}},qe=ze}),$r=r(()=>{Or(),Br(),Pr(),je=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new qe}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Fe.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:i}=e;void 0===t&&(e.h=Be.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=Be.channel.rgb2hsl(e,"s")),void 0===i&&(e.l=Be.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:i}=e;void 0===t&&(e.r=Be.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=Be.channel.hsl2rgb(e,"g")),void 0===i&&(e.b=Be.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(Fe.HSL)||void 0===t?(this._ensureHSL(),Be.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(Fe.HSL)||void 0===t?(this._ensureHSL(),Be.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(Fe.HSL)||void 0===t?(this._ensureHSL(),Be.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(Fe.RGB)||void 0===t?(this._ensureRGB(),Be.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(Fe.RGB)||void 0===t?(this._ensureRGB(),Be.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(Fe.RGB)||void 0===t?(this._ensureRGB(),Be.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Fe.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Fe.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Fe.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Fe.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Fe.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Fe.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},We=je}),Fr=r(()=>{$r(),Ue=new We({r:0,g:0,b:0,a:0},"transparent"),Ge=Ue}),zr=r(()=>{Fr(),Pr(),Ve={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:mt(e=>{if(35===e.charCodeAt(0)){var t,r,i,n,a,s=e.match(Ve.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,Ge.set({r:(t>>(i=(r=4>i*(2+n)&a)*r,b:(t>>i*(1+n)&a)*r,a:s?(t&a)*r/255:1},e)}},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:i}=e;return i<1?"#"+$e[Math.round(e)]+$e[Math.round(t)]+$e[Math.round(r)]+$e[Math.round(255*i)]:"#"+$e[Math.round(e)]+$e[Math.round(t)]+$e[Math.round(r)]},"stringify")},Ye=Ve}),qr=r(()=>{Or(),Fr(),He={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:mt(e=>{if(r=e.match(He.hueRe)){var[,t,r]=r;switch(r){case"grad":return Be.channel.clamp.h(.9*parseFloat(t));case"rad":return Be.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Be.channel.clamp.h(360*parseFloat(t))}}return Be.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:mt(e=>{var t,r,i,n,a=e.charCodeAt(0);if((104===a||72===a)&&(a=e.match(He.re)))return[,a,t,r,i,n]=a,Ge.set({h:He._hue2deg(a),s:Be.channel.clamp.s(parseFloat(t)),l:Be.channel.clamp.l(parseFloat(r)),a:i?Be.channel.clamp.a(n?parseFloat(i)/100:parseFloat(i)):1},e)},"parse"),stringify:mt(e=>{var{h:e,s:t,l:r,a:i}=e;return i<1?`hsla(${Be.lang.round(e)}, ${Be.lang.round(t)}%, ${Be.lang.round(r)}%, ${i})`:`hsl(${Be.lang.round(e)}, ${Be.lang.round(t)}%, ${Be.lang.round(r)}%)`},"stringify")},Xe=He}),jr=r(()=>{zr(),Ke={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:mt(e=>{if(e=e.toLowerCase(),e=Ke.colors[e])return Ye.parse(e)},"parse"),stringify:mt(e=>{var t,r=Ye.stringify(e);for(t in Ke.colors)if(Ke.colors[t]===r)return t},"stringify")},Ze=Ke}),Wr=r(()=>{Or(),Fr(),Qe={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:mt(e=>{var t,r,i,n,a,s,o,l=e.charCodeAt(0);if((114===l||82===l)&&(l=e.match(Qe.re)))return[,l,t,r,i,n,a,s,o]=l,Ge.set({r:Be.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:Be.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:Be.channel.clamp.b(a?2.55*parseFloat(n):parseFloat(n)),a:s?Be.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:i}=e;return i<1?`rgba(${Be.lang.round(e)}, ${Be.lang.round(t)}, ${Be.lang.round(r)}, ${Be.lang.round(i)})`:`rgb(${Be.lang.round(e)}, ${Be.lang.round(t)}, ${Be.lang.round(r)})`},"stringify")},Je=Qe}),Ur=r(()=>{zr(),qr(),jr(),Wr(),Pr(),et={format:{keyword:Ze,hex:Ye,rgb:Je,rgba:Je,hsl:Xe,hsla:Xe},parse:mt(e=>{if("string"!=typeof e)return e;var t=Ye.parse(e)||Je.parse(e)||Xe.parse(e)||Ze.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:mt(e=>!e.changed&&e.color?e.color:(e.type.is(Fe.HSL)||void 0===e.data.r?Xe:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Je:Ye).stringify(e),"stringify")},tt=et}),Gr=r(()=>{Or(),Ur(),rt=mt((e,t)=>{var r,i=tt.parse(e);for(r in t)i[r]=Be.channel.clamp[r](t[r]);return tt.stringify(i)},"change"),it=rt}),Vr=r(()=>{Or(),Fr(),Ur(),Gr(),nt=mt((e,t,r=0,i=1)=>"number"!=typeof e?it(e,{a:t}):(e=Ge.set({r:Be.channel.clamp.r(e),g:Be.channel.clamp.g(t),b:Be.channel.clamp.b(r),a:Be.channel.clamp.a(i)}),tt.stringify(e)),"rgba"),at=nt}),Yr=r(()=>{Or(),Ur(),st=mt((e,t)=>Be.lang.round(tt.parse(e)[t]),"channel"),ot=st}),Hr=r(()=>{Or(),Ur(),lt=mt(e=>{var{r:e,g:t,b:r}=tt.parse(e),e=.2126*Be.channel.toLinear(e)+.7152*Be.channel.toLinear(t)+.0722*Be.channel.toLinear(r);return Be.lang.round(e)},"luminance"),ct=lt}),Xr=r(()=>{Hr(),ht=mt(e=>.5<=ct(e),"isLight"),ut=ht}),Kr=r(()=>{Xr(),dt=mt(e=>!ut(e),"isDark"),pt=dt}),Zr=r(()=>{Or(),Ur(),gt=mt((e,t,r)=>{var i=(e=tt.parse(e))[t];return i!==(r=Be.channel.clamp[t](i+r))&&(e[t]=r),tt.stringify(e)},"adjustChannel"),ft=gt}),Qr=r(()=>{Zr(),bt=mt((e,t)=>ft(e,"l",t),"lighten"),R=bt}),Jr=r(()=>{Zr(),xt=mt((e,t)=>ft(e,"l",-t),"darken"),L=xt}),ei=r(()=>{Zr(),Tt=mt((e,t)=>ft(e,"a",-t),"transparentize"),kt=Tt}),ti=r(()=>{Ur(),Gr(),wt=mt((e,t)=>{var r,i=tt.parse(e),n={};for(r in t)t[r]&&(n[r]=i[r]+t[r]);return it(e,n)},"adjust"),n=wt}),ri=r(()=>{Ur(),Vr(),Ct=mt((e,t,r=50)=>{var{r:e,g:i,b:n,a}=tt.parse(e),{r:t,g:s,b:o,a:l}=tt.parse(t),c=2*(r/=100)-1,h=a-l;return at(e*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+t*(h=1-c),i*c+s*h,n*c+o*h,a*r+l*(1-r))},"mix"),St=Ct}),ii=r(()=>{Ur(),ri(),Et=mt((e,t=100)=>{var r=tt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,St(r,e,t)},"invert"),a=Et}),ni=r(()=>{Vr(),Yr(),Kr(),Qr(),Jr(),ei(),ti(),ii()}),ai=r(()=>{ni()}),si=r(()=>{_t="#ffffff",At="#f2f2f2"}),oi=r(()=>{ai(),Rt=mt((e,t)=>n(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),li=r(()=>{ai(),si(),oi(),Lt=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?L(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||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||L(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||L(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},It=mt(e=>{var t=new Lt;return t.calculate(e),t},"getThemeVariables")}),ci=r(()=>{ai(),oi(),Nt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(a("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=at(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=L("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=L(this.sectionBkgColor,10),this.taskBorderColor=at(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=at(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||L(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=R(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=R(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=R(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=a(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=n(this.primaryColor,{h:64}),this.fillType3=n(this.secondaryColor,{h:64}),this.fillType4=n(this.primaryColor,{h:-64}),this.fillType5=n(this.secondaryColor,{h:-64}),this.fillType6=n(this.primaryColor,{h:128}),this.fillType7=n(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330});for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Dt=mt(e=>{var t=new Nt;return t.calculate(e),t},"getThemeVariables")}),hi=r(()=>{ai(),oi(),si(),Mt=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=n(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=at(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||L(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||L(this.tertiaryColor,40);for(let e=0;e{"calculated"===this[e]&&(this[e]=void 0)}),"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ot=mt(e=>{var t=new Mt;return t.calculate(e),t},"getThemeVariables")}),ui=r(()=>{ai(),si(),oi(),Pt=class{static{mt(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=R("#cde498",10),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.primaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=L(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||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||L(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||L(this.tertiaryColor,40);for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Bt=mt(e=>{var t=new Pt;return t.calculate(e),t},"getThemeVariables")}),di=r(()=>{ai(),oi(),si(),$t=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ft=mt(e=>{var t=new $t;return t.calculate(e),t},"getThemeVariables")}),pi=r(()=>{ai(),oi(),si(),zt=class{static{mt(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?L(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||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);var e="#ECECFE",t="#E9E9F1",r=n(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||R(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||n(e,{h:30}),this.cScale4=this.cScale4||n(e,{h:60}),this.cScale5=this.cScale5||n(e,{h:90}),this.cScale6=this.cScale6||n(e,{h:120}),this.cScale7=this.cScale7||n(e,{h:150}),this.cScale8=this.cScale8||n(e,{h:210,l:150}),this.cScale9=this.cScale9||n(e,{h:270}),this.cScale10=this.cScale10||n(e,{h:300}),this.cScale11=this.cScale11||n(e,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},qt=mt(e=>{var t=new zt;return t.calculate(e),t},"getThemeVariables")}),gi=r(()=>{ai(),oi(),si(),jt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(a("#323D47"),10),this.border1="#ccc",this.border2=at(255,255,255,.25),this.arrowheadColor=a(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?L(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||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Wt=mt(e=>{var t=new jt;return t.calculate(e),t},"getThemeVariables")}),fi=r(()=>{ai(),oi(),si(),Ut=class{static{mt(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Rt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?L(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);var e="#ECECFE",t="#E9E9F1",r=n(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||R(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Gt=mt(e=>{var t=new Ut;return t.calculate(e),t},"getThemeVariables")}),mi=r(()=>{ai(),oi(),si(),Vt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(a("#323D47"),10),this.border1="#ccc",this.border2=at(255,255,255,.25),this.arrowheadColor=a(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?L(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||n(this.primaryColor,{h:30}),this.cScale4=this.cScale4||n(this.primaryColor,{h:60}),this.cScale5=this.cScale5||n(this.primaryColor,{h:90}),this.cScale6=this.cScale6||n(this.primaryColor,{h:120}),this.cScale7=this.cScale7||n(this.primaryColor,{h:150}),this.cScale8=this.cScale8||n(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||n(this.primaryColor,{h:270}),this.cScale10=this.cScale10||n(this.primaryColor,{h:300}),this.cScale11=this.cScale11||n(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Yt=mt(e=>{var t=new Vt;return t.calculate(e),t},"getThemeVariables")}),yi=r(()=>{ai(),oi(),si(),Ht=class{static{mt(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Rt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?L(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||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);var e="#ECECFE",t="#E9E9F1",r=n(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||R(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Xt=mt(e=>{var t=new Ht;return t.calculate(e),t},"getThemeVariables")}),vi=r(()=>{ai(),oi(),si(),Kt=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=n(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(a("#323D47"),10),this.border1="#ccc",this.border2=at(255,255,255,.25),this.arrowheadColor=a(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||n(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||n(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?L(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||L(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Zt=mt(e=>{var t=new Kt;return t.calculate(e),t},"getThemeVariables")}),bi=r(()=>{li(),ci(),hi(),ui(),di(),pi(),gi(),fi(),mi(),yi(),vi(),Qt={base:{getThemeVariables:It},dark:{getThemeVariables:Dt},default:{getThemeVariables:Ot},forest:{getThemeVariables:Bt},neutral:{getThemeVariables:Ft},neo:{getThemeVariables:qt},"neo-dark":{getThemeVariables:Wt},redux:{getThemeVariables:Gt},"redux-dark":{getThemeVariables:Yt},"redux-color":{getThemeVariables:Xt},"redux-dark-color":{getThemeVariables:Zt}}}),xi=r(()=>{Jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}}),Ti=r(()=>{bi(),xi(),er={...Jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Qt.default.getThemeVariables(),sequence:{...Jt.sequence,messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mt(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mt(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Jt.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Jt.flowchart,inheritDir:!1},external_personFont:mt(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:mt(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:mt(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:mt(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:mt(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:mt(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:mt(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:mt(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:mt(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:mt(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:mt(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:mt(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:mt(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:mt(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:mt(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:mt(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:mt(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:mt(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:mt(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:mt(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Jt.pie,useWidth:984},xyChart:{...Jt.xyChart,useWidth:void 0},requirement:{...Jt.requirement,useWidth:void 0},packet:{...Jt.packet},eventmodeling:{...Jt.eventmodeling},treeView:{...Jt.treeView,useWidth:void 0},radar:{...Jt.radar},ishikawa:{...Jt.ishikawa},sankey:{...Jt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Jt.venn}},tr=mt((r,i="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,i+t,...tr(r[t],"")]:[...e,i+t],[]),"keyify"),rr=new Set(tr(er,"")),ir=er}),ki=r(()=>{Ti(),e(),nr=mt(e=>{if(P.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>nr(e));else{for(var t of Object.keys(e)){var r;if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!rr.has(t)||null==e[t])P.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])if("nodeColors"===t){var i,n=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(i of Object.keys(e[t]))"string"==typeof e[t][i]&&n.test(e[t][i])||(P.debug("sanitize deleting invalid color:",i,e[t][i]),delete e[t][i])}else P.debug("sanitizing object",t),nr(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(P.debug("sanitizing css option",t),e[t]=ar(e[t]))}if(e.themeVariables)for(var a of Object.keys(e.themeVariables)){var s=e.themeVariables[a];s?.match&&!s.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[a]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),ar=mt(e=>{let t=0,r=0;for(var i of e){if(t{Lr(),e(),bi(),Ti(),ki(),sr=Object.freeze(ir),or=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),lr=Ee({},sr),hr=[],ur=Ee({},sr),dr=mt((e,t)=>{let r=Ee({},e),i={};for(var n of t)br(n),i=Ee(i,n);return r=Ee(r,i),i.theme&&i.theme in Qt&&(e=Ee({},cr),t=Ee(e.themeVariables||{},i.themeVariables),r.theme)&&r.theme in Qt&&(r.themeVariables=Qt[r.theme].getThemeVariables(t)),Sr(ur=r),ur},"updateCurrentConfig"),pr=mt(e=>(lr=Ee({},sr),lr=Ee(lr,e),e.theme&&Qt[e.theme]&&(lr.themeVariables=Qt[e.theme].getThemeVariables(e.themeVariables)),dr(lr,hr),lr),"setSiteConfig"),gr=mt(e=>{cr=Ee({},e)},"saveConfigFromInitialize"),fr=mt(e=>(lr=Ee(lr,e),dr(lr,hr),lr),"updateSiteConfig"),mr=mt(()=>Ee({},lr),"getSiteConfig"),yr=mt(e=>(Sr(e),Ee(ur,e),vr()),"setConfig"),vr=mt(()=>Ee({},ur),"getConfig"),br=mt(t=>{t&&(["secure",...lr.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(P.debug("Denied attempt to modify a secure key "+e,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&br(t[e])}))},"sanitize"),xr=mt(e=>{nr(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),hr.push(e),dr(lr,hr)},"addDirective"),Tr=mt((e=lr)=>{dr(e,hr=[])},"reset"),kr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},wr={},Cr=mt(e=>{wr[e]||(P.warn(kr[e]),wr[e]=!0)},"issueWarning"),Sr=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Cr("LAZY_LOAD_DEPRECATED")},"checkConfig"),Er=mt(()=>{let e={};cr&&(e=Ee(e,cr));for(var t of hr)e=Ee(e,t);return e},"getUserDefinedConfig"),_r=mt(e=>(null!=e.flowchart?.htmlLabels&&Cr("FLOWCHART_HTML_LABELS_DEPRECATED"),or(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function Ci(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1Li(e),"DOMPurify");if(d.version="3.4.0",d.removed=[],!e||!e.document||e.document.nodeType!==wn.document||!e.Element)return d.isSupported=!1,d;let n=e.document,P=n,B=P.currentScript,{DocumentFragment:$,HTMLTemplateElement:F,Node:z,Element:q,NodeFilter:t,NamedNodeMap:j=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:W,DOMParser:U,trustedTypes:p}=e,r=q.prototype,G=Ri(r,"cloneNode"),V=Ri(r,"remove"),Y=Ri(r,"nextSibling"),H=Ri(r,"childNodes"),s=Ri(r,"parentNode");var X;"function"==typeof F&&(X=n.createElement("template")).content&&X.content.ownerDocument&&(n=X.content.ownerDocument);let g,c="",{implementation:K,createNodeIterator:Z,createDocumentFragment:Q,getElementsByTagName:J}=n,ee=P.importNode,f=En(),{MUSTACHE_EXPR:m,ERB_EXPR:y,TMPLIT_EXPR:v,DATA_ATTR:te,ARIA_ATTR:re,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:ae}=(d.isSupported="function"==typeof Ii&&"function"==typeof s&&K&&void 0!==K.createHTMLDocument,kn),se=kn.IS_ALLOWED_URI,h=null,oe=Ei({},[...en,...tn,...rn,...an,...on]),b=null,le=Ei({},[...ln,...cn,...hn,...un]),o=Object.seal(Bi(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}})),u=null,i=null,l=Object.seal(Bi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ce=!0,he=!0,ue=!1,de=!0,x=!1,T=!0,k=!1,pe=!1,ge=!1,w=!1,C=!1,S=!1,fe=!0,me=!1,ye=!0,E=!1,a,_=null,ve=Ei({},["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"]),be=null,xe=Ei({},["audio","video","img","source","image","track"]),Te=null,ke=Ei({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),we="http://www.w3.org/1998/Math/MathML",Ce="http://www.w3.org/2000/svg",A="http://www.w3.org/1999/xhtml",R=A,Se=!1,Ee=null,_e=Ei({},[we,Ce,A],Vi),Ae=Ei({},["mi","mo","mn","ms","mtext"]),Re=Ei({},["annotation-xml"]),Le=Ei({},["title","style","font","a","script"]),L=null,Ie=["application/xhtml+xml","text/html"],I=null,N=null,Ne=n.createElement("form"),De=mt(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),Me=mt(function(){var e=0"+e:(i=Yi(e,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===L&&R===A&&(e=''+e+"");var i=g?g.createHTML(e):e;if(R===A)try{t=(new U).parseFromString(i,L)}catch{}if(!t||!t.documentElement){t=K.createDocument(R,"template",null);try{t.documentElement.innerHTML=Se?c:i}catch{}}return i=t.body||t.documentElement,e&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),R===A?J.call(t,k?"html":"body")[0]:k?t.documentElement:i},"_initDocument"),Fe=mt(function(e){return Z.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),ze=mt(function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof j)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),qe=mt(function(e){return"function"==typeof z&&e instanceof z},"_isNode");function O(e,t,r){zi(e,e=>{e.call(d,t,r,N)})}mt(O,"_executeHooks");let je=mt(function(t){let r=null;if(O(f.beforeSanitizeElements,t,null),!ze(t)){var e=I(t.nodeName);if(O(f.uponSanitizeElement,t,{tagName:e,allowedTags:h}),!(T&&t.hasChildNodes()&&!qe(t.firstElementChild)&&Qi(/<[/\w!]/g,t.innerHTML)&&Qi(/<[/\w!]/g,t.textContent)||T&&t.namespaceURI===A&&"style"===e&&qe(t.firstElementChild)||t.nodeType===wn.progressingInstruction||T&&t.nodeType===wn.comment&&Qi(/<[/\w]/g,t.data))){if(!u[e]&&(l.tagCheck instanceof Function&&l.tagCheck(e)||h[e]))return t instanceof q&&!Be(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&Qi(/<\/no(script|embed|frames)/i,t.innerHTML)?(D(t),!0):(x&&t.nodeType===wn.text&&(r=t.textContent,zi([m,y,v],e=>{r=Hi(r,e," ")}),t.textContent!==r)&&(Wi(d.removed,{element:t.cloneNode()}),t.textContent=r),O(f.afterSanitizeElements,t,null),!1);if(!u[e]&&Ue(e)&&(o.tagNameCheck instanceof RegExp&&Qi(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(ye&&!_[e]){var i=s(t)||t.parentNode,n=H(t)||t.childNodes;if(n&&i)for(let e=n.length-1;0<=e;--e){var a=G(n[e],!0);a.__removalCount=(t.__removalCount||0)+1,i.insertBefore(a,Y(t))}}}}return D(t),!0},"_sanitizeElements"),We=mt(function(e,t,r){if(i[t]||fe&&("id"===t||"name"===t)&&(r in n||r in Ne))return!1;if((!he||i[t]||!Qi(te,t))&&!(ce&&Qi(re,t)||l.attributeCheck instanceof Function&&l.attributeCheck(t,e)))if(!b[t]||i[t]){if(!(Ue(e)&&(o.tagNameCheck instanceof RegExp&&Qi(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&Qi(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t,e))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&Qi(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Te[t]&&!Qi(se,Hi(r,ne,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Xi(r,"data:")||!be[e])&&(!ue||Qi(ie,Hi(r,ne,"")))&&r)return!1;return!0},"_isValidAttribute"),Ue=mt(function(e){return"annotation-xml"!==e&&Yi(e,ae)},"_isBasicCustomElement"),Ge=mt(function(c){O(f.beforeSanitizeAttributes,c,null);var h=c.attributes;if(h&&!ze(c)){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:b,forceKeepAttr:void 0},l=h.length;for(;l--;){let e=h[l],{name:t,namespaceURI:r,value:i}=e,n=I(t),a=i,s="value"===t?a:Ki(a);if(o.attrName=n,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,O(f.uponSanitizeAttribute,c,o),s=o.attrValue,!me||"id"!==n&&"name"!==n||(M(t,c),s="user-content-"+s),T&&Qi(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,s))M(t,c);else if("attributename"===n&&Yi(s,"href"))M(t,c);else if(!o.forceKeepAttr)if(o.keepAttr)if(!de&&Qi(/\/>/i,s))M(t,c);else{x&&zi([m,y,v],e=>{s=Hi(s,e," ")});var u=I(c.nodeName);if(We(u,n,s)){if(g&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!r)switch(p.getAttributeType(u,n)){case"TrustedHTML":s=g.createHTML(s);break;case"TrustedScriptURL":s=g.createScriptURL(s)}if(s!==a)try{r?c.setAttributeNS(r,t,s):c.setAttribute(t,s),ze(c)?D(c):ji(d.removed)}catch{M(t,c)}}else M(t,c)}else M(t,c)}O(f.afterSanitizeAttributes,c,null)}},"_sanitizeAttributes"),Ve=mt(function(e){var t,r=Fe(e);for(O(f.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)O(f.uponSanitizeShadowNode,t,null),je(t),Ge(t),t.content instanceof $&&Ve(t.content);O(f.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM");return d.sanitize=function(e){let t=1{t=Hi(t,e," ")}),r.innerHTML=t}if(C)for(a=Q.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return a=b.shadowroot||b.shadowrootmode?ee.call(P,a,!0):a}let l=k?r.outerHTML:r.innerHTML;return k&&h["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Qi(xn,r.ownerDocument.doctype.name)&&(l=" `+l),x&&zi([m,y,v],e=>{l=Hi(l,e," ")}),g&&S?g.createHTML(l):l},d.setConfig=function(){var e=0{({entries:Ii,setPrototypeOf:Ni,isFrozen:Di,getPrototypeOf:Mi,getOwnPropertyDescriptor:Oi}=Object),{freeze:Pi,seal:Tn,create:Bi}=Object,{apply:$i,construct:Fi}=typeof Reflect<"u"&&Reflect,Pi=Pi||mt(function(e){return e},"freeze"),Tn=Tn||mt(function(e){return e},"seal"),$i=$i||mt(function(e,t){for(var r=arguments.length,i=new Array(2/gm),gn=Tn(/\$\{[\w\W]*/gm),fn=Tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),mn=Tn(/^aria-[\-\w]+$/),yn=Tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vn=Tn(/^(?:\w+script|data):/i),bn=Tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xn=Tn(/^html$/i),Tn=Tn(/^[a-z][.\w]*(-[.\w]+)+$/i),kn=Object.freeze({__proto__:null,ARIA_ATTR:mn,ATTR_WHITESPACE:bn,CUSTOM_ELEMENT:Tn,DATA_ATTR:fn,DOCTYPE_NAME:xn,ERB_EXPR:pn,IS_ALLOWED_URI:yn,IS_SCRIPT_OR_DATA:vn,MUSTACHE_EXPR:dn,TMPLIT_EXPR:gn}),wn={element:1,text:3,progressingInstruction:7,comment:8,document:9},Cn=mt(function(){return"u"ca[e])}function In(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Nn(e){for(var t=0;t=n[0]&&e<=n[1])return r.name}return null}function Dn(e){for(var t=0;t but got "+String(e)+".")}function t(e,t,r,i,n,a){us[e][n]={font:t,group:r,replace:i},a&&i&&(us[e][i]=us[e][n])}function o(e){for(var{type:e,names:t,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=e,s={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},o=0;oAV".indexOf(c)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p{for(var r in t)_(e,r,{get:t[r],enumerable:!0})})(Rn,{ParseError:()=>X,SETTINGS_SCHEMA:()=>ga,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>t,__domTree:()=>xc,__parse:()=>fc,__renderToDomTree:()=>yc,__renderToHTMLTree:()=>vc,__setFontMetrics:()=>Mn,default:()=>Tc,render:()=>pc,renderToString:()=>gc,version:()=>bc});var sa,oa,X,la,ca,ha,ua,da,pa,ga,fa,ma,ya,va,ba,xa,Ta,ka,wa,Ca,Sa,Ea,_a,Aa,Ra,La,Ia,Na,Da,Ma,Oa,Pa,Ba,$a,Fa,za,qa,ja,Wa,Ua,Ga,Va,Ya,Ha,Xa,K,Ka,Za,Qa,Ja,es,ts,rs,is,ns,as,ss,os,ls,cs,hs,us,h,u,d,ds,p,ps,gs,fs,ms,ys,vs,bs,xs,Ts,ks,ws,Cs,Ss,Es,_s,As,Rs,Ls,Is,Ns,Ds,Ms,Os,Ps,Bs,$s,Fs,zs,qs,js,Ws,Us,Gs,Z,Vs,Ys,Hs,Xs,Ks,Zs,Qs,Js,eo,to,ro,io,no,ao,so,oo,lo,co,ho,uo,po,C,go,fo,mo,yo,vo,bo,xo,To,ko,wo,Co,So,Eo,_o,Ao,Ro,Lo,Io,No,Do,Mo,Oo,Po,Bo,$o,Fo,zo,qo,jo,Wo,Uo,Go,Vo,Yo,Ho,Xo,Ko,Zo,Qo,Jo,el,tl,rl,il,nl,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,g,vl,bl,xl,Tl,kl,wl,Cl,f,Sl,El,_l,Al,Rl,Ll,Il,Nl,Dl,Ml,Ol,Pl,Bl,$l,Fl,zl,ql,jl,Wl,Ul,Gl,Vl,Yl,Hl,m,Xl,Kl,Zl,Ql,Jl,ec,tc,rc,ic,nc,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,bc,xc,Tc,kc=r(()=>{for(sa=class r{static{mt(this,"SourceLocation")}constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new r(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}},oa=class i{static{mt(this,"Token")}constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,sa.range(this,e))}},(X=class s{static{mt(this,"ParseError")}constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,i,n,a="KaTeX parse error: "+e;return(t=t&&t.loc)&&t.start<=t.end&&(r=t.lexer.input,i=t.start,n=t.end,i===r.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ",t=r.slice(i,n).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},ha=/[&><"']/g,mt(Ln,"escape"),ua=mt(function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},"getBaseElem"),nc=mt(function(e){return"mathord"===(e=ua(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),da=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),g=mt(function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"},"protocolFromUrl"),pa={deflt:Ll,escape:Ln,hyphenate:f,getBaseElem:ua,isCharacterBox:nc,protocolFromUrl:g},ga={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:mt(e=>"#"+e,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:mt((e,t)=>(t.push(e),t),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:mt(e=>Math.max(0,e),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:mt(e=>Math.max(0,e),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:mt(e=>Math.max(0,e),"processor"),cli:"-e, --max-expand ",cliProcessor:mt(e=>"Infinity"===e?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},mt(In,"getDefaultValue"),fa=class{static{mt(this,"Settings")}constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},ga){var r;ga.hasOwnProperty(t)&&(r=ga[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:In(r))}}reportNonstrict(e,t,r){var i=this.strict;if((i="function"==typeof i?i(e,t,r):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var i=this.strict;if("function"==typeof i)try{i=i(e,t,r)}catch{i="error"}return!(!i||"ignore"===i||!0!==i&&"error"!==i&&("warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=pa.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},Ll=class{static{mt(this,"Style")}constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return ma[ya[this.id]]}sub(){return ma[va[this.id]]}fracNum(){return ma[ba[this.id]]}fracDen(){return ma[xa[this.id]]}cramp(){return ma[Ta[this.id]]}text(){return ma[ka[this.id]]}isTight(){return 2<=this.size}},ma=[new Ll(0,0,!1),new Ll(1,0,!0),new Ll(2,1,!1),new Ll(3,1,!0),new Ll(4,2,!1),new Ll(5,2,!0),new Ll(6,3,!1),new Ll(7,3,!0)],ya=[4,5,4,5,6,7,6,7],va=[5,5,5,5,7,7,7,7],ba=[2,3,4,5,6,7,6,7],xa=[3,3,5,5,7,7,7,7],Ta=[1,1,3,3,5,5,7,7],ka=[0,1,2,3,2,3,2,3],wa={DISPLAY:ma[0],TEXT:ma[2],SCRIPT:ma[4],SCRIPTSCRIPT:ma[6]},Ca=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],mt(Nn,"scriptFromCodepoint"),Sa=[],Ca.forEach(e=>e.blocks.forEach(e=>Sa.push(...e))),mt(Dn,"supportedCodepoint"),Ea=mt(function(e,t){return"M95,"+(622+e+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 c69,-144,104.5,-217.7,106.5,-221 l`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),_a=mt(function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`H1012.3 s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),Aa=mt(function(e,t){return"M983 "+(10+e+t)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),Ra=mt(function(e,t){return"M424,"+(2398+e+t)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),La=mt(function(e,t){return"M473,"+(2713+e+t)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),Ia=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Na=mt(function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+` H742v`+(r-54-t-e)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},"sqrtTall"),Da=mt(function(e,t,r){t*=1e3;var i="";switch(e){case"sqrtMain":i=Ea(t,80);break;case"sqrtSize1":i=_a(t,80);break;case"sqrtSize2":i=Aa(t,80);break;case"sqrtSize3":i=Ra(t,80);break;case"sqrtSize4":i=La(t,80);break;case"sqrtTall":i=Na(t,80,r)}return i},"sqrtPath"),Ma=mt(function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},"innerPath"),Oa={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 435 0h399565z`,leftgroupunder:`M400000 262 H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Pa=mt(function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, -36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),Ba=class{static{mt(this,"DocumentFragment")}constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText(),"toText");return this.children.map(e).join("")}},$a={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Fa={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},za={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},mt(Mn,"setFontMetrics"),mt(On,"getCharacterMetrics"),qa={},mt(Pn,"getGlobalMetrics"),ja=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Wa=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ua=mt(function(e,t){return t.size<2?e:ja[e-1][t.size-1]},"sizeAtStyle"),(Ga=class n{static{mt(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||n.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Wa[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return new n(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ua(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Wa[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ua(n.BASESIZE,e);return this.size===t&&this.textSize===n.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==n.BASESIZE?["sizing","reset-size"+this.size,"size"+n.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Pn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Va={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Ya={ex:!0,em:!0,mu:!0},Ha=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Va||e in Ya||"ex"===e},"validUnit"),Xa=mt(function(e,t){var r;if(e.unit in Va)r=Va[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var i=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new X("Invalid unit: '"+e.unit+"'");r=i.fontMetrics().quad}i!==t&&(r*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),K=mt(function(e){return+e.toFixed(4)+"em"},"makeEm"),Ka=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),Za=mt(function(e,t,r){this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t&&(t.style.isTight()&&this.classes.push("mtight"),e=t.getColor())&&(this.style.color=e)},"initNode"),Qa=mt(function(e){var t,r,i=document.createElement(e);for(t in i.className=Ka(this.classes),this.style)this.style.hasOwnProperty(t)&&(i.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&i.setAttribute(r,this.attributes[r]);for(var n=0;n/=\x00-\x1f]/,es=mt(function(e){var t,r,i="<"+e,n=(this.classes.length&&(i+=' class="'+pa.escape(Ka(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(n+=pa.hyphenate(t)+":"+this.style[t]+";");for(r in n&&(i+=' style="'+pa.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(Ja.test(r))throw new X("Invalid attribute name '"+r+"'");i+=" "+r+'="'+pa.escape(this.attributes[r])+'"'}i+=">";for(var a=0;a"},"toMarkup"),ts=class{static{mt(this,"Span")}constructor(e,t,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Za.call(this,e,r,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Qa.call(this,"span")}toMarkup(){return es.call(this,"span")}},rs=class{static{mt(this,"Anchor")}constructor(e,t,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Za.call(this,t,i),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Qa.call(this,"a")}toMarkup(){return es.call(this,"a")}},is=class{static{mt(this,"Img")}constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e,t=document.createElement("img");for(e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var e,t=''+pa.escape(this.alt)+'"}},ns={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},as=class{static{mt(this,"SymbolNode")}constructor(e,t,r,i,n,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=i||0,this.skew=n||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(e=Nn(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ns[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e,t=document.createTextNode(this.text),r=null;for(e in 0":n}},ss=class{static{mt(this,"SvgNode")}constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r"}},os=class{static{mt(this,"PathNode")}constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",Oa[this.pathName]),e}toMarkup(){return this.alternate?'':''}},ls=class{static{mt(this,"LineNode")}constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var e,t=""}},mt(Bn,"assertSymbolDomNode"),mt($n,"assertSpan"),cs={bin:1,close:1,inner:1,open:1,punct:1,rel:1},hs={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},us={math:{},text:{}},mt(t,"defineSymbol"),u="text",f="ams",nc="accent-token",g="bin",Ll="close",Pl="inner",ds="mathord",ic="op-token",Tl="open",Ml="punct",xl="spacing",p="textord",t(h="math",d="main",m="rel","≡","\\equiv",!0),t(h,d,m,"≺","\\prec",!0),t(h,d,m,"≻","\\succ",!0),t(h,d,m,"∼","\\sim",!0),t(h,d,m,"⊥","\\perp"),t(h,d,m,"⪯","\\preceq",!0),t(h,d,m,"⪰","\\succeq",!0),t(h,d,m,"≃","\\simeq",!0),t(h,d,m,"∣","\\mid",!0),t(h,d,m,"≪","\\ll",!0),t(h,d,m,"≫","\\gg",!0),t(h,d,m,"≍","\\asymp",!0),t(h,d,m,"∥","\\parallel"),t(h,d,m,"⋈","\\bowtie",!0),t(h,d,m,"⌣","\\smile",!0),t(h,d,m,"⊑","\\sqsubseteq",!0),t(h,d,m,"⊒","\\sqsupseteq",!0),t(h,d,m,"≐","\\doteq",!0),t(h,d,m,"⌢","\\frown",!0),t(h,d,m,"∋","\\ni",!0),t(h,d,m,"∝","\\propto",!0),t(h,d,m,"⊢","\\vdash",!0),t(h,d,m,"⊣","\\dashv",!0),t(h,d,m,"∋","\\owns"),t(h,d,Ml,".","\\ldotp"),t(h,d,Ml,"⋅","\\cdotp"),t(h,d,p,"#","\\#"),t(u,d,p,"#","\\#"),t(h,d,p,"&","\\&"),t(u,d,p,"&","\\&"),t(h,d,p,"ℵ","\\aleph",!0),t(h,d,p,"∀","\\forall",!0),t(h,d,p,"ℏ","\\hbar",!0),t(h,d,p,"∃","\\exists",!0),t(h,d,p,"∇","\\nabla",!0),t(h,d,p,"♭","\\flat",!0),t(h,d,p,"ℓ","\\ell",!0),t(h,d,p,"♮","\\natural",!0),t(h,d,p,"♣","\\clubsuit",!0),t(h,d,p,"℘","\\wp",!0),t(h,d,p,"♯","\\sharp",!0),t(h,d,p,"♢","\\diamondsuit",!0),t(h,d,p,"ℜ","\\Re",!0),t(h,d,p,"♡","\\heartsuit",!0),t(h,d,p,"ℑ","\\Im",!0),t(h,d,p,"♠","\\spadesuit",!0),t(h,d,p,"§","\\S",!0),t(u,d,p,"§","\\S"),t(h,d,p,"¶","\\P",!0),t(u,d,p,"¶","\\P"),t(h,d,p,"†","\\dag"),t(u,d,p,"†","\\dag"),t(u,d,p,"†","\\textdagger"),t(h,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\textdaggerdbl"),t(h,d,Ll,"⎱","\\rmoustache",!0),t(h,d,Tl,"⎰","\\lmoustache",!0),t(h,d,Ll,"⟯","\\rgroup",!0),t(h,d,Tl,"⟮","\\lgroup",!0),t(h,d,g,"∓","\\mp",!0),t(h,d,g,"⊖","\\ominus",!0),t(h,d,g,"⊎","\\uplus",!0),t(h,d,g,"⊓","\\sqcap",!0),t(h,d,g,"∗","\\ast"),t(h,d,g,"⊔","\\sqcup",!0),t(h,d,g,"◯","\\bigcirc",!0),t(h,d,g,"∙","\\bullet",!0),t(h,d,g,"‡","\\ddagger"),t(h,d,g,"≀","\\wr",!0),t(h,d,g,"⨿","\\amalg"),t(h,d,g,"&","\\And"),t(h,d,m,"⟵","\\longleftarrow",!0),t(h,d,m,"⇐","\\Leftarrow",!0),t(h,d,m,"⟸","\\Longleftarrow",!0),t(h,d,m,"⟶","\\longrightarrow",!0),t(h,d,m,"⇒","\\Rightarrow",!0),t(h,d,m,"⟹","\\Longrightarrow",!0),t(h,d,m,"↔","\\leftrightarrow",!0),t(h,d,m,"⟷","\\longleftrightarrow",!0),t(h,d,m,"⇔","\\Leftrightarrow",!0),t(h,d,m,"⟺","\\Longleftrightarrow",!0),t(h,d,m,"↦","\\mapsto",!0),t(h,d,m,"⟼","\\longmapsto",!0),t(h,d,m,"↗","\\nearrow",!0),t(h,d,m,"↩","\\hookleftarrow",!0),t(h,d,m,"↪","\\hookrightarrow",!0),t(h,d,m,"↘","\\searrow",!0),t(h,d,m,"↼","\\leftharpoonup",!0),t(h,d,m,"⇀","\\rightharpoonup",!0),t(h,d,m,"↙","\\swarrow",!0),t(h,d,m,"↽","\\leftharpoondown",!0),t(h,d,m,"⇁","\\rightharpoondown",!0),t(h,d,m,"↖","\\nwarrow",!0),t(h,d,m,"⇌","\\rightleftharpoons",!0),t(h,f,m,"≮","\\nless",!0),t(h,f,m,"","\\@nleqslant"),t(h,f,m,"","\\@nleqq"),t(h,f,m,"⪇","\\lneq",!0),t(h,f,m,"≨","\\lneqq",!0),t(h,f,m,"","\\@lvertneqq"),t(h,f,m,"⋦","\\lnsim",!0),t(h,f,m,"⪉","\\lnapprox",!0),t(h,f,m,"⊀","\\nprec",!0),t(h,f,m,"⋠","\\npreceq",!0),t(h,f,m,"⋨","\\precnsim",!0),t(h,f,m,"⪹","\\precnapprox",!0),t(h,f,m,"≁","\\nsim",!0),t(h,f,m,"","\\@nshortmid"),t(h,f,m,"∤","\\nmid",!0),t(h,f,m,"⊬","\\nvdash",!0),t(h,f,m,"⊭","\\nvDash",!0),t(h,f,m,"⋪","\\ntriangleleft"),t(h,f,m,"⋬","\\ntrianglelefteq",!0),t(h,f,m,"⊊","\\subsetneq",!0),t(h,f,m,"","\\@varsubsetneq"),t(h,f,m,"⫋","\\subsetneqq",!0),t(h,f,m,"","\\@varsubsetneqq"),t(h,f,m,"≯","\\ngtr",!0),t(h,f,m,"","\\@ngeqslant"),t(h,f,m,"","\\@ngeqq"),t(h,f,m,"⪈","\\gneq",!0),t(h,f,m,"≩","\\gneqq",!0),t(h,f,m,"","\\@gvertneqq"),t(h,f,m,"⋧","\\gnsim",!0),t(h,f,m,"⪊","\\gnapprox",!0),t(h,f,m,"⊁","\\nsucc",!0),t(h,f,m,"⋡","\\nsucceq",!0),t(h,f,m,"⋩","\\succnsim",!0),t(h,f,m,"⪺","\\succnapprox",!0),t(h,f,m,"≆","\\ncong",!0),t(h,f,m,"","\\@nshortparallel"),t(h,f,m,"∦","\\nparallel",!0),t(h,f,m,"⊯","\\nVDash",!0),t(h,f,m,"⋫","\\ntriangleright"),t(h,f,m,"⋭","\\ntrianglerighteq",!0),t(h,f,m,"","\\@nsupseteqq"),t(h,f,m,"⊋","\\supsetneq",!0),t(h,f,m,"","\\@varsupsetneq"),t(h,f,m,"⫌","\\supsetneqq",!0),t(h,f,m,"","\\@varsupsetneqq"),t(h,f,m,"⊮","\\nVdash",!0),t(h,f,m,"⪵","\\precneqq",!0),t(h,f,m,"⪶","\\succneqq",!0),t(h,f,m,"","\\@nsubseteqq"),t(h,f,g,"⊴","\\unlhd"),t(h,f,g,"⊵","\\unrhd"),t(h,f,m,"↚","\\nleftarrow",!0),t(h,f,m,"↛","\\nrightarrow",!0),t(h,f,m,"⇍","\\nLeftarrow",!0),t(h,f,m,"⇏","\\nRightarrow",!0),t(h,f,m,"↮","\\nleftrightarrow",!0),t(h,f,m,"⇎","\\nLeftrightarrow",!0),t(h,f,m,"△","\\vartriangle"),t(h,f,p,"ℏ","\\hslash"),t(h,f,p,"▽","\\triangledown"),t(h,f,p,"◊","\\lozenge"),t(h,f,p,"Ⓢ","\\circledS"),t(h,f,p,"®","\\circledR"),t(u,f,p,"®","\\circledR"),t(h,f,p,"∡","\\measuredangle",!0),t(h,f,p,"∄","\\nexists"),t(h,f,p,"℧","\\mho"),t(h,f,p,"Ⅎ","\\Finv",!0),t(h,f,p,"⅁","\\Game",!0),t(h,f,p,"‵","\\backprime"),t(h,f,p,"▲","\\blacktriangle"),t(h,f,p,"▼","\\blacktriangledown"),t(h,f,p,"■","\\blacksquare"),t(h,f,p,"⧫","\\blacklozenge"),t(h,f,p,"★","\\bigstar"),t(h,f,p,"∢","\\sphericalangle",!0),t(h,f,p,"∁","\\complement",!0),t(h,f,p,"ð","\\eth",!0),t(u,d,p,"ð","ð"),t(h,f,p,"╱","\\diagup"),t(h,f,p,"╲","\\diagdown"),t(h,f,p,"□","\\square"),t(h,f,p,"□","\\Box"),t(h,f,p,"◊","\\Diamond"),t(h,f,p,"¥","\\yen",!0),t(u,f,p,"¥","\\yen",!0),t(h,f,p,"✓","\\checkmark",!0),t(u,f,p,"✓","\\checkmark"),t(h,f,p,"ℶ","\\beth",!0),t(h,f,p,"ℸ","\\daleth",!0),t(h,f,p,"ℷ","\\gimel",!0),t(h,f,p,"ϝ","\\digamma",!0),t(h,f,p,"ϰ","\\varkappa"),t(h,f,Tl,"┌","\\@ulcorner",!0),t(h,f,Ll,"┐","\\@urcorner",!0),t(h,f,Tl,"└","\\@llcorner",!0),t(h,f,Ll,"┘","\\@lrcorner",!0),t(h,f,m,"≦","\\leqq",!0),t(h,f,m,"⩽","\\leqslant",!0),t(h,f,m,"⪕","\\eqslantless",!0),t(h,f,m,"≲","\\lesssim",!0),t(h,f,m,"⪅","\\lessapprox",!0),t(h,f,m,"≊","\\approxeq",!0),t(h,f,g,"⋖","\\lessdot"),t(h,f,m,"⋘","\\lll",!0),t(h,f,m,"≶","\\lessgtr",!0),t(h,f,m,"⋚","\\lesseqgtr",!0),t(h,f,m,"⪋","\\lesseqqgtr",!0),t(h,f,m,"≑","\\doteqdot"),t(h,f,m,"≓","\\risingdotseq",!0),t(h,f,m,"≒","\\fallingdotseq",!0),t(h,f,m,"∽","\\backsim",!0),t(h,f,m,"⋍","\\backsimeq",!0),t(h,f,m,"⫅","\\subseteqq",!0),t(h,f,m,"⋐","\\Subset",!0),t(h,f,m,"⊏","\\sqsubset",!0),t(h,f,m,"≼","\\preccurlyeq",!0),t(h,f,m,"⋞","\\curlyeqprec",!0),t(h,f,m,"≾","\\precsim",!0),t(h,f,m,"⪷","\\precapprox",!0),t(h,f,m,"⊲","\\vartriangleleft"),t(h,f,m,"⊴","\\trianglelefteq"),t(h,f,m,"⊨","\\vDash",!0),t(h,f,m,"⊪","\\Vvdash",!0),t(h,f,m,"⌣","\\smallsmile"),t(h,f,m,"⌢","\\smallfrown"),t(h,f,m,"≏","\\bumpeq",!0),t(h,f,m,"≎","\\Bumpeq",!0),t(h,f,m,"≧","\\geqq",!0),t(h,f,m,"⩾","\\geqslant",!0),t(h,f,m,"⪖","\\eqslantgtr",!0),t(h,f,m,"≳","\\gtrsim",!0),t(h,f,m,"⪆","\\gtrapprox",!0),t(h,f,g,"⋗","\\gtrdot"),t(h,f,m,"⋙","\\ggg",!0),t(h,f,m,"≷","\\gtrless",!0),t(h,f,m,"⋛","\\gtreqless",!0),t(h,f,m,"⪌","\\gtreqqless",!0),t(h,f,m,"≖","\\eqcirc",!0),t(h,f,m,"≗","\\circeq",!0),t(h,f,m,"≜","\\triangleq",!0),t(h,f,m,"∼","\\thicksim"),t(h,f,m,"≈","\\thickapprox"),t(h,f,m,"⫆","\\supseteqq",!0),t(h,f,m,"⋑","\\Supset",!0),t(h,f,m,"⊐","\\sqsupset",!0),t(h,f,m,"≽","\\succcurlyeq",!0),t(h,f,m,"⋟","\\curlyeqsucc",!0),t(h,f,m,"≿","\\succsim",!0),t(h,f,m,"⪸","\\succapprox",!0),t(h,f,m,"⊳","\\vartriangleright"),t(h,f,m,"⊵","\\trianglerighteq"),t(h,f,m,"⊩","\\Vdash",!0),t(h,f,m,"∣","\\shortmid"),t(h,f,m,"∥","\\shortparallel"),t(h,f,m,"≬","\\between",!0),t(h,f,m,"⋔","\\pitchfork",!0),t(h,f,m,"∝","\\varpropto"),t(h,f,m,"◀","\\blacktriangleleft"),t(h,f,m,"∴","\\therefore",!0),t(h,f,m,"∍","\\backepsilon"),t(h,f,m,"▶","\\blacktriangleright"),t(h,f,m,"∵","\\because",!0),t(h,f,m,"⋘","\\llless"),t(h,f,m,"⋙","\\gggtr"),t(h,f,g,"⊲","\\lhd"),t(h,f,g,"⊳","\\rhd"),t(h,f,m,"≂","\\eqsim",!0),t(h,d,m,"⋈","\\Join"),t(h,f,m,"≑","\\Doteq",!0),t(h,f,g,"∔","\\dotplus",!0),t(h,f,g,"∖","\\smallsetminus"),t(h,f,g,"⋒","\\Cap",!0),t(h,f,g,"⋓","\\Cup",!0),t(h,f,g,"⩞","\\doublebarwedge",!0),t(h,f,g,"⊟","\\boxminus",!0),t(h,f,g,"⊞","\\boxplus",!0),t(h,f,g,"⋇","\\divideontimes",!0),t(h,f,g,"⋉","\\ltimes",!0),t(h,f,g,"⋊","\\rtimes",!0),t(h,f,g,"⋋","\\leftthreetimes",!0),t(h,f,g,"⋌","\\rightthreetimes",!0),t(h,f,g,"⋏","\\curlywedge",!0),t(h,f,g,"⋎","\\curlyvee",!0),t(h,f,g,"⊝","\\circleddash",!0),t(h,f,g,"⊛","\\circledast",!0),t(h,f,g,"⋅","\\centerdot"),t(h,f,g,"⊺","\\intercal",!0),t(h,f,g,"⋒","\\doublecap"),t(h,f,g,"⋓","\\doublecup"),t(h,f,g,"⊠","\\boxtimes",!0),t(h,f,m,"⇢","\\dashrightarrow",!0),t(h,f,m,"⇠","\\dashleftarrow",!0),t(h,f,m,"⇇","\\leftleftarrows",!0),t(h,f,m,"⇆","\\leftrightarrows",!0),t(h,f,m,"⇚","\\Lleftarrow",!0),t(h,f,m,"↞","\\twoheadleftarrow",!0),t(h,f,m,"↢","\\leftarrowtail",!0),t(h,f,m,"↫","\\looparrowleft",!0),t(h,f,m,"⇋","\\leftrightharpoons",!0),t(h,f,m,"↶","\\curvearrowleft",!0),t(h,f,m,"↺","\\circlearrowleft",!0),t(h,f,m,"↰","\\Lsh",!0),t(h,f,m,"⇈","\\upuparrows",!0),t(h,f,m,"↿","\\upharpoonleft",!0),t(h,f,m,"⇃","\\downharpoonleft",!0),t(h,d,m,"⊶","\\origof",!0),t(h,d,m,"⊷","\\imageof",!0),t(h,f,m,"⊸","\\multimap",!0),t(h,f,m,"↭","\\leftrightsquigarrow",!0),t(h,f,m,"⇉","\\rightrightarrows",!0),t(h,f,m,"⇄","\\rightleftarrows",!0),t(h,f,m,"↠","\\twoheadrightarrow",!0),t(h,f,m,"↣","\\rightarrowtail",!0),t(h,f,m,"↬","\\looparrowright",!0),t(h,f,m,"↷","\\curvearrowright",!0),t(h,f,m,"↻","\\circlearrowright",!0),t(h,f,m,"↱","\\Rsh",!0),t(h,f,m,"⇊","\\downdownarrows",!0),t(h,f,m,"↾","\\upharpoonright",!0),t(h,f,m,"⇂","\\downharpoonright",!0),t(h,f,m,"⇝","\\rightsquigarrow",!0),t(h,f,m,"⇝","\\leadsto"),t(h,f,m,"⇛","\\Rrightarrow",!0),t(h,f,m,"↾","\\restriction"),t(h,d,p,"‘","`"),t(h,d,p,"$","\\$"),t(u,d,p,"$","\\$"),t(u,d,p,"$","\\textdollar"),t(h,d,p,"%","\\%"),t(u,d,p,"%","\\%"),t(h,d,p,"_","\\_"),t(u,d,p,"_","\\_"),t(u,d,p,"_","\\textunderscore"),t(h,d,p,"∠","\\angle",!0),t(h,d,p,"∞","\\infty",!0),t(h,d,p,"′","\\prime"),t(h,d,p,"△","\\triangle"),t(h,d,p,"Γ","\\Gamma",!0),t(h,d,p,"Δ","\\Delta",!0),t(h,d,p,"Θ","\\Theta",!0),t(h,d,p,"Λ","\\Lambda",!0),t(h,d,p,"Ξ","\\Xi",!0),t(h,d,p,"Π","\\Pi",!0),t(h,d,p,"Σ","\\Sigma",!0),t(h,d,p,"Υ","\\Upsilon",!0),t(h,d,p,"Φ","\\Phi",!0),t(h,d,p,"Ψ","\\Psi",!0),t(h,d,p,"Ω","\\Omega",!0),t(h,d,p,"A","Α"),t(h,d,p,"B","Β"),t(h,d,p,"E","Ε"),t(h,d,p,"Z","Ζ"),t(h,d,p,"H","Η"),t(h,d,p,"I","Ι"),t(h,d,p,"K","Κ"),t(h,d,p,"M","Μ"),t(h,d,p,"N","Ν"),t(h,d,p,"O","Ο"),t(h,d,p,"P","Ρ"),t(h,d,p,"T","Τ"),t(h,d,p,"X","Χ"),t(h,d,p,"¬","\\neg",!0),t(h,d,p,"¬","\\lnot"),t(h,d,p,"⊤","\\top"),t(h,d,p,"⊥","\\bot"),t(h,d,p,"∅","\\emptyset"),t(h,f,p,"∅","\\varnothing"),t(h,d,ds,"α","\\alpha",!0),t(h,d,ds,"β","\\beta",!0),t(h,d,ds,"γ","\\gamma",!0),t(h,d,ds,"δ","\\delta",!0),t(h,d,ds,"ϵ","\\epsilon",!0),t(h,d,ds,"ζ","\\zeta",!0),t(h,d,ds,"η","\\eta",!0),t(h,d,ds,"θ","\\theta",!0),t(h,d,ds,"ι","\\iota",!0),t(h,d,ds,"κ","\\kappa",!0),t(h,d,ds,"λ","\\lambda",!0),t(h,d,ds,"μ","\\mu",!0),t(h,d,ds,"ν","\\nu",!0),t(h,d,ds,"ξ","\\xi",!0),t(h,d,ds,"ο","\\omicron",!0),t(h,d,ds,"π","\\pi",!0),t(h,d,ds,"ρ","\\rho",!0),t(h,d,ds,"σ","\\sigma",!0),t(h,d,ds,"τ","\\tau",!0),t(h,d,ds,"υ","\\upsilon",!0),t(h,d,ds,"ϕ","\\phi",!0),t(h,d,ds,"χ","\\chi",!0),t(h,d,ds,"ψ","\\psi",!0),t(h,d,ds,"ω","\\omega",!0),t(h,d,ds,"ε","\\varepsilon",!0),t(h,d,ds,"ϑ","\\vartheta",!0),t(h,d,ds,"ϖ","\\varpi",!0),t(h,d,ds,"ϱ","\\varrho",!0),t(h,d,ds,"ς","\\varsigma",!0),t(h,d,ds,"φ","\\varphi",!0),t(h,d,g,"∗","*",!0),t(h,d,g,"+","+"),t(h,d,g,"−","-",!0),t(h,d,g,"⋅","\\cdot",!0),t(h,d,g,"∘","\\circ",!0),t(h,d,g,"÷","\\div",!0),t(h,d,g,"±","\\pm",!0),t(h,d,g,"×","\\times",!0),t(h,d,g,"∩","\\cap",!0),t(h,d,g,"∪","\\cup",!0),t(h,d,g,"∖","\\setminus",!0),t(h,d,g,"∧","\\land"),t(h,d,g,"∨","\\lor"),t(h,d,g,"∧","\\wedge",!0),t(h,d,g,"∨","\\vee",!0),t(h,d,p,"√","\\surd"),t(h,d,Tl,"⟨","\\langle",!0),t(h,d,Tl,"∣","\\lvert"),t(h,d,Tl,"∥","\\lVert"),t(h,d,Ll,"?","?"),t(h,d,Ll,"!","!"),t(h,d,Ll,"⟩","\\rangle",!0),t(h,d,Ll,"∣","\\rvert"),t(h,d,Ll,"∥","\\rVert"),t(h,d,m,"=","="),t(h,d,m,":",":"),t(h,d,m,"≈","\\approx",!0),t(h,d,m,"≅","\\cong",!0),t(h,d,m,"≥","\\ge"),t(h,d,m,"≥","\\geq",!0),t(h,d,m,"←","\\gets"),t(h,d,m,">","\\gt",!0),t(h,d,m,"∈","\\in",!0),t(h,d,m,"","\\@not"),t(h,d,m,"⊂","\\subset",!0),t(h,d,m,"⊃","\\supset",!0),t(h,d,m,"⊆","\\subseteq",!0),t(h,d,m,"⊇","\\supseteq",!0),t(h,f,m,"⊈","\\nsubseteq",!0),t(h,f,m,"⊉","\\nsupseteq",!0),t(h,d,m,"⊨","\\models"),t(h,d,m,"←","\\leftarrow",!0),t(h,d,m,"≤","\\le"),t(h,d,m,"≤","\\leq",!0),t(h,d,m,"<","\\lt",!0),t(h,d,m,"→","\\rightarrow",!0),t(h,d,m,"→","\\to"),t(h,f,m,"≱","\\ngeq",!0),t(h,f,m,"≰","\\nleq",!0),t(h,d,xl," ","\\ "),t(h,d,xl," ","\\space"),t(h,d,xl," ","\\nobreakspace"),t(u,d,xl," ","\\ "),t(u,d,xl," "," "),t(u,d,xl," ","\\space"),t(u,d,xl," ","\\nobreakspace"),t(h,d,xl,null,"\\nobreak"),t(h,d,xl,null,"\\allowbreak"),t(h,d,Ml,",",","),t(h,d,Ml,";",";"),t(h,f,g,"⊼","\\barwedge",!0),t(h,f,g,"⊻","\\veebar",!0),t(h,d,g,"⊙","\\odot",!0),t(h,d,g,"⊕","\\oplus",!0),t(h,d,g,"⊗","\\otimes",!0),t(h,d,p,"∂","\\partial",!0),t(h,d,g,"⊘","\\oslash",!0),t(h,f,g,"⊚","\\circledcirc",!0),t(h,f,g,"⊡","\\boxdot",!0),t(h,d,g,"△","\\bigtriangleup"),t(h,d,g,"▽","\\bigtriangledown"),t(h,d,g,"†","\\dagger"),t(h,d,g,"⋄","\\diamond"),t(h,d,g,"⋆","\\star"),t(h,d,g,"◃","\\triangleleft"),t(h,d,g,"▹","\\triangleright"),t(h,d,Tl,"{","\\{"),t(u,d,p,"{","\\{"),t(u,d,p,"{","\\textbraceleft"),t(h,d,Ll,"}","\\}"),t(u,d,p,"}","\\}"),t(u,d,p,"}","\\textbraceright"),t(h,d,Tl,"{","\\lbrace"),t(h,d,Ll,"}","\\rbrace"),t(h,d,Tl,"[","\\lbrack",!0),t(u,d,p,"[","\\lbrack",!0),t(h,d,Ll,"]","\\rbrack",!0),t(u,d,p,"]","\\rbrack",!0),t(h,d,Tl,"(","\\lparen",!0),t(h,d,Ll,")","\\rparen",!0),t(u,d,p,"<","\\textless",!0),t(u,d,p,">","\\textgreater",!0),t(h,d,Tl,"⌊","\\lfloor",!0),t(h,d,Ll,"⌋","\\rfloor",!0),t(h,d,Tl,"⌈","\\lceil",!0),t(h,d,Ll,"⌉","\\rceil",!0),t(h,d,p,"\\","\\backslash"),t(h,d,p,"∣","|"),t(h,d,p,"∣","\\vert"),t(u,d,p,"|","\\textbar",!0),t(h,d,p,"∥","\\|"),t(h,d,p,"∥","\\Vert"),t(u,d,p,"∥","\\textbardbl"),t(u,d,p,"~","\\textasciitilde"),t(u,d,p,"\\","\\textbackslash"),t(u,d,p,"^","\\textasciicircum"),t(h,d,m,"↑","\\uparrow",!0),t(h,d,m,"⇑","\\Uparrow",!0),t(h,d,m,"↓","\\downarrow",!0),t(h,d,m,"⇓","\\Downarrow",!0),t(h,d,m,"↕","\\updownarrow",!0),t(h,d,m,"⇕","\\Updownarrow",!0),t(h,d,ic,"∐","\\coprod"),t(h,d,ic,"⋁","\\bigvee"),t(h,d,ic,"⋀","\\bigwedge"),t(h,d,ic,"⨄","\\biguplus"),t(h,d,ic,"⋂","\\bigcap"),t(h,d,ic,"⋃","\\bigcup"),t(h,d,ic,"∫","\\int"),t(h,d,ic,"∫","\\intop"),t(h,d,ic,"∬","\\iint"),t(h,d,ic,"∭","\\iiint"),t(h,d,ic,"∏","\\prod"),t(h,d,ic,"∑","\\sum"),t(h,d,ic,"⨂","\\bigotimes"),t(h,d,ic,"⨁","\\bigoplus"),t(h,d,ic,"⨀","\\bigodot"),t(h,d,ic,"∮","\\oint"),t(h,d,ic,"∯","\\oiint"),t(h,d,ic,"∰","\\oiiint"),t(h,d,ic,"⨆","\\bigsqcup"),t(h,d,ic,"∫","\\smallint"),t(u,d,Pl,"…","\\textellipsis"),t(h,d,Pl,"…","\\mathellipsis"),t(u,d,Pl,"…","\\ldots",!0),t(h,d,Pl,"…","\\ldots",!0),t(h,d,Pl,"⋯","\\@cdots",!0),t(h,d,Pl,"⋱","\\ddots",!0),t(h,d,p,"⋮","\\varvdots"),t(u,d,p,"⋮","\\varvdots"),t(h,d,nc,"ˊ","\\acute"),t(h,d,nc,"ˋ","\\grave"),t(h,d,nc,"¨","\\ddot"),t(h,d,nc,"~","\\tilde"),t(h,d,nc,"ˉ","\\bar"),t(h,d,nc,"˘","\\breve"),t(h,d,nc,"ˇ","\\check"),t(h,d,nc,"^","\\hat"),t(h,d,nc,"⃗","\\vec"),t(h,d,nc,"˙","\\dot"),t(h,d,nc,"˚","\\mathring"),t(h,d,ds,"","\\@imath"),t(h,d,ds,"","\\@jmath"),t(h,d,p,"ı","ı"),t(h,d,p,"ȷ","ȷ"),t(u,d,p,"ı","\\i",!0),t(u,d,p,"ȷ","\\j",!0),t(u,d,p,"ß","\\ss",!0),t(u,d,p,"æ","\\ae",!0),t(u,d,p,"œ","\\oe",!0),t(u,d,p,"ø","\\o",!0),t(u,d,p,"Æ","\\AE",!0),t(u,d,p,"Œ","\\OE",!0),t(u,d,p,"Ø","\\O",!0),t(u,d,nc,"ˊ","\\'"),t(u,d,nc,"ˋ","\\`"),t(u,d,nc,"ˆ","\\^"),t(u,d,nc,"˜","\\~"),t(u,d,nc,"ˉ","\\="),t(u,d,nc,"˘","\\u"),t(u,d,nc,"˙","\\."),t(u,d,nc,"¸","\\c"),t(u,d,nc,"˚","\\r"),t(u,d,nc,"ˇ","\\v"),t(u,d,nc,"¨",'\\"'),t(u,d,nc,"˝","\\H"),t(u,d,nc,"◯","\\textcircled"),ps={"--":!0,"---":!0,"``":!0,"''":!0},t(u,d,p,"–","--",!0),t(u,d,p,"–","\\textendash"),t(u,d,p,"—","---",!0),t(u,d,p,"—","\\textemdash"),t(u,d,p,"‘","`",!0),t(u,d,p,"‘","\\textquoteleft"),t(u,d,p,"’","'",!0),t(u,d,p,"’","\\textquoteright"),t(u,d,p,"“","``",!0),t(u,d,p,"“","\\textquotedblleft"),t(u,d,p,"”","''",!0),t(u,d,p,"”","\\textquotedblright"),t(h,d,p,"°","\\degree",!0),t(u,d,p,"°","\\degree"),t(u,d,p,"°","\\textdegree",!0),t(h,d,p,"£","\\pounds"),t(h,d,p,"£","\\mathsterling",!0),t(u,d,p,"£","\\pounds"),t(u,d,p,"£","\\textsterling",!0),t(h,f,p,"✠","\\maltese"),t(u,f,p,"✠","\\maltese"),gs='0123456789/@."',ms=0;ms{if(Ka(e.classes)!==Ka(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var i in e.style)if(e.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},"canCombine"),g=mt(e=>{for(var t=0;tt&&(t=a.height),rnew ts(e,t,r,i),"makeSvgSpan"),Tl=mt(function(e,t,r){return(e=Fs([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),Ll=mt(function(e,t,r,i){return e=new rs(e,t,r,i),$s(e),e},"makeAnchor"),qs=mt(function(e){return e=new Ba(e),$s(e),e},"makeFragment"),m=mt(function(e,t){return e instanceof Ba?Fs([],[e],t):e},"wrapFragment"),js=mt(function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],i=-t[0].shift-t[0].elem.depth,n=i,a=1;a{var r=Fs(["mspace"],[],t),e=Xa(e,t);return r.style.marginRight=K(e),r},"makeGlue"),Ws=mt(function(e,t,r){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}return i+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},"retrieveTextFontName"),Us={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Gs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nc=mt(function(e,t){var[e,r,i]=Gs[e],e=new os(e),e=new ss([e],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(e=zs(["overlay"],[e],t)).height=i,e.style.height=K(i),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Us,makeSymbol:Os,mathsym:xl,makeSpan:Fs,makeSvgSpan:zs,makeLineSpan:Tl,makeAnchor:Ll,makeFragment:qs,wrapFragment:m,makeVList:ic,makeOrd:Ml,makeGlue:Pl,staticSvg:nc,svgData:Gs,tryCombineChars:g},Vs={mord:{mop:f={number:3,unit:"mu"},mbin:xl={number:4,unit:"mu"},mrel:Tl={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:Tl,minner:f},mbin:{mord:xl,mop:xl,mopen:xl,minner:xl},mrel:{mord:Tl,mop:Tl,mopen:Tl,minner:Tl},mopen:{},mclose:{mop:f,mbin:xl,mrel:Tl,minner:f},mpunct:{mord:f,mop:f,mrel:Tl,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:xl,mrel:Tl,mopen:f,mpunct:f,minner:f}},Ys={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},Hs={},Xs={},Ks={},mt(o,"defineFunction"),mt(Fn,"defineFunctionBuilders"),Zs=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),Qs=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),Js=Z.makeSpan,eo=["leftmost","mbin","mopen","mrel","mop","mpunct"],to=["rightmost","mrel","mclose","mpunct"],ro={display:wa.DISPLAY,text:wa.TEXT,script:wa.SCRIPT,scriptscript:wa.SCRIPTSCRIPT},io={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},no=mt(function(e,t,r,i){void 0===i&&(i=[null,null]);for(var n,a,s=[],o=0;o{var r=t.classes[0],i=e.classes[0];"mbin"===r&&to.includes(i)?t.classes[0]="mord":"mbin"===i&&eo.includes(r)&&(e.classes[0]="mord")},{node:a},i,r="root"===r),ao(s,(e,t)=>{var t=lo(t),r=lo(e);if(e=t&&r?(e.hasClass("mtight")?Ys:Vs)[t][r]:null)return Z.makeGlue(e,n)},{node:a},i,r)),s},"buildExpression"),ao=mt(function e(r,t,i,n,a){n&&r.push(n);for(var s=0;se=>{r.splice(t+1,0,e),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),so=mt(function(e){return e instanceof Ba||e instanceof rs||e instanceof ts&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),oo=mt(function e(t,r){var i=so(t);if(i&&(i=i.children).length){if("right"===r)return e(i[i.length-1],"right");if("left"===r)return e(i[0],"left")}return t},"getOutermostNode"),lo=mt(function(e,t){return e&&(t&&(e=oo(e,t)),io[e.classes[0]])||null},"getTypeOfDomTree"),co=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),Js(t.concat(e))},"makeNullDelimiter"),ho=mt(function(e,t,r){if(!e)return Js();var i;if(Xs[e.type])return i=Xs[e.type](e,t),r&&t.size!==r.size&&(i=Js(t.sizingClasses(r),[i],t),t=t.sizeMultiplier/r.sizeMultiplier,i.height*=t,i.depth*=t),i;throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(zn,"buildHTMLUnbreakable"),mt(qn,"buildHTML"),mt(jn,"newDocumentFragment"),uo=class{static{mt(this,"MathNode")}constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e,t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0"}toText(){return this.children.map(e=>e.toText()).join("")}},po=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return pa.escape(this.toText())}toText(){return this.text}},Ll=class{static{mt(this,"SpaceNode")}constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),e)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},C={MathNode:uo,TextNode:po,SpaceNode:Ll,newDocumentFragment:jn},go=mt(function(e,t,r){return!us[t][e]||!us[t][e].replace||55349===e.charCodeAt(0)||ps.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=us[t][e].replace),new C.TextNode(e)},"makeText"),fo=mt(function(e){return 1===e.length?e[0]:new C.MathNode("mrow",e)},"makeRow"),mo=mt(function(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathsfit"===t?"sans-serif-italic":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!["\\imath","\\jmath"].includes(e=e.text)&&On(e=us[r][e]&&us[r][e].replace?us[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(Wn,"isNumberPunctuation"),yo=mt(function(e,t,r){var i;if(1===e.length)return i=bo(e[0],t),r&&i instanceof uo&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var n,a=[],s=0;s{e&&"supsub"===e.type?(o=(r=Gn(e.base,"accent")).base,e.base=o,i=$n(ho(e,t)),e.base=r):o=(r=Gn(e,"accent")).base;var r,i,n,a,e=ho(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&pa.isCharacterBox(o)&&(o=pa.getBaseElem(o),s=Bn(ho(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=_o.svgSpan(r,t),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=e.isStretchy?_o.mathMLnode(e.label):new C.MathNode("mo",[go(e.label,e.mode)]);return(e=new C.MathNode("mover",[bo(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),Ro=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),o({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:mt((e,t)=>{var t=Zs(t[0]),r=!Ro.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:t}},"handler"),htmlBuilder:Ao,mathmlBuilder:Pl}),o({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:mt((e,t)=>{var t=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},"handler"),htmlBuilder:Ao,mathmlBuilder:Pl}),o({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},"handler"),htmlBuilder:mt((e,t)=>{var r=ho(e.base,t),i=_o.svgSpan(e,t),e="\\utilde"===e.label?.12:0,i=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return Z.makeSpan(["mord","accentunder"],[i],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=_o.mathMLnode(e.label);return(e=new C.MathNode("munder",[bo(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),Lo=mt(e=>((e=new C.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e),"paddedNode"),o({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(e,t,r){var{parser:e,funcName:i}=e;return{type:"xArrow",mode:e.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,i=t.style,n=t.havingStyle(i.sup()),a=Z.wrapFragment(ho(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd",i=(a.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(i.sub()),(r=Z.wrapFragment(ho(e.below,n,t),t)).classes.push(s+"-arrow-pad")),_o.svgSpan(e,t)),n=-t.fontMetrics().axisHeight+.5*i.height,s=-t.fontMetrics().axisHeight-.5*i.height-.111;return(.25"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,"binrelClass"),o({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:No(t[0]),body:Qs(t[1]),isCharacterBox:pa.isCharacterBox(t[1])}}}),o({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,i=t[1],t=t[0],n="\\stackrel"!==r?No(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:Qs(i)},i={type:"supsub",mode:t.mode,base:i,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:n,body:[i],isCharacterBox:pa.isCharacterBox(i)}},htmlBuilder:Hn,mathmlBuilder:Xn}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:No(t[0]),body:Qs(t[0])}},htmlBuilder(e,t){var r=no(e.body,t,!0);return(e=Z.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=yo(e.body,t),(t=new C.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),Do={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Mo=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Oo=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),Po=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(Kn,"cdArrow"),mt(Zn,"parseCD"),o({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=Z.wrapFragment(ho(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){return t=new C.MathNode("mrow",[bo(e.label,t)]),(t=new C.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new C.MathNode("mstyle",[t])).setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}}),o({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=Z.wrapFragment(ho(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new C.MathNode("mrow",[bo(e.fragment,t)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Gn(t[0],"ordgroup").body,i="",n=0;n>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),nc=mt((e,t)=>(t=no(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),g=mt((e,t)=>(t=yo(e.body,t.withColor(e.color)),(t=new C.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t),"mathmlBuilder$7"),o({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Gn(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:Qs(t[1])}},htmlBuilder:nc,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Gn(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:nc,mathmlBuilder:g}),o({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var i="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,n=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:n,size:i&&Gn(i,"size").value}},htmlBuilder(e,t){var r=Z.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=K(Xa(e.size,t))),r},mathmlBuilder(e,t){var r=new C.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(Xa(e.size,t))),r}}),Bo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},$o=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),Fo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),zo=mt((e,t,r,i)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,i)},"letCommand"),o({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(Bo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=Bo[r.text]),Gn(e.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),o({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:e}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new X("Expected a control sequence",r);for(var n,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){n=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=t.gullet.consumeArg().tokens;return n&&o.unshift(n),"\\edef"!==e&&"\\xdef"!==e||(o=t.gullet.expandTokens(o)).reverse(),t.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},e===Bo[e]),{type:"internal",mode:t.mode}}}),o({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=$o(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),Fo(e));return zo(e,r,i,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),o({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=$o(e.gullet.popToken()),i=e.gullet.popToken(),n=e.gullet.popToken();return zo(e,r,n,"\\\\globalfuture"===t),e.gullet.pushToken(n),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),qo=mt(function(e,t,r){if(r=On(us.math[e]&&us.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),jo=mt(function(e,t,r,i){return t=r.havingBaseStyle(t),i=Z.makeSpan(i.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,i.height*=e,i.depth*=e,i.maxFontSize=t.sizeMultiplier,i},"styleWrap"),Wo=mt(function(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=K(r),e.height-=r,e.depth+=r},"centerSpan"),Uo=mt(function(e,t,r,i,n,a){return e=Z.makeSymbol(e,"Main-Regular",n,i),n=jo(e,t,i,a),r&&Wo(n,i,t),n},"makeSmallDelim"),Go=mt(function(e,t,r,i){return Z.makeSymbol(e,"Size"+t+"-Regular",r,i)},"mathrmSize"),Vo=mt(function(e,t,r,i,n,a){return e=Go(e,t,n,i),n=jo(Z.makeSpan(["delimsizing","size"+t],[e],i),wa.TEXT,i,a),r&&Wo(n,i,wa.TEXT),n},"makeLargeDelim"),Yo=mt(function(e,t,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(e,t,r)])])}},"makeGlyphSpan"),Ho=mt(function(e,t,r){var i=($a["Size4-Regular"][e.charCodeAt(0)]?$a["Size4-Regular"]:$a["Size1-Regular"])[e.charCodeAt(0)][4],e=new os("inner",Ma(e,Math.round(1e3*t))),e=new ss([e],{width:K(i),height:K(t),style:"width:"+K(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Z.makeSvgSpan([],[e],r)).height=t,e.style.height=K(t),e.style.width=K(i),{type:"elem",elem:e}},"makeInner"),Xo={type:"kern",size:-.008},Ko=["|","\\lvert","\\rvert","\\vert"],Zo=["\\|","\\lVert","\\rVert","\\Vert"],Qo=mt(function(e,t,r,i,n,a){var s,o,l,c="",h=0,u=s=o=e,d=null,p="Size1-Regular",e=("\\uparrow"===e?s=o="⏐":"\\Uparrow"===e?s=o="‖":"\\downarrow"===e?u=s="⏐":"\\Downarrow"===e?u=s="‖":"\\updownarrow"===e?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===e?(u="\\Uparrow",s="‖",o="\\Downarrow"):Ko.includes(e)?(s="∣",c="vert",h=333):Zo.includes(e)?(s="∥",c="doublevert",h=556):"["===e||"\\lbrack"===e?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===e||"\\rbrack"===e?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===e||"⌈"===e?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===e||"⌋"===e?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===e||"⌉"===e?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===e||"\\lparen"===e?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===e||"\\rparen"===e?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===e||"\\lbrace"===e?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(e=qo(u,p,n)).height+e.depth),g=(g=qo(s,p,n)).height+g.depth,f=(f=qo(o,p,n)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=qo(d,p,n)).height+v.depth,y=2),(v=e+f+m)+Math.max(0,Math.ceil((t-v)/(y*g)))*y*g),v=i.fontMetrics().axisHeight,y=(r&&(v*=i.sizeMultiplier),t/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],il=[0,1.2,1.8,2.4,3],Tl=mt(function(e,t,r,i,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),el.includes(e)||rl.includes(e))return Vo(e,t,!1,r,i,n);if(tl.includes(e))return Qo(e,il[t],!1,r,i,n);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),nl=[{type:"small",style:wa.SCRIPTSCRIPT},{type:"small",style:wa.SCRIPT},{type:"small",style:wa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],al=[{type:"small",style:wa.SCRIPTSCRIPT},{type:"small",style:wa.SCRIPT},{type:"small",style:wa.TEXT},{type:"stack"}],sl=[{type:"small",style:wa.SCRIPTSCRIPT},{type:"small",style:wa.SCRIPT},{type:"small",style:wa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ol=mt(function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),ll=mt(function(e,t,r,i){for(var n=Math.min(2,3-i.style.size);n"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=rl.includes(e)?nl:el.includes(e)?sl:al;return"small"===(s=ll(e,t,s,i)).type?Uo(e,s.style,r,i,n,a):"large"===s.type?Vo(e,s.size,r,i,n,a):Qo(e,t,r,i,n,a)},"makeCustomSizedDelim"),f=mt(function(e,t,r,i,n,a){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=5/i.fontMetrics().ptPerEm,t=Math.max(t-s,r+s),r=Math.max(t/500*901,2*t-o);return cl(e,r,!0,i,n,a)},"makeLeftRightDelim"),hl={sqrtImage:xl,sizedDelim:Tl,sizeToMaxHeight:il,customSizedDelim:cl,leftRightDelim:f},ul={"\\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}},dl=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],mt(Qn,"checkDelimiter"),o({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:mt((e,t)=>(t=Qn(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:ul[e.funcName].size,mclass:ul[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):hl.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(go(e.delim,e.mode)),new C.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(hl.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(Jn,"assertParsed"),o({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new X("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Qn(t[0],e).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=Qn(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),Gn(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:i.delim,rightColor:i.color}},"handler"),htmlBuilder:mt((e,t)=>{Jn(e);for(var r,i=no(e.body,t,!0,["mopen","mclose"]),n=0,a=0,s=!1,o=0;o{Jn(e);var r,t=yo(e.body,t);return"."!==e.left&&((r=new C.MathNode("mo",[go(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new C.MathNode("mo",[go(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),fo(t)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=Qn(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new X("\\middle without preceding \\left",t)},"handler"),htmlBuilder:mt((e,t)=>{var r;return"."===e.delim?r=co(t,[]):(r=hl.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e="\\vert"===e.delim||"|"===e.delim?go("|","text"):go(e.delim,e.mode),(e=new C.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),Ll=mt((e,t)=>{var r,i,n,a,s,o=Z.wrapFragment(ho(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=pa.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=Xa({number:.6,unit:"pt"},t),s=Xa({number:.35,unit:"ex"},t),c/=t.havingBaseSizing().sizeMultiplier,i=o.height+o.depth+a+s,o.style.paddingLeft=K(i/2+a),c=Math.floor(1e3*i*c),n=Ia(c),n=new ss([new os("phase",n)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[n],t)).style.height=K(i),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),i=n=c=0,n=/box/.test(l)?(i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),c=t.fontMetrics().fboxsep+("colorbox"===l?0:i)):"angl"===l?(c=4*(i=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=_o.encloseSpan(o,l,c,n,t),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(i)):"angl"===l&&.049!==i&&(r.style.borderTopWidth=K(i),r.style.borderRightWidth=K(i)),h=o.depth+n,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor)&&(r.style.borderColor=e.borderColor)),s=e.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},t):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},t)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],t):Z.makeSpan(["mord"],[s],t)},"htmlBuilder$7"),Ml=mt((e,t)=>{var r=new C.MathNode(-1{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(ra,"getAutoTag"),mt(ia,"parseArray"),mt(na,"dCellStyle"),m=mt(function(e,t){var r=e.body.length,P=e.hLinesBeforeRow,i=0,n=new Array(r),a=[],s=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),o=1/t.fontMetrics().ptPerEm,l=5*o,c=(e.colSeparationType&&"small"===e.colSeparationType&&(l=t.havingStyle(wa.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?Xa({number:3,unit:"ex"},t):12*o),B=3*o,$=.7*(o=e.arraystretch*c),F=.3*o,h=0;function u(e){for(var t=0;te))for(D=0;De.length)),n.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=ia(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:m,mathmlBuilder:ic}),ea({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(Yn(t[0])?[t[0]]:Gn(t[0],"ordgroup").body).map(function(e){var t=Vn(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new X("Unknown column alignment: "+t,e)})).length)throw new X("{subarray} can contain only one column");if(0<(e=ia(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=e.font,t=t.withFont(r);return ho(e.body,t)},"htmlBuilder$5"),g=mt((e,t)=>{var r=e.font,t=t.withFont(r);return bo(e.body,t)},"mathmlBuilder$4"),vl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},o({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=Zs(t[0]);return{type:"font",mode:e.mode,font:(r=r in vl?vl[r]:r).slice(1),body:t}},"handler"),htmlBuilder:nc,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=pa.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:No(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}},"handler")}),o({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r,breakOnTokenText:i}=e,n=e.mode,i=e.parseExpression(!0,i);return{type:"font",mode:n,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:i}}},"handler"),htmlBuilder:nc,mathmlBuilder:g}),bl=mt((e,t)=>("display"===e?t=t.id>=wa.SCRIPT.id?t.text():wa.DISPLAY:"text"===e&&t.size===wa.DISPLAY.size?t=wa.TEXT:"script"===e?t=wa.SCRIPT:"scriptscript"===e&&(t=wa.SCRIPTSCRIPT),t),"adjustStyle"),xl=mt((e,t)=>{var r,i,n,a,s=bl(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=ho(e.numer,o,t),h=(e.continued&&(h=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm,c.height=c.height{var r=new C.MathNode("mfrac",[bo(e.numer,t),bo(e.denom,t)]),i=(e.hasBarLine?e.barSize&&(i=Xa(e.barSize,t),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),bl(e.size,t.style));return i.size!==t.style.size&&(r=new C.MathNode("mstyle",[r]),t=i.size===wa.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(i=[],null!=e.leftDelim&&((t=new C.MathNode("mo",[new C.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),i.push(r),null!=e.rightDelim&&((t=new C.MathNode("mo",[new C.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),fo(i)):r},"mathmlBuilder$3"),o({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:mt((e,t)=>{var r,{parser:e,funcName:i}=e,n=t[0],t=t[1],a=null,s=null,o="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:xl,mathmlBuilder:Tl}),o({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:mt((e,t)=>{var e=e.parser,r=t[0];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),o({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:e,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:t,token:i}}}),kl=["display","text","script","scriptscript"],wl=mt(function(e){var t=null;return 0{var e=e.parser,r=t[0],i=da(Gn(t[1],"infix").size),t=t[2],n=0{var r,i,n=t.style,n="supsub"===e.type?(r=e.sup?ho(e.sup,t.havingStyle(n.sup()),t):ho(e.sub,t.havingStyle(n.sub()),t),Gn(e.base,"horizBrace")):Gn(e,"horizBrace"),e=ho(n.base,t.havingBaseStyle(wa.DISPLAY)),a=_o.svgSpan(n,t);return(n.isOver?(i=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1]:(i=Z.makeVList({positionType:"bottom",positionData:e.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t),i=n.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Z.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},t)),Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)},"htmlBuilder$3"),f=mt((e,t)=>{var r=_o.mathMLnode(e.label);return new C.MathNode(e.isOver?"mover":"munder",[bo(e.base,t),r])},"mathmlBuilder$2"),o({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Cl,mathmlBuilder:f}),o({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=t[1],t=Gn(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:Qs(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=no(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=vo(e.body,t))instanceof uo?t:new uo("mrow",[t])).setAttribute("href",e.href),t),"mathmlBuilder")}),o({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=Gn(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var i=[],n=0;n{var{parser:e,funcName:r}=e,i=Gn(t[0],"raw").string,t=t[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var n,a={};switch(r){case"\\htmlClass":n={command:"\\htmlClass",class:a.class=i};break;case"\\htmlId":n={command:"\\htmlId",id:a.id=i};break;case"\\htmlStyle":n={command:"\\htmlStyle",style:a.style=i};break;case"\\htmlData":for(var s=i.split(","),o=0;o{var r,i=no(e.body,t,!1),n=["enclosing"],a=(e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),Z.makeSpan(n,i,t));for(r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&a.setAttribute(r,e.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:mt((e,t)=>vo(e.body,t),"mathmlBuilder")}),o({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:mt((e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:Qs(t[0]),mathml:Qs(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=no(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>vo(e.mathml,t),"mathmlBuilder")}),Sl=mt(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new X("Invalid size: '"+e+"' in \\includegraphics");if(e={number:+(t[1]+t[2]),unit:t[3]},Ha(e))return e;throw new X("Invalid unit: '"+e.unit+"' in \\includegraphics.")},"sizeData"),o({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:mt((e,t,r)=>{var e=e.parser,i={number:0,unit:"em"},n={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Gn(r[0],"raw").string.split(","),l=0;l{var r=Xa(e.height,t),i=0,n=(0{var r=new C.MathNode("mglyph",[]),i=(r.setAttribute("alt",e.alt),Xa(e.height,t)),n=0;return 0{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},"handler"),htmlBuilder:mt((e,t)=>{var r="clap"===e.alignment?(r=Z.makeSpan([],[ho(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[ho(e.body,t)]),i=Z.makeSpan(["fix"],[]),e=Z.makeSpan([e.alignment],[r,i],t);return(r=Z.makeSpan(["strut"])).style.height=K(e.height+e.depth),e.depth&&(r.style.verticalAlign=K(-e.depth)),e.children.unshift(r),e=Z.makeSpan(["thinbox"],[e],t),Z.makeSpan(["mord","vbox"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new C.MathNode("mpadded",[bo(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t),"mathmlBuilder")}),o({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,i=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),n=r.parseExpression(!1,e);return r.expect(e),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:n}}}),o({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new X("Mismatched "+e.funcName)}}),El=mt((e,t)=>{switch(t.style.size){case wa.DISPLAY.size:return e.display;case wa.TEXT.size:return e.text;case wa.SCRIPT.size:return e.script;case wa.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle"),o({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:mt((e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:Qs(t[0]),text:Qs(t[1]),script:Qs(t[2]),scriptscript:Qs(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=El(e,t),e=no(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=El(e,t),vo(e,t)),"mathmlBuilder")}),_l=mt((e,t,r,i,n,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&pa.isCharacterBox(r);if(t&&(o={elem:t=ho(t,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=ho(r,i.havingStyle(n.sub()),i),kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-t.height)}),o&&l)var r=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i);else if(l)n=e.height-s,h=Z.makeVList({positionType:"top",positionData:n,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},i);else{if(!o)return e;t=e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}return r=[h],l&&0!==a&&!c&&((n=Z.makeSpan(["mspace"],[],i)).style.marginRight=K(a),r.unshift(n)),Z.makeSpan(["mop","op-limits"],r,i)},"assembleSupSub"),Al=["\\smallint"],Rl=mt((e,t)=>{var r,i,n,a=!1,s=("supsub"===e.type?(r=e.sup,i=e.sub,n=Gn(e.base,"op"),a=!0):n=Gn(e,"op"),!1);if((e=t.style).size===wa.DISPLAY.size&&n.symbol&&!Al.includes(n.name)&&(s=!0),n.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(n.name,l,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return e.symbol?(r=new uo("mo",[go(e.name,e.mode)]),Al.includes(e.name)&&r.setAttribute("largeop","false")):r=e.body?new uo("mo",yo(e.body,t)):(r=new uo("mi",[new po(e.name.slice(1))]),t=new uo("mo",[go("⁡","text")]),e.parentIsSupSub?new uo("mrow",[r,t]):jn([r,t])),r},"mathmlBuilder$1"),Il={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},o({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e;return 1===r.length&&(r=Il[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Rl,mathmlBuilder:Ll}),o({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Qs(t)}),"handler"),htmlBuilder:Rl,mathmlBuilder:Ll}),Nl={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},o({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(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Rl,mathmlBuilder:Ll}),o({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Rl,mathmlBuilder:Ll}),o({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return 1===t.length&&(t=Nl[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:Rl,mathmlBuilder:Ll}),Dl=mt((e,t)=>{var r,i,n,a,s=!1;if("supsub"===e.type?(r=e.sup,i=e.sub,n=Gn(e.base,"operatorname"),s=!0):n=Gn(e,"operatorname"),0{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=no(e,t.withFont("mathrm"),!0),l=0;l{for(var r=yo(e.body,t.withFont("mathrm")),i=!0,n=0;ne.toText()).join(""),r=[new C.TextNode(t)]),(t=new C.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new C.MathNode("mo",[go("⁡","text")]);return e.parentIsSupSub?new C.MathNode("mrow",[t,o]):C.newDocumentFragment([t,o])},"mathmlBuilder"),o({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:Qs(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Dl,mathmlBuilder:Ml}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Fn({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(no(e.body,t,!1)):Z.makeSpan(["mord"],no(e.body,t,!0),t)},mathmlBuilder(e,t){return vo(e.body,t,!0)}}),o({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=ho(e.body,t.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return Z.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new C.MathNode("mo",[new C.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new C.MathNode("mover",[bo(e.body,t),r])).setAttribute("accent","true"),e}}),o({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:Qs(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=no(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=yo(e.body,t),new C.MathNode("mphantom",e)),"mathmlBuilder")}),o({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[ho(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var i=0;i(e=yo(Qs(e.body),t),t=new C.MathNode("mphantom",e),(e=new C.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e),"mathmlBuilder")}),o({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var e=Z.makeSpan(["inner"],[ho(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=yo(Qs(e.body),t),t=new C.MathNode("mphantom",e),(e=new C.MathNode("mpadded",[t])).setAttribute("width","0px"),e),"mathmlBuilder")}),o({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Gn(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=ho(e.body,t),e=Xa(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new C.MathNode("mpadded",[bo(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),o({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),o({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],i=Gn(t[0],"size"),t=Gn(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Gn(r,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),i=Xa(e.width,t),n=Xa(e.height,t),e=e.shift?Xa(e.shift,t):0;return r.style.borderRightWidth=K(i),r.style.borderTopWidth=K(n),r.style.bottom=K(e),r.width=i,r.height=n+e,r.depth=-e,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Xa(e.width,t),i=Xa(e.height,t),e=e.shift?Xa(e.shift,t):0,t=t.color&&t.getColor()||"black",n=new C.MathNode("mspace"),t=(n.setAttribute("mathbackground",t),n.setAttribute("width",K(r)),n.setAttribute("height",K(i)),new C.MathNode("mpadded",[n]));return 0<=e?t.setAttribute("height",K(e)):(t.setAttribute("height",K(e)),t.setAttribute("depth",K(-e))),t.setAttribute("voffset",K(e)),t}}),mt(aa,"sizingGroup"),Ol=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Pl=mt((e,t)=>{var r=t.havingSize(e.size);return aa(e.body,r,t)},"htmlBuilder"),o({type:"sizing",names:Ol,props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{breakOnTokenText:e,funcName:r,parser:i}=e,e=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:Ol.indexOf(r)+1,body:e}},"handler"),htmlBuilder:Pl,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=yo(e.body,t),(e=new C.MathNode("mstyle",e)).setAttribute("mathsize",K(t.sizeMultiplier)),e),"mathmlBuilder")}),o({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:mt((e,t,r)=>{var e=e.parser,i=!1,n=!1,a=r[0]&&Gn(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[ho(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var i=0;i(t=new C.MathNode("mpadded",[bo(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t),"mathmlBuilder")}),o({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){0===(r=ho(e.body,t.havingCrampedStyle())).height&&(r.height=t.fontMetrics().xHeight);var r=Z.wrapFragment(r,t),i=n=t.fontMetrics().defaultRuleThickness,i=n+(t.style.idr.height+r.depth+i&&(i=(i+o-r.height-r.depth)/2),n.height-r.height-i-a),i=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:n},{type:"kern",size:a}]},t));return e.index?(s=t.havingStyle(wa.SCRIPTSCRIPT),r=ho(e.index,s,t),o=.6*(i.height-i.depth),n=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},t),a=Z.makeSpan(["root"],[n]),Z.makeSpan(["mord","sqrt"],[a,i],t)):Z.makeSpan(["mord","sqrt"],[i],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new C.MathNode("mroot",[bo(e,t),bo(r,t)]):new C.MathNode("msqrt",[bo(e,t)])}}),Bl={display:wa.DISPLAY,text:wa.TEXT,script:wa.SCRIPT,scriptscript:wa.SCRIPTSCRIPT},o({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:i}=e,e=i.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:r,body:e}},htmlBuilder(e,t){var r=Bl[e.style],r=t.havingStyle(r).withFont("");return aa(e.body,r,t)},mathmlBuilder(e,t){var r=Bl[e.style],t=t.havingStyle(r),r=yo(e.body,t),t=new C.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),$l=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===wa.DISPLAY.size||r.alwaysHandleSupSub)?Rl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===wa.DISPLAY.size||r.limits)?Dl:null:"accent"===r.type?pa.isCharacterBox(r.base)?Ao:null:"horizBrace"===r.type&&!e.sub===r.isOver?Cl:null:null},"htmlBuilderDelegate"),Fn({type:"supsub",htmlBuilder(e,t){if(a=$l(e,t))return a(e,t);var r,i,n,{base:a,sup:s,sub:o}=e,l=ho(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&pa.isCharacterBox(a),o=(s&&(n=t.havingStyle(t.style.sup()),r=ho(s,n,t),a||(h=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),i=ho(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),n=t.style===wa.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,t.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(i&&(o=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),l instanceof as||o)&&(s=K(-l.italic)),r&&i){h=Math.max(h,n,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),e=4*c.defaultRuleThickness,h-r.depth-(i.height-u){var e=new C.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),Fn({type:"tag",mathmlBuilder(e,t){return(e=new C.MathNode("mtable",[new C.MathNode("mtr",[jl(),new C.MathNode("mtd",[vo(e.body,t)]),jl(),new C.MathNode("mtd",[vo(e.tag,t)])])])).setAttribute("width","100%"),e}}),Wl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ul={"\\textbf":"textbf","\\textmd":"textmd"},Gl={"\\textit":"textit","\\textup":"textup"},Vl=mt((e,t)=>(e=e.font)?Wl[e]?t.withTextFontFamily(Wl[e]):Ul[e]?t.withTextFontWeight(Ul[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Gl[e]):t,"optionsWithFont"),o({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:Qs(t),font:r}},htmlBuilder(e,t){return t=Vl(e,t),e=no(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Vl(e,t),vo(e.body,t)}}),o({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=ho(e.body,t),r=Z.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:e}]},t);return Z.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new C.MathNode("mo",[new C.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new C.MathNode("munder",[bo(e.body,t),r])).setAttribute("accentunder","true"),e}}),o({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=ho(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new C.MathNode("mpadded",[bo(e.body,t)],["vcenter"])}}),o({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Yl(e),i=[],n=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Hl=Hs,Xl=new RegExp("[̀-ͯ]+$"),Kl=class{static{mt(this,"Lexer")}constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new oa("EOF",new sa(this,t,t));if(null===(i=this.tokenRegex.exec(e))||i.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new oa(e[t],new sa(this,t,t+1)));var r,i=i[6]||i[3]||(i[2]?"\\ ":" ");return 14===this.catcodes[i]?(-1===(r=e.indexOf(` `,this.tokenRegex.lastIndex))?(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=r+1,this.lex()):new oa(i,new sa(this,t,this.tokenRegex.lastIndex))}},Zl=class{static{mt(this,"Namespace")}constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e,t=this.undefStack.pop();for(e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;0{var n=e.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var a=n[0].text,s=e.isDefined(a);if(s&&!t)throw new X("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!s&&!r)throw new X("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");if(t=0,1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var o="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)o+=l.text,l=e.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);t=parseInt(o),n=e.consumeArg().tokens}return s&&i||e.macros.set(a,{tokens:n,numArgs:t}),""},"newcommand"),l("\\newcommand",e=>ec(e,!1,!0,!1)),l("\\renewcommand",e=>ec(e,!0,!1,!1)),l("\\providecommand",e=>ec(e,!0,!0,!0)),l("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),l("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),l("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Hl[r],us.math[r],us.text[r]),""}),l("\\bgroup","{"),l("\\egroup","}"),l("~","\\nobreakspace"),l("\\lq","`"),l("\\rq","'"),l("\\aa","\\r a"),l("\\AA","\\r A"),l("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),l("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),l("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),l("ℬ","\\mathscr{B}"),l("ℰ","\\mathscr{E}"),l("ℱ","\\mathscr{F}"),l("ℋ","\\mathscr{H}"),l("ℐ","\\mathscr{I}"),l("ℒ","\\mathscr{L}"),l("ℳ","\\mathscr{M}"),l("ℛ","\\mathscr{R}"),l("ℭ","\\mathfrak{C}"),l("ℌ","\\mathfrak{H}"),l("ℨ","\\mathfrak{Z}"),l("\\Bbbk","\\Bbb{k}"),l("·","\\cdotp"),l("\\llap","\\mathllap{\\textrm{#1}}"),l("\\rlap","\\mathrlap{\\textrm{#1}}"),l("\\clap","\\mathclap{\\textrm{#1}}"),l("\\mathstrut","\\vphantom{(}"),l("\\underbar","\\underline{\\text{#1}}"),l("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),l("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),l("\\ne","\\neq"),l("≠","\\neq"),l("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),l("∉","\\notin"),l("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),l("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),l("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),l("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),l("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),l("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),l("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),l("⟂","\\perp"),l("‼","\\mathclose{!\\mkern-0.8mu!}"),l("∌","\\notni"),l("⌜","\\ulcorner"),l("⌝","\\urcorner"),l("⌞","\\llcorner"),l("⌟","\\lrcorner"),l("©","\\copyright"),l("®","\\textregistered"),l("️","\\textregistered"),l("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),l("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),l("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),l("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),l("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),l("⋮","\\vdots"),l("\\varGamma","\\mathit{\\Gamma}"),l("\\varDelta","\\mathit{\\Delta}"),l("\\varTheta","\\mathit{\\Theta}"),l("\\varLambda","\\mathit{\\Lambda}"),l("\\varXi","\\mathit{\\Xi}"),l("\\varPi","\\mathit{\\Pi}"),l("\\varSigma","\\mathit{\\Sigma}"),l("\\varUpsilon","\\mathit{\\Upsilon}"),l("\\varPhi","\\mathit{\\Phi}"),l("\\varPsi","\\mathit{\\Psi}"),l("\\varOmega","\\mathit{\\Omega}"),l("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),l("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),l("\\boxed","\\fbox{$\\displaystyle{#1}$}"),l("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),l("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),l("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),l("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),l("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),tc={",":"\\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"},l("\\dots",function(e){var t="\\dotso";return(e=e.expandAfterFuture().text)in tc?t=tc[e]:("\\not"===e.slice(0,4)||e in us.math&&["bin","rel"].includes(us.math[e].group))&&(t="\\dotsb"),t}),rc={")":!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},l("\\dotso",function(e){return e.future().text in rc?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(e){return(e=e.future().text)in rc&&","!==e?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(e){return e.future().text in rc?"\\@cdots\\,":"\\@cdots"}),l("\\dotsb","\\cdots"),l("\\dotsm","\\cdots"),l("\\dotsi","\\!\\cdots"),l("\\dotsx","\\ldots\\,"),l("\\DOTSI","\\relax"),l("\\DOTSB","\\relax"),l("\\DOTSX","\\relax"),l("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),l("\\,","\\tmspace+{3mu}{.1667em}"),l("\\thinspace","\\,"),l("\\>","\\mskip{4mu}"),l("\\:","\\tmspace+{4mu}{.2222em}"),l("\\medspace","\\:"),l("\\;","\\tmspace+{5mu}{.2777em}"),l("\\thickspace","\\;"),l("\\!","\\tmspace-{3mu}{.1667em}"),l("\\negthinspace","\\!"),l("\\negmedspace","\\tmspace-{4mu}{.2222em}"),l("\\negthickspace","\\tmspace-{5mu}{.277em}"),l("\\enspace","\\kern.5em "),l("\\enskip","\\hskip.5em\\relax"),l("\\quad","\\hskip1em\\relax"),l("\\qquad","\\hskip2em\\relax"),l("\\tag","\\@ifstar\\tag@literal\\tag@paren"),l("\\tag@paren","\\tag@literal{({#1})}"),l("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),l("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),l("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),l("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),l("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),l("\\newline","\\\\\\relax"),l("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),l("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(ic=K($a["Main-Regular"][84][1]-.7*$a["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ic+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),l("\\hspace","\\@ifstar\\@hspacer\\@hspace"),l("\\@hspace","\\hskip #1\\relax"),l("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),l("\\ordinarycolon",":"),l("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),l("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),l("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),l("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),l("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),l("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),l("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),l("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),l("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),l("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),l("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),l("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),l("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),l("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),l("∷","\\dblcolon"),l("∹","\\eqcolon"),l("≔","\\coloneqq"),l("≕","\\eqqcolon"),l("⩴","\\Coloneqq"),l("\\ratio","\\vcentcolon"),l("\\coloncolon","\\dblcolon"),l("\\colonequals","\\coloneqq"),l("\\coloncolonequals","\\Coloneqq"),l("\\equalscolon","\\eqqcolon"),l("\\equalscoloncolon","\\Eqqcolon"),l("\\colonminus","\\coloneq"),l("\\coloncolonminus","\\Coloneq"),l("\\minuscolon","\\eqcolon"),l("\\minuscoloncolon","\\Eqcolon"),l("\\coloncolonapprox","\\Colonapprox"),l("\\coloncolonsim","\\Colonsim"),l("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),l("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),l("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),l("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),l("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),l("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),l("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),l("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),l("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),l("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),l("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),l("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),l("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),l("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),l("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),l("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),l("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),l("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),l("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),l("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),l("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),l("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),l("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),l("\\imath","\\html@mathml{\\@imath}{ı}"),l("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),l("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),l("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),l("⟦","\\llbracket"),l("⟧","\\rrbracket"),l("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),l("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),l("⦃","\\lBrace"),l("⦄","\\rBrace"),l("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),l("⦵","\\minuso"),l("\\darr","\\downarrow"),l("\\dArr","\\Downarrow"),l("\\Darr","\\Downarrow"),l("\\lang","\\langle"),l("\\rang","\\rangle"),l("\\uarr","\\uparrow"),l("\\uArr","\\Uparrow"),l("\\Uarr","\\Uparrow"),l("\\N","\\mathbb{N}"),l("\\R","\\mathbb{R}"),l("\\Z","\\mathbb{Z}"),l("\\alef","\\aleph"),l("\\alefsym","\\aleph"),l("\\Alpha","\\mathrm{A}"),l("\\Beta","\\mathrm{B}"),l("\\bull","\\bullet"),l("\\Chi","\\mathrm{X}"),l("\\clubs","\\clubsuit"),l("\\cnums","\\mathbb{C}"),l("\\Complex","\\mathbb{C}"),l("\\Dagger","\\ddagger"),l("\\diamonds","\\diamondsuit"),l("\\empty","\\emptyset"),l("\\Epsilon","\\mathrm{E}"),l("\\Eta","\\mathrm{H}"),l("\\exist","\\exists"),l("\\harr","\\leftrightarrow"),l("\\hArr","\\Leftrightarrow"),l("\\Harr","\\Leftrightarrow"),l("\\hearts","\\heartsuit"),l("\\image","\\Im"),l("\\infin","\\infty"),l("\\Iota","\\mathrm{I}"),l("\\isin","\\in"),l("\\Kappa","\\mathrm{K}"),l("\\larr","\\leftarrow"),l("\\lArr","\\Leftarrow"),l("\\Larr","\\Leftarrow"),l("\\lrarr","\\leftrightarrow"),l("\\lrArr","\\Leftrightarrow"),l("\\Lrarr","\\Leftrightarrow"),l("\\Mu","\\mathrm{M}"),l("\\natnums","\\mathbb{N}"),l("\\Nu","\\mathrm{N}"),l("\\Omicron","\\mathrm{O}"),l("\\plusmn","\\pm"),l("\\rarr","\\rightarrow"),l("\\rArr","\\Rightarrow"),l("\\Rarr","\\Rightarrow"),l("\\real","\\Re"),l("\\reals","\\mathbb{R}"),l("\\Reals","\\mathbb{R}"),l("\\Rho","\\mathrm{P}"),l("\\sdot","\\cdot"),l("\\sect","\\S"),l("\\spades","\\spadesuit"),l("\\sub","\\subset"),l("\\sube","\\subseteq"),l("\\supe","\\supseteq"),l("\\Tau","\\mathrm{T}"),l("\\thetasym","\\vartheta"),l("\\weierp","\\wp"),l("\\Zeta","\\mathrm{Z}"),l("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),l("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),l("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),l("\\bra","\\mathinner{\\langle{#1}|}"),l("\\ket","\\mathinner{|{#1}\\rangle}"),l("\\braket","\\mathinner{\\langle{#1}\\rangle}"),l("\\Bra","\\left\\langle#1\\right|"),l("\\Ket","\\left|#1\\right\\rangle"),l("\\bra@ket",(nc=mt(l=>e=>{var t=e.consumeArg().tokens,i=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,a=e.macros.get("|"),s=e.macros.get("\\|"),o=(e.macros.beginGroup(),mt(r=>e=>{l&&(e.macros.set("|",a),n.length)&&e.macros.set("\\|",s);var t=r;return!r&&n.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?n:i,numArgs:0}},"midMacro")),o=(e.macros.set("|",o(!1)),n.length&&e.macros.set("\\|",o(!0)),e.consumeArg().tokens),r=e.expandTokens([...r,...o,...t]);return e.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),l("\\bra@set",nc(!0)),l("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),l("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),l("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),l("\\angln","{\\angl n}"),l("\\blue","\\textcolor{##6495ed}{#1}"),l("\\orange","\\textcolor{##ffa500}{#1}"),l("\\pink","\\textcolor{##ff00af}{#1}"),l("\\red","\\textcolor{##df0030}{#1}"),l("\\green","\\textcolor{##28ae7b}{#1}"),l("\\gray","\\textcolor{gray}{#1}"),l("\\purple","\\textcolor{##9d38bd}{#1}"),l("\\blueA","\\textcolor{##ccfaff}{#1}"),l("\\blueB","\\textcolor{##80f6ff}{#1}"),l("\\blueC","\\textcolor{##63d9ea}{#1}"),l("\\blueD","\\textcolor{##11accd}{#1}"),l("\\blueE","\\textcolor{##0c7f99}{#1}"),l("\\tealA","\\textcolor{##94fff5}{#1}"),l("\\tealB","\\textcolor{##26edd5}{#1}"),l("\\tealC","\\textcolor{##01d1c1}{#1}"),l("\\tealD","\\textcolor{##01a995}{#1}"),l("\\tealE","\\textcolor{##208170}{#1}"),l("\\greenA","\\textcolor{##b6ffb0}{#1}"),l("\\greenB","\\textcolor{##8af281}{#1}"),l("\\greenC","\\textcolor{##74cf70}{#1}"),l("\\greenD","\\textcolor{##1fab54}{#1}"),l("\\greenE","\\textcolor{##0d923f}{#1}"),l("\\goldA","\\textcolor{##ffd0a9}{#1}"),l("\\goldB","\\textcolor{##ffbb71}{#1}"),l("\\goldC","\\textcolor{##ff9c39}{#1}"),l("\\goldD","\\textcolor{##e07d10}{#1}"),l("\\goldE","\\textcolor{##a75a05}{#1}"),l("\\redA","\\textcolor{##fca9a9}{#1}"),l("\\redB","\\textcolor{##ff8482}{#1}"),l("\\redC","\\textcolor{##f9685d}{#1}"),l("\\redD","\\textcolor{##e84d39}{#1}"),l("\\redE","\\textcolor{##bc2612}{#1}"),l("\\maroonA","\\textcolor{##ffbde0}{#1}"),l("\\maroonB","\\textcolor{##ff92c6}{#1}"),l("\\maroonC","\\textcolor{##ed5fa6}{#1}"),l("\\maroonD","\\textcolor{##ca337c}{#1}"),l("\\maroonE","\\textcolor{##9e034e}{#1}"),l("\\purpleA","\\textcolor{##ddd7ff}{#1}"),l("\\purpleB","\\textcolor{##c6b9fc}{#1}"),l("\\purpleC","\\textcolor{##aa87ff}{#1}"),l("\\purpleD","\\textcolor{##7854ab}{#1}"),l("\\purpleE","\\textcolor{##543b78}{#1}"),l("\\mintA","\\textcolor{##f5f9e8}{#1}"),l("\\mintB","\\textcolor{##edf2df}{#1}"),l("\\mintC","\\textcolor{##e0e5cc}{#1}"),l("\\grayA","\\textcolor{##f6f7f7}{#1}"),l("\\grayB","\\textcolor{##f0f1f2}{#1}"),l("\\grayC","\\textcolor{##e3e5e6}{#1}"),l("\\grayD","\\textcolor{##d6d8da}{#1}"),l("\\grayE","\\textcolor{##babec2}{#1}"),l("\\grayF","\\textcolor{##888d93}{#1}"),l("\\grayG","\\textcolor{##626569}{#1}"),l("\\grayH","\\textcolor{##3b3e40}{#1}"),l("\\grayI","\\textcolor{##21242c}{#1}"),l("\\kaBlue","\\textcolor{##314453}{#1}"),l("\\kaGreen","\\textcolor{##71B307}{#1}"),ac={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},sc=class{static{mt(this,"MacroExpander")}constructor(e,t,r){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=t,this.expansionCount=0,this.feed(e),this.macros=new Zl(Ql,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Kl(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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 t,r,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:t,end:r}=this.consumeArg());return this.pushToken(new oa("EOF",r.loc)),this.pushTokens(i),new oa("",sa.range(t,r))}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],i=e&&0this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,i=t.noexpand?null:this._getExpansion(r);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(n=n.slice()).length-1;0<=s;--s){var o=n[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);n.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new oa(e)]):void 0}expandTokens(e){var t,r=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)!1===this.expandOnce(!0)&&((t=this.stack.pop()).treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),r.push(t));return this.countExpansion(r.length),r}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1!==e.length||null==(e=this.lexer.catcodes[e])||13===e){if("string"!=typeof(e="function"==typeof t?t(this):t))return e;var r=0;if(-1!==e.indexOf("#"))for(var i=e.replace(/##/g,"");-1!==i.indexOf("#"+(r+1));)++r;for(var n=new Kl(e,this.settings),a=[],s=n.lex();"EOF"!==s.text;)a.push(s),s=n.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(e){return this.macros.has(e)||Hl.hasOwnProperty(e)||us.math.hasOwnProperty(e)||us.text.hasOwnProperty(e)||ac.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Hl.hasOwnProperty(e)&&!Hl[e].primitive}},oc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,lc=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),cc={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},hc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(uc=class a{static{mt(this,"Parser")}constructor(e,t){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 sc(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new X("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(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 t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new oa("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==a.endOfExpression.indexOf(i.text)||t&&i.text===t||e&&Hl[i.text]&&Hl[i.text].infix)break;if(!(i=this.parseAtom(t)))break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r,i,n=-1,a=0;a{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),_n.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target"))&&e.setAttribute("rel","noopener")})}var Cc,Sc,Ec,_c,Ac,Rc,Lc,Ic,Nc,Dc,Mc,Oc,Pc,Bc,$c,Fc,zc,qc,jc,Wc,Uc,Gc,Vc,Yc,I,Hc,Xc,Kc,Zc,Qc,Jc,eh,th=r(()=>{An(),wi(),Cc=//gi,Sc=mt(e=>e?Mc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ec=(()=>{let e=!1;return()=>{e||(wc(),e=!0)}})(),mt(wc,"setupDompurifyHooks"),_c=mt(e=>(Ec(),_n.sanitize(e)),"removeScript"),Ac=mt((e,t)=>(_r(t)&&("antiscript"===(t=t.securityLevel)||"strict"===t||"sandbox"===t?e=_c(e):"loose"!==t&&(e=(e=(e=Mc(e)).replace(//g,">")).replace(/=/g,"="),e=Dc(e))),e),"sanitizeMore"),Rc=mt((e,t)=>e&&(t.dompurifyConfig?_n.sanitize(Ac(e,t),t.dompurifyConfig):_n.sanitize(Ac(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Lc=mt((e,t)=>"string"==typeof e?Rc(e,t):e.flat().map(e=>Rc(e,t)),"sanitizeTextOrArray"),Ic=mt(e=>Cc.test(e),"hasBreaks"),Nc=mt(e=>e.split(Cc),"splitBreaks"),Dc=mt(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),Mc=mt(e=>e.replace(Cc,"#br#"),"breakToPlaceholder"),Oc=mt(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Pc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),Bc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),$c=mt(function(e){var r,i,n=e.split(/(,)/),a=[];for(let t=0;tMath.max(0,e.split(t).length-1),"countOccurrence"),zc=mt((e,t)=>(e=Fc(e,"~"),t=Fc(t,"~"),1===e&&1===t),"shouldCombineSets"),qc=mt(e=>{let t=Fc(e,"~"),r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let i=[...e],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),jc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Wc=/\$\$(.*)\$\$/g,Uc=mt(e=>0<(e.match(Wc)?.length??0),"hasKatex"),Gc=mt(async(e,t)=>{var r=document.createElement("div"),e=(r.innerHTML=await Yc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r),{width:r.clientWidth,height:r.clientHeight});return r.remove(),e},"calculateMathMLDimensions"),Vc=mt(async(e,t)=>{if(!Uc(e))return e;if(!(jc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Wc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(kc(),Rn))).default,i=t.forceLegacyMathML||!jc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Cc).map(e=>Uc(e)?`
${e}
`:`
${e}
`).join("").replace(Wc,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Yc=mt(async(e,t)=>Rc(await Vc(e,t),t),"renderKatexSanitized"),I={getRows:Sc,sanitizeText:Rc,sanitizeTextOrArray:Lc,hasBreaks:Ic,splitBreaks:Nc,lineBreakRegex:Cc,removeScript:_c,getUrl:Oc,evaluate:or,getMax:Pc,getMin:Bc}}),rh=r(()=>{Rr(),wi(),th(),e(),Hc={body:'?',height:80,width:80},Xc=new Map,Kc=new Map,Zc=mt(e=>{for(var t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(P.debug("Registering icon pack:",t.name),"loader"in t)Kc.set(t.name,t.loader);else{if(!("icons"in t))throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Xc.set(t.name,t.icons)}}},"registerIconPacks"),Qc=mt(async(e,t)=>{var r=w(e,!0,void 0!==t);if(!r)throw new Error("Invalid icon name: "+e);if(!(t=r.prefix||t))throw new Error("Icon name must contain a prefix: "+e);let i=Xc.get(t);if(!i){var n=Kc.get(t);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:t},Xc.set(t,i)}catch(e){throw P.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(n=ae(i,r.name))return n;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),Jc=mt(async e=>{try{return await Qc(e),!0}catch{return!1}},"isIconAvailable"),eh=mt(async(e,t,r)=>{let i;try{i=await Qc(e,t?.fallbackPrefix)}catch(e){P.error(e),i=Hc}return t=Ce(be((e=me(i,t)).body),{...e.attributes,...r}),Rc(t,vr())},"getIconSVG")});function ih(e){for(var t=[],r=1;r{mt(ih,"dedent")}),xh=r(()=>{nh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,ah=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sh=/\s*%%.*\n/gm}),Th=r(()=>{oh=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),kh=r(()=>{e(),xh(),Th(),lh={},ch=mt(function(e,t){e=e.replace(nh,"").replace(ah,"").replace(sh,` `);for(var[r,{detector:i}]of Object.entries(lh))if(i(e,t))return r;throw new oh("No diagram type detected matching given configuration for text: "+e)},"detectType"),hh=mt((...e)=>{for(var{id:t,detector:r,loader:i}of e)uh(t,r,i)},"registerLazyLoadedDiagrams"),uh=mt((e,t,r)=>{lh[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),lh[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),dh=mt(e=>lh[e].loader,"getDiagramLoader")}),wh=r(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,24],r=[1,25],$=[1,26],F=[1,27],z=[1,28],i=[1,63],n=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],b=[1,37],x=[1,38],T=[1,39],k=[1,40],w=[1,41],C=[1,42],S=[1,43],E=[1,44],_=[1,45],A=[1,46],R=[1,47],L=[1,48],I=[1,50],q=[1,51],j=[1,52],W=[1,53],U=[1,54],G=[1,55],V=[1,56],Y=[1,57],H=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[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],J=[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],N=[1,82],D=[1,83],M=[1,84],O=[1,85],P=[12,14,42],ee=[12,14,33,42],te=[12,14,33,42,76,77,79,80],re=[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],t={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:i.setDirection("TB");break;case 4:i.setDirection("BT");break;case 5:i.setDirection("RL");break;case 6:i.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:i.setC4Type(a[o-3]);break;case 19:i.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:i.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),i.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),i.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:i.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:i.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:i.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:i.popBoundaryParseStack();break;case 39:i.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:i.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:i.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:i.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:i.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:i.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:i.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:i.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:i.addContainer("container",...a[o]),this.$=a[o];break;case 48:i.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:i.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:i.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:i.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:i.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:i.addComponent("component",...a[o]),this.$=a[o];break;case 54:i.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:i.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:i.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:i.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:i.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:i.addRel("rel",...a[o]),this.$=a[o];break;case 61:i.addRel("birel",...a[o]),this.$=a[o];break;case 62:i.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:i.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:i.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:i.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:i.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),i.addRel("rel",...a[o]),this.$=a[o];break;case 68:i.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:i.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:i.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"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:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K},{13:70,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K},{13:71,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K},{13:72,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K},{13:73,19:20,20:21,21:22,22:t,23:r,24:$,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K},{14:[1,74]},e(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K}),e(Z,[2,14]),e(Q,[2,16],{12:[1,76]}),e(Z,[2,36],{12:[1,77]}),e(J,[2,19]),e(J,[2,20]),{25:[1,78]},{27:[1,79]},e(J,[2,23]),{35:80,75:81,76:N,77:D,79:M,80:O},{35:86,75:81,76:N,77:D,79:M,80:O},{35:87,75:81,76:N,77:D,79:M,80:O},{35:88,75:81,76:N,77:D,79:M,80:O},{35:89,75:81,76:N,77:D,79:M,80:O},{35:90,75:81,76:N,77:D,79:M,80:O},{35:91,75:81,76:N,77:D,79:M,80:O},{35:92,75:81,76:N,77:D,79:M,80:O},{35:93,75:81,76:N,77:D,79:M,80:O},{35:94,75:81,76:N,77:D,79:M,80:O},{35:95,75:81,76:N,77:D,79:M,80:O},{35:96,75:81,76:N,77:D,79:M,80:O},{35:97,75:81,76:N,77:D,79:M,80:O},{35:98,75:81,76:N,77:D,79:M,80:O},{35:99,75:81,76:N,77:D,79:M,80:O},{35:100,75:81,76:N,77:D,79:M,80:O},{35:101,75:81,76:N,77:D,79:M,80:O},{35:102,75:81,76:N,77:D,79:M,80:O},{35:103,75:81,76:N,77:D,79:M,80:O},{35:104,75:81,76:N,77:D,79:M,80:O},e(P,[2,59]),{35:105,75:81,76:N,77:D,79:M,80:O},{35:106,75:81,76:N,77:D,79:M,80:O},{35:107,75:81,76:N,77:D,79:M,80:O},{35:108,75:81,76:N,77:D,79:M,80:O},{35:109,75:81,76:N,77:D,79:M,80:O},{35:110,75:81,76:N,77:D,79:M,80:O},{35:111,75:81,76:N,77:D,79:M,80:O},{35:112,75:81,76:N,77:D,79:M,80:O},{35:113,75:81,76:N,77:D,79:M,80:O},{35:114,75:81,76:N,77:D,79:M,80:O},{35:115,75:81,76:N,77:D,79:M,80:O},{20:116,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:N,77:D,79:M,80:O},{35:120,75:81,76:N,77:D,79:M,80:O},{35:121,75:81,76:N,77:D,79:M,80:O},{35:122,75:81,76:N,77:D,79:M,80:O},{35:123,75:81,76:N,77:D,79:M,80:O},{35:124,75:81,76:N,77:D,79:M,80:O},{35:125,75:81,76:N,77:D,79:M,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Z,[2,15]),e(Q,[2,17],{21:22,19:130,22:t,23:r,24:$,26:F,28:z}),e(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:$,26:F,28:z,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:k,56:w,57:C,58:S,59:E,60:_,61:A,62:R,63:L,64:I,65:q,66:j,67:W,68:U,69:G,70:V,71:Y,72:H,73:X,74:K}),e(J,[2,21]),e(J,[2,22]),e(P,[2,39]),e(ee,[2,71],{75:81,35:132,76:N,77:D,79:M,80:O}),e(te,[2,73]),{78:[1,133]},e(te,[2,75]),e(te,[2,76]),e(P,[2,40]),e(P,[2,41]),e(P,[2,42]),e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),e(P,[2,46]),e(P,[2,47]),e(P,[2,48]),e(P,[2,49]),e(P,[2,50]),e(P,[2,51]),e(P,[2,52]),e(P,[2,53]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(P,[2,58]),e(P,[2,60]),e(P,[2,61]),e(P,[2,62]),e(P,[2,63]),e(P,[2,64]),e(P,[2,65]),e(P,[2,66]),e(P,[2,67]),e(P,[2,68]),e(P,[2,69]),e(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(re,[2,28]),e(re,[2,29]),e(re,[2,30]),e(re,[2,31]),e(re,[2,32]),e(re,[2,33]),e(re,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Q,[2,18]),e(Z,[2,38]),e(ee,[2,72]),e(te,[2,74]),e(P,[2,24]),e(P,[2,35]),e(ie,[2,25]),e(ie,[2,26],{12:[1,138]}),e(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:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{e(),fh=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),mh=mt(function(e,t,r){var i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),yh=mt(function(e,t,r,i){t=mh(t,r,i),fh(e,t)},"configureSvgSize"),vh=mt(function(e,t,r,i){var n=t.node().getBBox(),a=n.width,s=(P.info(`SVG bounds: ${a}x`+(s=n.height),n),P.info("Graph bounds: 0x0",e),P.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),yh(t,a,e,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")});function Sh(e){return[...e.cssRules].map(e=>e.cssText).join(` `)}var Eh,_h,Ah,Rh,Lh=r(()=>{e(),Eh={},mt(Sh,"cssStyleSheetToString"),_h=mt((e,t,r,i)=>{let n="";return e in Eh&&Eh[e]?n=Eh[e]({...r,svgId:i}):P.warn("No theme found for "+e),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* Classes common for multiple diagrams */ & .error-icon { fill: ${r.errorBkgColor}; } & .error-text { fill: ${r.errorTextColor}; stroke: ${r.errorTextColor}; } & .edge-thickness-normal { stroke-width: ${r.strokeWidth??1}px; } & .edge-thickness-thick { stroke-width: 3.5px } & .edge-pattern-solid { stroke-dasharray: 0; } & .edge-thickness-invisible { stroke-width: 0; fill: none; } & .edge-pattern-dashed{ stroke-dasharray: 3; } .edge-pattern-dotted { stroke-dasharray: 2; } & .marker { fill: ${r.lineColor}; stroke: ${r.lineColor}; } & .marker.cross { stroke: ${r.lineColor}; } & svg { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; } & p { margin: 0 } ${n} .node .neo-node { stroke: ${r.nodeBorder}; } [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].node path { stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; stroke-width: ${r.strokeWidth??1}px; } [data-look="neo"].node .outer-path { filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].node .neo-line path { stroke: ${r.nodeBorder}; filter: none; } [data-look="neo"].node circle{ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].node circle .state-start{ fill: #000000; } [data-look="neo"].icon-shape .icon { fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } [data-look="neo"].icon-shape .icon-neo path { stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; } ${t} `},"getStyles"),Ah=mt((e,t)=>{void 0!==t&&(Eh[e]=t)},"addStylesForDiagram"),Rh=_h}),Ih={};Vat(Ih,{clear:()=>Ph,getAccDescription:()=>zh,getAccTitle:()=>$h,getDiagramTitle:()=>jh,setAccDescription:()=>Fh,setAccTitle:()=>Bh,setDiagramTitle:()=>qh});var Nh,Dh,Mh,Oh,Ph,Bh,$h,Fh,zh,qh,jh,Wh,Uh,B,Gh,Vh,Yh,Hh,Xh,Kh,Zh,Qh,Jh,eu,tu,ru,iu,nu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu,mu,yu,vu,bu,xu,Tu,ku,wu,Cu,Su,Eu,_u,Au,Ru,Lu,Iu,Nu,Du,Mu,Ou,Pu,Bu,$u,Fu,zu,qu,ju,Wu=r(()=>{th(),wi(),Mh=Dh=Nh="",Oh=mt(e=>Rc(e,vr()),"sanitizeText"),Ph=mt(()=>{Dh=Mh=Nh=""},"clear"),Bh=mt(e=>{Nh=Oh(e).replace(/^\s+/g,"")},"setAccTitle"),$h=mt(()=>Nh,"getAccTitle"),Fh=mt(e=>{Mh=Oh(e).replace(/\n\s+/g,` `)},"setAccDescription"),zh=mt(()=>Mh,"getAccDescription"),qh=mt(e=>{Dh=Oh(e)},"setDiagramTitle"),jh=mt(()=>Dh,"getDiagramTitle")}),Uu=r(()=>{kh(),e(),wi(),th(),Ch(),Lh(),Wu(),Wh=P,Uh=Re,B=vr,Gh=yr,Vh=sr,Yh=mt(e=>Rc(e,B()),"sanitizeText"),Hh=vh,Xh=mt(()=>Ih,"getCommonDb"),Kh={},Zh=mt((e,t,r)=>{Kh[e]&&Wh.warn(`Diagram with id ${e} already registered. Overwriting.`),Kh[e]=t,r&&uh(e,r),Ah(e,t.styles),t.injectUtils?.(Wh,Uh,B,Yh,Hh,Xh(),()=>{})},"registerDiagram"),Qh=mt(e=>{if(e in Kh)return Kh[e];throw new Jh(e)},"getDiagram"),Jh=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Gu=r(()=>{Uu(),th(),Wu(),eu=[],tu=[""],nu=[{alias:ru="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:iu=""}],su="",ou=!(au=[]),lu=4,cu=2,uu=mt(function(){return hu},"getC4Type"),du=mt(function(e){hu=Rc(e,B())},"setC4Type"),pu=mt(function(r,i,n,a,s,o,l,c,h){if(null!=r&&null!=i&&null!=n&&null!=a){let e={},t=au.find(e=>e.from===i&&e.to===n);t?e=t:au.push(e),e.type=r,e.from=i,e.to=n,e.label={text:a},null==s?e.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],e[r]={text:a}):e.techn={text:s},null==o?e.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],e[r]={text:a}):e.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],e[s]=r):e.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],e[a]=o):e.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],e[s]=r):e.link=h,e.wrap=Pu()}},"addRel"),gu=mt(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let e={},t=eu.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,eu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.descr={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.descr={text:a},"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]=c):e.sprite=s,"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=ru,e.wrap=Pu()}},"addPersonOrSystem"),fu=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=eu.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,eu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],e[n]={text:h}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],e[a]=n):e.link=c,e.wrap=Pu(),e.typeC4Shape={text:r},e.parentBoundary=ru}},"addContainer"),mu=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=eu.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,eu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],e[n]={text:h}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],e[a]=n):e.link=c,e.wrap=Pu(),e.typeC4Shape={text:r},e.parentBoundary=ru}},"addComponent"),yu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=nu.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,nu.push(e)),e.label=null==i?{text:""}:{text:i},null==n?e.type={text:"system"}:"object"==typeof n?([i,o]=Object.entries(n)[0],e[i]={text:o}):e.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],e[i]=o):e.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],e[n]=i):e.link=s,e.parentBoundary=ru,e.wrap=Pu(),iu=ru,ru=r,tu.push(iu)}},"addPersonOrSystemBoundary"),vu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=nu.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,nu.push(e)),e.label=null==i?{text:""}:{text:i},null==n?e.type={text:"container"}:"object"==typeof n?([i,o]=Object.entries(n)[0],e[i]={text:o}):e.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],e[i]=o):e.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],e[n]=i):e.link=s,e.parentBoundary=ru,e.wrap=Pu(),iu=ru,ru=r,tu.push(iu)}},"addContainerBoundary"),bu=mt(function(r,i,n,a,s,e,o,l){if(null!==i&&null!==n){let e={},t=nu.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,nu.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.type={text:"node"}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.type={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]={text:c}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.nodeType=r,e.parentBoundary=ru,e.wrap=Pu(),iu=ru,ru=i,tu.push(iu)}},"addDeploymentNode"),xu=mt(function(){ru=iu,tu.pop(),iu=tu.pop(),tu.push(iu)},"popBoundaryParseStack"),Tu=mt(function(e,t,r,i,n,a,s,o,l,c,h){let u=eu.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=nu.find(e=>e.alias===t))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=i&&("object"==typeof i?([p,d]=Object.entries(i)[0],u[p]=d):u.fontColor=i),null!=n&&("object"==typeof n?([r,p]=Object.entries(n)[0],u[r]=p):u.borderColor=n),null!=a&&("object"==typeof a?([d,i]=Object.entries(a)[0],u[d]=i):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([n,d]=Object.entries(o)[0],u[n]=d):u.sprite=o),null!=l&&("object"==typeof l?([i,a]=Object.entries(l)[0],u[i]=a):u.techn=l),null!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,n]=Object.entries(h)[0],u[s]=n):u.legendSprite=h))},"updateElStyle"),ku=mt(function(e,t,r,i,n,a,s){var o,l,c=au.find(e=>e.from===t&&e.to===r);void 0!==c&&(null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.textColor=i),null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.lineColor=n),null!=a&&("object"==typeof a?([i,o]=Object.entries(a)[0],c[i]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,n]=Object.entries(s)[0],c[l]=parseInt(n)):c.offsetY=parseInt(s))},"updateRelStyle"),wu=mt(function(e,t,r){var t="object"==typeof t?(i=Object.values(t)[0],parseInt(i)):parseInt(t),i="object"==typeof r?(i=Object.values(r)[0],parseInt(i)):parseInt(r);1<=t&&(lu=t),1<=i&&(cu=i)},"updateLayoutConfig"),Cu=mt(function(){return lu},"getC4ShapeInRow"),Su=mt(function(){return cu},"getC4BoundaryInRow"),Eu=mt(function(){return ru},"getCurrentBoundaryParse"),_u=mt(function(){return iu},"getParentBoundaryParse"),Au=mt(function(t){return null==t?eu:eu.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),Ru=mt(function(t){return eu.find(e=>e.alias===t)},"getC4Shape"),Lu=mt(function(e){return Object.keys(Au(e))},"getC4ShapeKeys"),Iu=mt(function(t){return null==t?nu:nu.filter(e=>e.parentBoundary===t)},"getBoundaries"),Nu=Iu,Du=mt(function(){return au},"getRels"),Mu=mt(function(){return su},"getTitle"),Ou=mt(function(e){ou=e},"setWrap"),Pu=mt(function(){return ou},"autoWrap"),Bu=mt(function(){eu=[],nu=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ru="global",tu=[iu=""],tu=[su=""],ou=!(au=[]),lu=4,cu=2},"clear"),$u={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},Fu={FILLED:0,OPEN:1},zu={LEFTOF:0,RIGHTOF:1,OVER:2},qu=mt(function(e){su=Rc(e,B())},"setTitle"),ju={addPersonOrSystem:gu,addPersonOrSystemBoundary:yu,addContainer:fu,addContainerBoundary:vu,addComponent:mu,addDeploymentNode:bu,popBoundaryParseStack:xu,addRel:pu,updateElStyle:Tu,updateRelStyle:ku,updateLayoutConfig:wu,autoWrap:Pu,setWrap:Ou,getC4ShapeArray:Au,getC4Shape:Ru,getC4ShapeKeys:Lu,getBoundaries:Iu,getBoundarys:Nu,getCurrentBoundaryParse:Eu,getParentBoundaryParse:_u,getRels:Du,getTitle:Mu,getC4Type:uu,getC4ShapeInRow:Cu,getC4BoundaryInRow:Su,setAccTitle:Bh,getAccTitle:$h,getAccDescription:zh,setAccDescription:Fh,getConfig:mt(()=>B().c4,"getConfig"),clear:Bu,LINETYPE:$u,ARROWTYPE:Fu,PLACEMENT:zu,setTitle:qu,setC4Type:du}});function Vu(e,t){return null==e||null==t?NaN:e{mt(Vu,"ascending")});function Hu(e,t){return null==e||null==t?NaN:t{mt(Hu,"descending")});function Ku(r){let a,s,n;function o(e,t,r=0,i=e.length){if(r>>1}while(s(e[n],t)<0?r=1+n:i=n,r>>1}while(s(e[n],t)<=0?r=1+n:i=n,r-n(e[i],t)?i-1:i}return n=2!==r.length?(a=Vu,s=mt((e,t)=>Vu(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Vu||r===Hu?r:Zu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Zu(){return 0}var Qu=r(()=>{Yu(),Xu(),mt(Ku,"bisector"),mt(Zu,"zero")});function Ju(e){return null===e?NaN:+e}var ed,td,rd=r(()=>{mt(Ju,"number")}),id=r(()=>{Yu(),Qu(),rd(),ed=Ku(Vu).right,Ku(Ju).center,td=ed});function nd({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function ad({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function sd({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function od(e){return null!==e&&"object"==typeof e?e.valueOf():e}var ld,cd=r(()=>{ld=class extends Map{static{mt(this,"InternMap")}constructor(e,t=od){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(var[r,i]of e)this.set(r,i)}get(e){return super.get(nd(this,e))}has(e){return super.has(nd(this,e))}set(e,t){return super.set(ad(this,e),t)}delete(e){return super.delete(sd(this,e))}},mt(nd,"intern_get"),mt(ad,"intern_set"),mt(sd,"intern_delete"),mt(od,"keyof")});function hd(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=gd<=a?10:fd<=a?5:md<=a?2:1,o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l{gd=Math.sqrt(50),fd=Math.sqrt(10),md=Math.sqrt(2),mt(hd,"tickSpec"),mt(ud,"ticks"),mt(dd,"tickIncrement"),mt(pd,"tickStep")});function vd(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i{mt(vd,"max")});function xd(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i>e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var Td=r(()=>{mt(xd,"min")});function kd(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(n);++i{mt(kd,"range")}),Cd=r(()=>{id(),Qu(),bd(),Td(),wd(),yd(),cd()});function Sd(e){return e}var Ed=r(()=>{mt(Sd,"default")});function _d(e){return"translate("+e+",0)"}function Ad(e){return"translate(0,"+e+")"}function Rd(t){return e=>+t(e)}function Ld(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function Id(){return!this.__axis}function Nd(p,g){var f=[],m=null,y=null,v=6,b=6,x=3,T=typeof window<"u"&&1{Ed(),Od=1,Pd=3,mt(_d,"translateX"),mt(Ad,"translateY"),mt(Rd,"number"),mt(Ld,"center"),mt(Id,"entering"),mt(Nd,"axis"),mt(Dd,"axisTop"),mt(Md,"axisBottom")}),$d=r(()=>{Bd()});function Fd(){for(var e,t=0,r=arguments.length,i={};t{Ud={value:mt(()=>{},"value")},mt(Fd,"dispatch"),mt(zd,"Dispatch"),mt(qd,"parseTypenames"),zd.prototype=Fd.prototype={constructor:zd,on:mt(function(e,t){var r,i=this._,n=qd(e+"",i),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a{Hd()}),Kd=r(()=>{Yd={svg:"http://www.w3.org/2000/svg",xhtml:Vd="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Zd(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),Yd.hasOwnProperty(t)?{space:Yd[t],local:e}:e}var Qd=r(()=>{Kd(),mt(Zd,"default")});function Jd(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Vd&&e.documentElement.namespaceURI===Vd?e.createElement(r):e.createElementNS(t,r)}}function ep(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tp(e){return((e=Zd(e)).local?ep:Jd)(e)}var rp=r(()=>{Qd(),Kd(),mt(Jd,"creatorInherit"),mt(ep,"creatorFixed"),mt(tp,"default")});function ip(){}function np(e){return null==e?ip:function(){return this.querySelector(e)}}var ap=r(()=>{mt(ip,"none"),mt(np,"default")});function sp(e){"function"!=typeof e&&(e=np(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{$g(),ap(),mt(sp,"default")});function lp(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var cp=r(()=>{mt(lp,"array")});function hp(){return[]}function up(e){return null==e?hp:function(){return this.querySelectorAll(e)}}var dp=r(()=>{mt(hp,"empty"),mt(up,"default")});function pp(e){return function(){return lp(e.apply(this,arguments))}}function gp(e){e=("function"==typeof e?pp:up)(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a{$g(),cp(),dp(),mt(pp,"arrayAll"),mt(gp,"default")});function mp(e){return function(){return this.matches(e)}}function yp(t){return function(e){return e.matches(t)}}var vp=r(()=>{mt(mp,"default"),mt(yp,"childMatcher")});function bp(e){return function(){return kp.call(this.children,e)}}function xp(){return this.firstElementChild}function Tp(e){return this.select(null==e?xp:bp("function"==typeof e?e:yp(e)))}var kp,wp=r(()=>{vp(),kp=Array.prototype.find,mt(bp,"childFind"),mt(xp,"childFirst"),mt(Tp,"default")});function Cp(){return Array.from(this.children)}function Sp(e){return function(){return _p.call(this.children,e)}}function Ep(e){return this.selectAll(null==e?Cp:Sp("function"==typeof e?e:yp(e)))}var _p,Ap=r(()=>{vp(),_p=Array.prototype.filter,mt(Cp,"children"),mt(Sp,"childrenFilter"),mt(Ep,"default")});function Rp(e){"function"!=typeof e&&(e=mp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{$g(),vp(),mt(Rp,"default")});function Ip(e){return new Array(e.length)}var Np=r(()=>{mt(Ip,"default")});function Dp(){return new Dg(this._enter||this._groups.map(Ip),this._parents)}function Mp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Op=r(()=>{Np(),$g(),mt(Dp,"default"),mt(Mp,"EnterNode"),Mp.prototype={constructor:Mp,appendChild:mt(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:mt(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:mt(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:mt(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function Pp(e){return function(){return e}}var Bp=r(()=>{mt(Pp,"default")});function $p(e,t,r,i,n,a){for(var s,o=0,l=t.length,c=a.length;o{$g(),Op(),Bp(),mt($p,"bindIndex"),mt(Fp,"bindKey"),mt(zp,"datum"),mt(qp,"default"),mt(jp,"arraylike")});function Up(){return new Dg(this._exit||this._groups.map(Ip),this._parents)}var Gp=r(()=>{Np(),$g(),mt(Up,"default")});function Vp(e,t,r){var i=this.enter(),n=this,a=this.exit(),i="function"==typeof e?(i=e(i))&&i.selection():i.append(e+"");return null!=t&&(n=(n=t(n))&&n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n}var Yp=r(()=>{mt(Vp,"default")});function Hp(e){for(var e=e.selection?e.selection():e,t=this._groups,r=e._groups,i=t.length,e=r.length,n=Math.min(i,e),a=new Array(i),s=0;s{$g(),mt(Hp,"default")});function Kp(){for(var e=this._groups,t=-1,r=e.length;++t{mt(Kp,"default")});function Qp(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||Jp,mt(e,"compareNode");for(var t=this._groups,i=t.length,n=new Array(i),a=0;a{$g(),mt(Qp,"default"),mt(Jp,"ascending")});function t0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var r0=r(()=>{mt(t0,"default")});function i0(){return Array.from(this)}var n0=r(()=>{mt(i0,"default")});function a0(){for(var e=this._groups,t=0,r=e.length;t{mt(a0,"default")});function o0(){let e=0;for(var t of this)++e;return e}var l0=r(()=>{mt(o0,"default")});function c0(){return!this.node()}var h0=r(()=>{mt(c0,"default")});function u0(e){for(var t=this._groups,r=0,i=t.length;r{mt(u0,"default")});function p0(e){return function(){this.removeAttribute(e)}}function g0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function f0(e,t){return function(){this.setAttribute(e,t)}}function m0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function y0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function v0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function b0(e,t){var r,e=Zd(e);return arguments.length<2?(r=this.node(),e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)):this.each((null==t?e.local?g0:p0:"function"==typeof t?e.local?v0:y0:e.local?m0:f0)(e,t))}var x0=r(()=>{Qd(),mt(p0,"attrRemove"),mt(g0,"attrRemoveNS"),mt(f0,"attrConstant"),mt(m0,"attrConstantNS"),mt(y0,"attrFunction"),mt(v0,"attrFunctionNS"),mt(b0,"default")});function T0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var k0=r(()=>{mt(T0,"default")});function w0(e){return function(){this.style.removeProperty(e)}}function C0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function S0(t,r,i){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function E0(e,t,r){return 1{k0(),mt(w0,"styleRemove"),mt(C0,"styleConstant"),mt(S0,"styleFunction"),mt(E0,"default"),mt(_0,"styleValue")});function R0(e){return function(){delete this[e]}}function L0(e,t){return function(){this[e]=t}}function I0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function N0(e,t){return 1{mt(R0,"propertyRemove"),mt(L0,"propertyConstant"),mt(I0,"propertyFunction"),mt(N0,"default")});function M0(e){return e.trim().split(/^|\s+/)}function O0(e){return e.classList||new P0(e)}function P0(e){this._node=e,this._names=M0(e.getAttribute("class")||"")}function B0(e,t){for(var r=O0(e),i=-1,n=t.length;++i{mt(M0,"classArray"),mt(O0,"classList"),mt(P0,"ClassList"),P0.prototype={add:mt(function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:mt(function(e){0<=(e=this._names.indexOf(e))&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:mt(function(e){return 0<=this._names.indexOf(e)},"contains")},mt(B0,"classedAdd"),mt($0,"classedRemove"),mt(F0,"classedTrue"),mt(z0,"classedFalse"),mt(q0,"classedFunction"),mt(j0,"default")});function U0(){this.textContent=""}function G0(e){return function(){this.textContent=e}}function V0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Y0(e){return arguments.length?this.each(null==e?U0:("function"==typeof e?V0:G0)(e)):this.node().textContent}var H0=r(()=>{mt(U0,"textRemove"),mt(G0,"textConstant"),mt(V0,"textFunction"),mt(Y0,"default")});function X0(){this.innerHTML=""}function K0(e){return function(){this.innerHTML=e}}function Z0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Q0(e){return arguments.length?this.each(null==e?X0:("function"==typeof e?Z0:K0)(e)):this.node().innerHTML}var J0=r(()=>{mt(X0,"htmlRemove"),mt(K0,"htmlConstant"),mt(Z0,"htmlFunction"),mt(Q0,"default")});function eg(){this.nextSibling&&this.parentNode.appendChild(this)}function tg(){return this.each(eg)}var rg=r(()=>{mt(eg,"raise"),mt(tg,"default")});function ig(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ng(){return this.each(ig)}var ag=r(()=>{mt(ig,"lower"),mt(ng,"default")});function sg(e){var t="function"==typeof e?e:tp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var og=r(()=>{rp(),mt(sg,"default")});function lg(){return null}function cg(e,t){var r="function"==typeof e?e:tp(e),i=null==t?lg:"function"==typeof t?t:np(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var hg=r(()=>{rp(),ap(),mt(lg,"constantNull"),mt(cg,"default")});function ug(){var e=this.parentNode;e&&e.removeChild(this)}function dg(){return this.each(ug)}var pg=r(()=>{mt(ug,"remove"),mt(dg,"default")});function gg(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fg(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mg(e){return this.select(e?fg:gg)}var yg=r(()=>{mt(gg,"selection_cloneShallow"),mt(fg,"selection_cloneDeep"),mt(mg,"default")});function vg(e){return arguments.length?this.property("__data__",e):this.node().__data__}var bg=r(()=>{mt(vg,"default")});function xg(t){return function(e){t.call(this,e,this.__data__)}}function Tg(e){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return 0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function kg(a){return function(){var e=this.__on;if(e){for(var t,r=0,i=-1,n=e.length;r{mt(xg,"contextListener"),mt(Tg,"parseTypenames"),mt(kg,"onRemove"),mt(wg,"onAdd"),mt(Cg,"default")});function Eg(e,t,r){var i=T0(e),n=i.CustomEvent;"function"==typeof n?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function _g(e,t){return function(){return Eg(this,e,t)}}function Ag(e,t){return function(){return Eg(this,e,t.apply(this,arguments))}}function Rg(e,t){return this.each(("function"==typeof t?Ag:_g)(e,t))}var Lg=r(()=>{k0(),mt(Eg,"dispatchEvent"),mt(_g,"dispatchConstant"),mt(Ag,"dispatchFunction"),mt(Rg,"default")});function*Ig(){for(var e=this._groups,t=0,r=e.length;t{mt(Ig,"default")});function Dg(e,t){this._groups=e,this._parents=t}function Mg(){return new Dg([[document.documentElement]],Pg)}function Og(){return this}var Pg,Bg,$g=r(()=>{op(),fp(),wp(),Ap(),Lp(),Wp(),Op(),Gp(),Yp(),Xp(),Zp(),e0(),r0(),n0(),s0(),l0(),h0(),d0(),x0(),A0(),D0(),W0(),H0(),J0(),rg(),ag(),og(),hg(),pg(),yg(),bg(),Sg(),Lg(),Ng(),Pg=[null],mt(Dg,"Selection"),mt(Mg,"selection"),mt(Og,"selection_selection"),Dg.prototype=Mg.prototype={constructor:Dg,select:sp,selectAll:gp,selectChild:Tp,selectChildren:Ep,filter:Rp,data:qp,enter:Dp,exit:Up,join:Vp,merge:Hp,selection:Og,order:Kp,sort:Qp,call:t0,nodes:i0,node:a0,size:o0,empty:c0,each:u0,attr:b0,style:E0,property:N0,classed:j0,text:Y0,html:Q0,raise:tg,lower:ng,append:sg,insert:cg,remove:dg,clone:mg,datum:vg,on:Cg,dispatch:Rg,[Symbol.iterator]:Ig},Bg=Mg});function Q(e){return"string"==typeof e?new Dg([[document.querySelector(e)]],[document.documentElement]):new Dg([[e]],Pg)}var Fg=r(()=>{$g(),mt(Q,"default")}),zg=r(()=>{vp(),Qd(),Fg(),$g(),ap(),dp(),A0()}),qg=r(()=>{});function jg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function Wg(e,t){var r,i=Object.create(e.prototype);for(r in t)i[r]=t[r];return i}var Ug=r(()=>{mt(jg,"default"),mt(Wg,"extend")});function Gg(){}function Vg(){return this.rgb().formatHex()}function Yg(){return this.rgb().formatHex8()}function Hg(){return hf(this).formatHsl()}function Xg(){return this.rgb().formatRgb()}function Kg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bf.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Zg(t):3===r?new tf(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Qg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Qg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=xf.exec(e))?new tf(t[1],t[2],t[3],1):(t=Tf.exec(e))?new tf(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=kf.exec(e))?Qg(t[1],t[2],t[3],t[4]):(t=wf.exec(e))?Qg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Cf.exec(e))?cf(t[1],t[2]/100,t[3]/100,1):(t=Sf.exec(e))?cf(t[1],t[2]/100,t[3]/100,t[4]):Ef.hasOwnProperty(e)?Zg(Ef[e]):"transparent"===e?new tf(NaN,NaN,NaN,0):null}function Zg(e){return new tf(e>>16&255,e>>8&255,255&e,1)}function Qg(e,t,r,i){return new tf(e=i<=0?t=r=NaN:e,t,r,i)}function Jg(e){return(e=e instanceof Gg?e:Kg(e))?new tf((e=e.rgb()).r,e.g,e.b,e.opacity):new tf}function ef(e,t,r,i){return 1===arguments.length?Jg(e):new tf(e,t,r,i??1)}function tf(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function rf(){return"#"+lf(this.r)+lf(this.g)+lf(this.b)}function nf(){return"#"+lf(this.r)+lf(this.g)+lf(this.b)+lf(255*(isNaN(this.opacity)?1:this.opacity))}function af(){var e=sf(this.opacity);return(1===e?"rgb(":"rgba(")+of(this.r)+`, ${of(this.g)}, `+of(this.b)+(1===e?")":`, ${e})`)}function sf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function of(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lf(e){return((e=of(e))<16?"0":"")+e.toString(16)}function cf(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new df(e,t,r,i)}function hf(e){var t,r,i,n,a,s,o,l;return e instanceof df?new df(e.h,e.s,e.l,e.opacity):(e=e instanceof Gg?e:Kg(e))?e instanceof df?e:(t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=NaN,l=((a=Math.max(t,r,i))+n)/2,(o=a-n)?(s=t===a?(r-i)/o+6*(r{Ug(),mt(Gg,"Color"),mf="\\s*([+-]?\\d+)\\s*",yf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bf=/^#([0-9a-f]{3,8})$/,xf=new RegExp(`^rgb\\(${mf},${mf},${mf}\\)$`),Tf=new RegExp(`^rgb\\(${vf},${vf},${vf}\\)$`),kf=new RegExp(`^rgba\\(${mf},${mf},${mf},${yf}\\)$`),wf=new RegExp(`^rgba\\(${vf},${vf},${vf},${yf}\\)$`),Cf=new RegExp(`^hsl\\(${yf},${vf},${vf}\\)$`),Sf=new RegExp(`^hsla\\(${yf},${vf},${vf},${yf}\\)$`),Ef={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},jg(Gg,Kg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vg,formatHex:Vg,formatHex8:Yg,formatHsl:Hg,formatRgb:Xg,toString:Xg}),mt(Vg,"color_formatHex"),mt(Yg,"color_formatHex8"),mt(Hg,"color_formatHsl"),mt(Xg,"color_formatRgb"),mt(Kg,"color"),mt(Zg,"rgbn"),mt(Qg,"rgba"),mt(Jg,"rgbConvert"),mt(ef,"rgb"),mt(tf,"Rgb"),jg(tf,ef,Wg(Gg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new tf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new tf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tf(of(this.r),of(this.g),of(this.b),sf(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:rf,formatHex:rf,formatHex8:nf,formatRgb:af,toString:af})),mt(rf,"rgb_formatHex"),mt(nf,"rgb_formatHex8"),mt(af,"rgb_formatRgb"),mt(sf,"clampa"),mt(of,"clampi"),mt(lf,"hex"),mt(cf,"hsla"),mt(hf,"hslConvert"),mt(uf,"hsl"),mt(df,"Hsl"),jg(df,uf,Wg(Gg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new df(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new df(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l;return new tf(ff(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),ff(e,r,t),ff(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new df(pf(this.h),gf(this.s),gf(this.l),sf(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(){var e=sf(this.opacity);return(1===e?"hsl(":"hsla(")+pf(this.h)+`, ${100*gf(this.s)}%, ${100*gf(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(pf,"clamph"),mt(gf,"clampt"),mt(ff,"hsl2rgb")}),Lf=r(()=>{_f=Math.PI/180,Af=180/Math.PI});function If(e){var t,r,i,n,a,s;return e instanceof Df?new Df(e.l,e.a,e.b,e.opacity):e instanceof zf?qf(e):(n=Mf(.2225045*(t=Bf((e=e instanceof tf?e:Jg(e)).r))+.7168786*(r=Bf(e.g))+.0606169*(i=Bf(e.b))),t===r&&r===i?a=s=n:(a=Mf((.4360747*t+.3850649*r+.1430804*i)/.96422),s=Mf((.0139322*t+.0971045*r+.7141733*i)/.82521)),new Df(116*n-16,500*(a-n),200*(n-s),e.opacity))}function Nf(e,t,r,i){return 1===arguments.length?If(e):new Df(e,t,r,i??1)}function Df(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function Mf(e){return Gf{Ug(),Rf(),Lf(),jf=4/29,Uf=3*(Wf=6/29)*Wf,Gf=Wf*Wf*Wf,mt(If,"labConvert"),mt(Nf,"lab"),mt(Df,"Lab"),jg(Df,Nf,Wg(Gg,{brighter(e){return new Df(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new Df(this.l-18*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new tf(Pf(3.1338561*(t=.96422*Of(t))-1.6168667*(e=+Of(e))-.4906146*(r=.82521*Of(r))),Pf(-.9787684*t+1.9161415*e+.033454*r),Pf(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(Mf,"xyz2lab"),mt(Of,"lab2xyz"),mt(Pf,"lrgb2rgb"),mt(Bf,"rgb2lrgb"),mt($f,"hclConvert"),mt(Ff,"hcl"),mt(zf,"Hcl"),mt(qf,"hcl2lab"),jg(zf,Ff,Wg(Gg,{brighter(e){return new zf(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new zf(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return qf(this).rgb()}}))}),Yf=r(()=>{Rf(),Vf()});function Hf(e,t,r,i,n){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*i+s*n)/6}function Xf(s){var o=s.length-1;return function(e){var t=e<=0?e=0:1<=e?o-(e=1):Math.floor(e*o),r=s[t],i=s[t+1],n=0{mt(Hf,"basis"),mt(Xf,"default")});function Zf(i){var n=i.length;return function(e){var t=Math.floor(((e%=1)<0?++e:e)*n),r=i[(t+n-1)%n];return Hf((e-t/n)*n,r,i[t%n],i[(t+1)%n],i[(t+2)%n])}}var Qf,Jf=r(()=>{Kf(),mt(Zf,"default")}),e1=r(()=>{Qf=mt(e=>()=>e,"default")});function t1(t,r){return function(e){return t+e*r}}function r1(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(e){return Math.pow(t+e*r,i)}}function i1(e,t){var r=t-e;return r?t1(e,180{e1(),mt(t1,"linear"),mt(r1,"exponential"),mt(i1,"hue"),mt(n1,"gamma"),mt(a1,"nogamma")});function o1(o){return function(e){for(var t,r=e.length,i=new Array(r),n=new Array(r),a=new Array(r),s=0;s{Yf(),Kf(),Jf(),s1(),l1=mt(function e(t){var s=n1(t);function r(t,e){var r=s((t=ef(t)).r,(e=ef(e)).r),i=s(t.g,e.g),n=s(t.b,e.b),a=a1(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=n(e),t.opacity=a(e),t+""}}return mt(r,"rgb"),r.gamma=e,r},"rgbGamma")(1),mt(o1,"rgbSpline"),o1(Xf),o1(Zf)});function h1(t,r){r=r||[];var i,n=t?Math.min(r.length,t.length):0,a=r.slice();return function(e){for(i=0;i{mt(h1,"default"),mt(u1,"isNumberArray")});function p1(e,t){for(var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),s=0;s{A1(),mt(p1,"genericArray")});function f1(t,r){var i=new Date;return t=+t,r=+r,function(e){return i.setTime(t*(1-e)+r*e),i}}var m1=r(()=>{mt(f1,"default")});function y1(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var v1=r(()=>{mt(y1,"default")});function b1(e,t){var r,i={},n={};for(r in null!==e&&"object"==typeof e||(e={}),t=null!==t&&"object"==typeof t?t:{})r in e?i[r]=_1(e[r],t[r]):n[r]=t[r];return function(e){for(r in i)n[r]=i[r](e);return n}}var x1=r(()=>{A1(),mt(b1,"default")});function T1(e){return function(){return e}}function k1(t){return function(e){return t(e)+""}}function w1(e,i){var t,r,n,a=C1.lastIndex=S1.lastIndex=0,s=-1,o=[],l=[];for(e+="",i+="";(t=C1.exec(e))&&(r=S1.exec(i));)(n=r.index)>a&&(n=i.slice(a,n),o[s]?o[s]+=n:o[++s]=n),(t=t[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:y1(t,r)})),a=S1.lastIndex;return a{v1(),C1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S1=new RegExp(C1.source,"g"),mt(T1,"zero"),mt(k1,"one"),mt(w1,"default")});function _1(e,t){var r=typeof t;return null==t||"boolean"==r?Qf(t):("number"==r?y1:"string"==r?(r=Kg(t))?(t=r,l1):w1:t instanceof Kg?l1:t instanceof Date?f1:u1(t)?h1:Array.isArray(t)?p1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?b1:y1)(e,t)}var A1=r(()=>{Yf(),c1(),g1(),m1(),v1(),x1(),E1(),e1(),d1(),mt(_1,"default")});function R1(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var L1=r(()=>{mt(R1,"default")});function I1(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i{N1=180/Math.PI,D1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(I1,"default")});function O1(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?D1:I1(e.a,e.b,e.c,e.d,e.e,e.f)}function P1(e){return null!=e&&((B1=B1||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=B1.transform.baseVal.consolidate())?I1((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):D1}var B1,$1=r(()=>{M1(),mt(O1,"parseCss"),mt(P1,"parseSvg")});function F1(r,o,l,n){function c(e){return e.length?e.pop()+" ":""}function i(e,t,r,i,n,a){var s;e!==r||t!==i?(s=n.push("translate(",null,o,null,l),a.push({i:s-4,x:y1(e,r)},{i:s-2,x:y1(t,i)})):(r||i)&&n.push("translate("+r+o+i+l)}function s(e,t,r,i){e!==t?(180{v1(),$1(),mt(F1,"interpolateTransform"),z1=F1(O1,"px, ","px)","deg)"),q1=F1(P1,", ",")",")")});function W1(s){return function(t,e){var r=s((t=Ff(t)).h,(e=Ff(e)).h),i=a1(t.c,e.c),n=a1(t.l,e.l),a=a1(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=n(e),t.opacity=a(e),t+""}}}var U1,G1=r(()=>{Yf(),s1(),mt(W1,"hcl"),U1=W1(i1),W1(a1)}),V1=r(()=>{A1(),v1(),L1(),E1(),j1(),c1(),G1()});function Y1(){return cm||(dm(H1),cm=um.now()+hm)}function H1(){cm=0}function X1(){this._call=this._time=this._next=null}function K1(e,t,r){var i=new X1;return i.restart(e,t,r),i}function Z1(){Y1(),++rm;for(var e,t=sm;t;)0<=(e=cm-t._time)&&t._call.call(void 0,e),t=t._next;--rm}function Q1(){cm=(lm=um.now())+hm,rm=im=0;try{Z1()}finally{rm=0,em(),cm=0}}function J1(){var e=um.now(),t=e-lm;amr._time&&(i=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:sm=t);om=e,tm(i)}function tm(e){rm||(im=im&&clearTimeout(im),24{am=1e3,hm=cm=lm=nm=im=rm=0,um="object"==typeof performance&&performance.now?performance:Date,dm="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(Y1,"now"),mt(H1,"clearNow"),mt(X1,"Timer"),X1.prototype=K1.prototype={constructor:X1,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Y1():+r)+(null==t?0:+t),this._next||om===this||(om?om._next=this:sm=this,om=this),this._call=e,this._time=r,tm()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,tm())},"stop")},mt(K1,"timer"),mt(Z1,"timerFlush"),mt(Q1,"wake"),mt(J1,"poke"),mt(em,"nap"),mt(tm,"sleep")});function gm(t,r,e){var i=new X1;return r=null==r?0:+r,i.restart(e=>{i.stop(),t(e+r)},r,e),i}var fm=r(()=>{pm(),mt(gm,"default")}),mm=r(()=>{pm(),fm()});function ym(e,t,r,i,n,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};Tm(e,r,{name:t,index:i,group:n,on:km,tween:wm,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Cm})}function vm(e,t){if((e=xm(e,t)).state>Cm)throw new Error("too late; already scheduled");return e}function bm(e,t){if((e=xm(e,t)).state>_m)throw new Error("too late; already running");return e}function xm(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function Tm(a,s,o){var l,c=a.__transition;function e(e){o.state=Sm,o.timer.restart(h,o.delay,o.time),o.delay<=e&&h(e-o.delay)}function h(e){var t,r,i,n;if(o.state!==Sm)return d();for(t in c)if(n=c[t],n.name===o.name){if(n.state===_m)return gm(h);n.state===Am?(n.state=Lm,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete c[t]):+t{Xd(),mm(),km=Gd("start","end","cancel","interrupt"),wm=[],Cm=0,Sm=1,Em=2,_m=3,Am=4,Rm=5,Lm=6,mt(ym,"default"),mt(vm,"init"),mt(bm,"set"),mt(xm,"get"),mt(Tm,"create")});function Nm(e,t){var r,i,n,a=e.__transition,s=!0;if(a){for(n in t=null==t?null:t+"",a)(r=a[n]).name!==t?s=!1:(i=Em{Im(),mt(Nm,"default")});function Mm(e){return this.each(function(){Nm(this,e)})}var Om=r(()=>{Dm(),mt(Mm,"default")});function Pm(n,a){var s,o;return function(){var e=bm(this,n),t=e.tween;if(t!==s)for(var r=0,i=(o=s=t).length;r{Im(),mt(Pm,"tweenRemove"),mt(Bm,"tweenFunction"),mt($m,"default"),mt(Fm,"tweenValue")});function qm(e,t){var r;return("number"==typeof t?y1:t instanceof Kg?l1:(r=Kg(t))?(t=r,l1):w1)(e,t)}var jm=r(()=>{Yf(),V1(),mt(qm,"default")});function Wm(e){return function(){this.removeAttribute(e)}}function Um(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gm(t,r,i){var n,a,s=i+"";return function(){var e=this.getAttribute(t);return e===s?null:e===n?a:a=r(n=e,i)}}function Vm(t,r,i){var n,a,s=i+"";return function(){var e=this.getAttributeNS(t.space,t.local);return e===s?null:e===n?a:a=r(n=e,i)}}function Ym(i,n,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttribute(i):(e=this.getAttribute(i))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=n(s=e,r))}}function Hm(i,n,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttributeNS(i.space,i.local):(e=this.getAttributeNS(i.space,i.local))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=n(s=e,r))}}function Xm(e,t){var r=Zd(e),i="transform"===r?q1:qm;return this.attrTween(e,"function"==typeof t?(r.local?Hm:Ym)(r,i,Fm(this,"attr."+e,t)):null==t?(r.local?Um:Wm)(r):(r.local?Vm:Gm)(r,i,t))}var Km=r(()=>{V1(),zg(),zm(),jm(),mt(Wm,"attrRemove"),mt(Um,"attrRemoveNS"),mt(Gm,"attrConstant"),mt(Vm,"attrConstantNS"),mt(Ym,"attrFunction"),mt(Hm,"attrFunctionNS"),mt(Xm,"default")});function Zm(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Qm(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function Jm(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Qm(t,e):i}return mt(e,"tween"),e._value=r,e}function ey(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Zm(t,e):i}return mt(e,"tween"),e._value=r,e}function ty(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return e=Zd(e),this.tween(r,(e.local?Jm:ey)(e,t))}var ry=r(()=>{zg(),mt(Zm,"attrInterpolate"),mt(Qm,"attrInterpolateNS"),mt(Jm,"attrTweenNS"),mt(ey,"attrTween"),mt(ty,"default")});function iy(e,t){return function(){vm(this,e).delay=+t.apply(this,arguments)}}function ny(e,t){return t=+t,function(){vm(this,e).delay=t}}function ay(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?iy:ny)(t,e)):xm(this.node(),t).delay}var sy=r(()=>{Im(),mt(iy,"delayFunction"),mt(ny,"delayConstant"),mt(ay,"default")});function oy(e,t){return function(){bm(this,e).duration=+t.apply(this,arguments)}}function ly(e,t){return t=+t,function(){bm(this,e).duration=t}}function cy(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?oy:ly)(t,e)):xm(this.node(),t).duration}var hy=r(()=>{Im(),mt(oy,"durationFunction"),mt(ly,"durationConstant"),mt(cy,"default")});function uy(e,t){if("function"!=typeof t)throw new Error;return function(){bm(this,e).ease=t}}function dy(e){var t=this._id;return arguments.length?this.each(uy(t,e)):xm(this.node(),t).ease}var py=r(()=>{Im(),mt(uy,"easeConstant"),mt(dy,"default")});function gy(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;bm(this,t).ease=e}}function fy(e){if("function"!=typeof e)throw new Error;return this.each(gy(this._id,e))}var my=r(()=>{Im(),mt(gy,"easeVarying"),mt(fy,"default")});function yy(e){"function"!=typeof e&&(e=mp(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{zg(),c2(),mt(yy,"default")});function by(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,e=r.length,n=Math.min(i,e),a=new Array(i),s=0;s{c2(),mt(by,"default")});function Ty(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return!(e=0<=t?e.slice(0,t):e)||"start"===e})}function ky(r,i,n){var a,s,o=Ty(i)?vm:bm;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(i,n),e.on=s}}function wy(e,t){var r=this._id;return arguments.length<2?xm(this.node(),r).on.on(e):this.each(ky(r,e,t))}var Cy=r(()=>{Im(),mt(Ty,"start"),mt(ky,"onFunction"),mt(wy,"default")});function Sy(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function Ey(){return this.on("end.remove",Sy(this._id))}var _y=r(()=>{mt(Sy,"removeFunction"),mt(Ey,"default")});function Ay(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=np(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s{zg(),c2(),Im(),mt(Ay,"default")});function Ly(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=up(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o{zg(),c2(),Im(),mt(Ly,"default")});function Ny(){return new Dy(this._groups,this._parents)}var Dy,My=r(()=>{zg(),Dy=Bg.prototype.constructor,mt(Ny,"default")});function Oy(r,i){var n,a,s;return function(){var e=_0(this,r),t=(this.style.removeProperty(r),_0(this,r));return e===t?null:e===n&&t===a?s:s=i(n=e,a=t)}}function Py(e){return function(){this.style.removeProperty(e)}}function By(t,r,i){var n,a,s=i+"";return function(){var e=_0(this,t);return e===s?null:e===n?a:a=r(n=e,i)}}function $y(i,n,a){var s,o,l;return function(){var e=_0(this,i),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(i),r=t=_0(this,i)),e===r?null:e===s&&r===o?l:(o=r,l=n(s=e,t))}}function Fy(i,n){var a,s,o,l,c="style."+n,h="end."+c;return function(){var e=bm(this,i),t=e.on,r=null==e.value[c]?l=l||Py(n):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function zy(e,t,r){var i="transform"==(e+="")?z1:qm;return null==t?this.styleTween(e,Oy(e,i)).on("end.style."+e,Py(e)):"function"==typeof t?this.styleTween(e,$y(e,i,Fm(this,"style."+e,t))).each(Fy(this._id,e)):this.styleTween(e,By(e,i,t),r).on("end.style."+e,null)}var qy=r(()=>{V1(),zg(),Im(),zm(),jm(),mt(Oy,"styleNull"),mt(Py,"styleRemove"),mt(By,"styleConstant"),mt($y,"styleFunction"),mt(Fy,"styleMaybeRemove"),mt(zy,"default")});function jy(t,r,i){return function(e){this.style.setProperty(t,r.call(this,e),i)}}function Wy(t,r,i){var n,a;function e(){var e=r.apply(this,arguments);return n=e!==a?(a=e)&&jy(t,e,i):n}return mt(e,"tween"),e._value=r,e}function Uy(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,Wy(e,t,r??""))}var Gy=r(()=>{mt(jy,"styleInterpolate"),mt(Wy,"styleTween"),mt(Uy,"default")});function Vy(e){return function(){this.textContent=e}}function Yy(t){return function(){var e=t(this);this.textContent=e??""}}function Hy(e){return this.tween("text","function"==typeof e?Yy(Fm(this,"text",e)):Vy(null==e?"":e+""))}var Xy=r(()=>{zm(),mt(Vy,"textConstant"),mt(Yy,"textFunction"),mt(Hy,"default")});function Ky(t){return function(e){this.textContent=t.call(this,e)}}function Zy(t){var r,i;function e(){var e=t.apply(this,arguments);return r=e!==i?(i=e)&&Ky(e):r}return mt(e,"tween"),e._value=t,e}function Qy(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,Zy(e))}var Jy=r(()=>{mt(Ky,"textInterpolate"),mt(Zy,"textTween"),mt(Qy,"default")});function e2(){for(var e=this._name,t=this._id,r=++o2,i=this._groups,n=i.length,a=0;a{c2(),Im(),mt(e2,"default")});function r2(){var n,a,s=this,o=s._id,l=s.size();return new Promise(function(e,t){var r={value:t},i={value:mt(function(){0==--l&&e()},"value")};s.each(function(){var e=bm(this,o),t=e.on;t!==n&&((a=(n=t).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(i)),e.on=a}),0===l&&e()})}var i2=r(()=>{Im(),mt(r2,"default")});function n2(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function a2(e){return Bg().transition(e)}function s2(){return++o2}var o2,l2,c2=r(()=>{zg(),Km(),ry(),sy(),hy(),py(),my(),vy(),xy(),Cy(),_y(),Ry(),Iy(),My(),qy(),Gy(),Xy(),Jy(),t2(),zm(),i2(),o2=0,mt(n2,"Transition"),mt(a2,"transition"),mt(s2,"newId"),l2=Bg.prototype,n2.prototype=a2.prototype={constructor:n2,select:Ay,selectAll:Ly,selectChild:l2.selectChild,selectChildren:l2.selectChildren,filter:yy,merge:by,selection:Ny,transition:e2,call:l2.call,nodes:l2.nodes,node:l2.node,size:l2.size,empty:l2.empty,each:l2.each,on:wy,attr:Xm,attrTween:ty,style:zy,styleTween:Uy,text:Hy,textTween:Qy,remove:Ey,tween:$m,delay:ay,duration:cy,ease:dy,easeVarying:fy,end:r2,[Symbol.iterator]:l2[Symbol.iterator]}});function h2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var u2=r(()=>{mt(h2,"cubicInOut")}),d2=r(()=>{u2()});function p2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function g2(e){var t,r;e=e instanceof n2?(t=e._id,e._name):(t=++o2,(r=f2).time=Y1(),null==e?null:e+"");for(var i=this._groups,n=i.length,a=0;a{c2(),Im(),d2(),mm(),f2={time:null,delay:0,duration:250,ease:h2},mt(p2,"inherit"),mt(g2,"default")}),y2=r(()=>{zg(),Om(),m2(),Bg.prototype.interrupt=Mm,Bg.prototype.transition=g2}),v2=r(()=>{y2()}),b2=r(()=>{}),x2=r(()=>{}),T2=r(()=>{});function k2(e){return[+e[0],+e[1]]}function w2(e){return[k2(e[0]),k2(e[1])]}function C2(e){return{type:e}}var S2,E2,_2,A2=r(()=>{v2(),b2(),x2(),T2(),{abs:S2,max:E2,min:_2}=Math,mt(k2,"number1"),mt(w2,"number2"),["w","e"].map(C2),mt(function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),mt(function(e){return e&&[e[0][0],e[1][0]]},"output"),["n","s"].map(C2),mt(function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),mt(function(e){return e&&[e[0][1],e[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(C2),mt(function(e){return null==e?null:w2(e)},"input"),mt(function(e){return e},"output"),mt(C2,"type")}),R2=r(()=>{A2()});function L2(r){this._+=r[0];for(let e=1,t=r.length;e{D2=Math.PI,P2=(M2=2*D2)-(O2=1e-6),mt(L2,"append"),mt(I2,"appendRound"),B2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?L2:I2(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,i){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,t,r,i,n,a){this._append`C${+e},${+t},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(e,t,r,i,n){if(e=+e,t=+t,r=+r,i=+i,(n=+n)<0)throw new Error("negative radius: "+n);var a,s,o=this._x1,l=this._y1,c=r-e,h=i-t,u=o-e,d=l-t,p=u*u+d*d;null===this._x1?this._append`M${this._x1=e},${this._y1=t}`:O2O2&&n?(s=c*c+h*h,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((D2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>O2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${n},${n},0,0,${+(u*oO2||Math.abs(this._y1-c)>O2)&&this._append`L${l},${c}`,r&&((a=a<0?a%M2+M2:a)>P2?this._append`A${r},${r},0,1,${h},${e-s},${t-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:O2{$2()}),z2=r(()=>{}),q2=r(()=>{}),j2=r(()=>{}),W2=r(()=>{}),U2=r(()=>{}),G2=r(()=>{}),V2=r(()=>{});function Y2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function H2(e,t){var r;return(t=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0?null:[1<(r=e.slice(0,t)).length?r[0]+r.slice(2):r,+e.slice(t+1)]}var X2=r(()=>{mt(Y2,"default"),mt(H2,"formatDecimalParts")});function K2(e){return(e=H2(Math.abs(e)))?e[1]:NaN}var Z2=r(()=>{X2(),mt(K2,"default")});function Q2(o,l){return function(e,t){for(var r=e.length,i=[],n=0,a=o[0],s=0;0t));)a=o[n=(n+1)%o.length];return i.reverse().join(l)}}var J2=r(()=>{mt(Q2,"default")});function ev(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var tv=r(()=>{mt(ev,"default")});function rv(e){var t;if(t=nv.exec(e))return new iv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]});throw new Error("invalid format: "+e)}function iv(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}var nv,av=r(()=>{nv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(rv,"formatSpecifier"),rv.prototype=iv.prototype,mt(iv,"FormatSpecifier"),iv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}});function sv(e){e:for(var t,r=e.length,i=1,n=-1;i{mt(sv,"default")});function lv(e,t){var r,i,n=H2(e,t);return n?(r=n[0],(n=(n=n[1])-(cv=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1)===(i=r.length)?r:i{X2(),mt(lv,"default")});function uv(e,t){var r;return(t=H2(e,t))?(r=t[0],(t=t[1])<0?"0."+new Array(-t).join("0")+r:r.length>t+1?r.slice(0,t+1)+"."+r.slice(t+1):r+new Array(t-r.length+2).join("0")):e+""}var dv,pv=r(()=>{X2(),mt(uv,"default")}),gv=r(()=>{X2(),hv(),pv(),dv={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:Y2,e:mt((e,t)=>e.toExponential(t),"e"),f:mt((e,t)=>e.toFixed(t),"f"),g:mt((e,t)=>e.toPrecision(t),"g"),o:mt(e=>Math.round(e).toString(8),"o"),p:mt((e,t)=>uv(100*e,t),"p"),r:uv,s:lv,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function fv(e){return e}var mv=r(()=>{mt(fv,"default")});function yv(e){var k=void 0===e.grouping||void 0===e.thousands?fv:Q2(vv.call(e.grouping,Number),e.thousands+""),i=void 0===e.currency?"":e.currency[0]+"",n=void 0===e.currency?"":e.currency[1]+"",w=void 0===e.decimal?".":e.decimal+"",C=void 0===e.numerals?fv:ev(vv.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",S=void 0===e.minus?"−":e.minus+"",E=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=rv(e)).fill,h=e.align,u=e.sign,t=e.symbol,d=e.zero,p=e.width,g=e.comma,f=e.precision,m=e.trim,y=e.type,v=("n"===y?(g=!0,y="g"):dv[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===t?i:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),b="$"===t?n:/[%p]/.test(y)?a:"",x=dv[y],T=/[defgprs%]/.test(y);function r(e){var t,r,i,n=v,a=b;if("c"===y)a=x(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?E:x(Math.abs(e),f),m&&(e=sv(e)),n=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:S:"-"===u||"("===u?"":u)+n,a=("s"===y?bv[8+cv/3]:"")+a+(s&&"("===u?")":""),T)for(t=-1,r=e.length;++t>1)+n+e+a+l.slice(o);break;default:e=l+n+e+a}return C(e)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),mt(r,"format"),r.toString=function(){return e+""},r}function t(e,t){var r=s(((e=rv(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(K2(t)/3))),i=Math.pow(10,-e),n=bv[8+e/3];return function(e){return r(i*e)+n}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var vv,bv,xv=r(()=>{Z2(),J2(),tv(),av(),ov(),gv(),hv(),mv(),vv=Array.prototype.map,bv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(yv,"default")});function Tv(e){return kv=yv(e),wv=kv.format,Cv=kv.formatPrefix,kv}var kv,wv,Cv,Sv=r(()=>{xv(),Tv({thousands:",",grouping:[3],currency:["$",""]}),mt(Tv,"defaultLocale")});function Ev(e){return Math.max(0,-K2(Math.abs(e)))}var _v=r(()=>{Z2(),mt(Ev,"default")});function Av(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(K2(t)/3)))-K2(Math.abs(e)))}var Rv=r(()=>{Z2(),mt(Av,"default")});function Lv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,K2(t)-K2(e))+1}var Iv=r(()=>{Z2(),mt(Lv,"default")}),Nv=r(()=>{Sv(),av(),_v(),Rv(),Iv()}),Dv=r(()=>{});function Mv(e){var t=0,r=e.children,i=r&&r.length;if(i)for(;0<=--i;)t+=r[i].value;else t=1;e.value=t}function Ov(){return this.eachAfter(Mv)}var Pv=r(()=>{mt(Mv,"count"),mt(Ov,"default")});function Bv(e,t){let r=-1;for(var i of this)e.call(t,i,++r,this);return this}var $v=r(()=>{mt(Bv,"default")});function Fv(e,t){for(var r,i,n,a=[this],s=-1;r=a.pop();)if(e.call(t,r,++s,this),i=r.children)for(n=i.length-1;0<=n;--n)a.push(i[n]);return this}var zv=r(()=>{mt(Fv,"default")});function qv(e,t){for(var r,i,n,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(i=0,n=r.length;i{mt(qv,"default")});function Wv(e,t){let r=-1;for(var i of this)if(e.call(t,i,++r,this))return i}var Uv=r(()=>{mt(Wv,"default")});function Gv(n){return this.eachAfter(function(e){for(var t=+n(e.data)||0,r=e.children,i=r&&r.length;0<=--i;)t+=r[i].value;e.value=t})}var Vv=r(()=>{mt(Gv,"default")});function Yv(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Hv=r(()=>{mt(Yv,"default")});function Xv(e){for(var t=this,r=Kv(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function Kv(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}var Zv=r(()=>{mt(Xv,"default"),mt(Kv,"leastCommonAncestor")});function Qv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Jv=r(()=>{mt(Qv,"default")});function eb(){return Array.from(this)}var tb=r(()=>{mt(eb,"default")});function rb(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var ib=r(()=>{mt(rb,"default")});function nb(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var ab=r(()=>{mt(nb,"default")});function*sb(){var e,t,r,i,n,a=[this];do{for(t=a.reverse(),a=[];e=t.pop();)if(yield e,r=e.children)for(i=0,n=r.length;i{mt(sb,"default")});function lb(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=ub)):void 0===t&&(t=hb);for(var r,i,n,a,s,o=[e=new gb(e)];r=o.pop();)if((n=t(r.data))&&(s=(n=Array.from(n)).length))for(r.children=n,a=s-1;0<=a;--a)o.push(i=n[a]=new gb(n[a])),i.parent=r,i.depth=r.depth+1;return e.eachBefore(pb)}function cb(){return lb(this).eachBefore(db)}function hb(e){return e.children}function ub(e){return Array.isArray(e)?e[1]:null}function db(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function pb(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function gb(e){this.data=e,this.depth=this.height=0,this.parent=null}var fb=r(()=>{Pv(),$v(),zv(),jv(),Uv(),Vv(),Hv(),Zv(),Jv(),tb(),ib(),ab(),ob(),mt(lb,"hierarchy"),mt(cb,"node_copy"),mt(hb,"objectChildren"),mt(ub,"mapChildren"),mt(db,"copyData"),mt(pb,"computeHeight"),mt(gb,"Node"),gb.prototype=lb.prototype={constructor:gb,count:Ov,each:Bv,eachAfter:qv,eachBefore:Fv,find:Wv,sum:Gv,sort:Yv,path:Xv,ancestors:Qv,descendants:eb,leaves:rb,links:nb,copy:cb,[Symbol.iterator]:sb}});function mb(e){if("function"!=typeof e)throw new Error;return e}var yb=r(()=>{mt(mb,"required")});function vb(){return 0}function bb(e){return function(){return e}}var xb=r(()=>{mt(vb,"constantZero"),mt(bb,"default")});function Tb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var kb=r(()=>{mt(Tb,"default")});function wb(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-t)/e.value;++o{mt(wb,"default")});function Sb(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-r)/e.value;++o{mt(Sb,"default")});function _b(e,t,r,i,n,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=t.children,b=0,x=0,T=v.length,k=t.value;b{Cb(),Eb(),Ab=(1+Math.sqrt(5))/2,mt(_b,"squarifyRatio"),Rb=mt(function t(a){function e(e,t,r,i,n){_b(a,e,t,r,i,n)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(Ab)});function Ib(){var s=Rb,t=!1,r=1,i=1,o=[0],l=vb,c=vb,h=vb,u=vb,d=vb;function n(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(a),o=[0],t&&e.eachBefore(Tb),e}function a(e){var t=o[e.depth],r=e.x0+t,i=e.y0+t,n=e.x1-t,a=e.y1-t;n{kb(),Lb(),yb(),xb(),mt(Ib,"default")}),Db=r(()=>{fb(),Nb()}),Mb=r(()=>{}),Ob=r(()=>{});function Pb(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Bb=r(()=>{mt(Pb,"initRange")});function $b(){var r=new ld,i=[],n=[],a=Fb;function s(e){let t=r.get(e);if(void 0===t){if(a!==Fb)return a;r.set(e,t=i.push(e)-1)}return n[t%n.length]}return mt(s,"scale"),s.domain=function(e){if(!arguments.length)return i.slice();i=[],r=new ld;for(var t of e)r.has(t)||r.set(t,i.push(t)-1);return s},s.range=function(e){return arguments.length?(n=Array.from(e),s):n.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return $b(i,n).unknown(a)},Pb.apply(s,arguments),s}var Fb,zb=r(()=>{Cd(),Bb(),Fb=Symbol("implicit"),mt($b,"ordinal")});function qb(){var n,a,e=$b().unknown(void 0),s=e.domain,o=e.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function t(){var e=s().length,t=c{Cd(),Bb(),zb(),mt(qb,"band")});function Wb(e){return function(){return e}}var Ub=r(()=>{mt(Wb,"constants")});function Gb(e){return+e}var Vb=r(()=>{mt(Gb,"number")});function Yb(e){return e}function Hb(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:Wb(isNaN(r)?NaN:.5)}function Xb(t,r){var e;return r{Cd(),V1(),Ub(),Vb(),tx=[0,1],mt(Yb,"identity"),mt(Hb,"normalize"),mt(Xb,"clamper"),mt(Kb,"bimap"),mt(Zb,"polymap"),mt(Qb,"copy"),mt(Jb,"transformer"),mt(ex,"continuous")});function ix(e,t,r,i){var n,a=pd(e,t,r);switch((i=rv(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(n=Av(a,s))||(i.precision=n),Cv(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=Lv(a,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=Ev(a))||(i.precision=n-2*("%"===i.type))}return wv(i)}var nx=r(()=>{Cd(),Nv(),mt(ix,"tickFormat")});function ax(c){var h=c.domain;return c.ticks=function(e){var t=h();return ud(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return ix(r[0],r[r.length-1],e??10,t)},c.nice=function(e){null==e&&(e=10);var t,r,i=h(),n=0,a=i.length-1,s=i[n],o=i[a],l=10;for(o{Cd(),rx(),Bb(),nx(),mt(ax,"linearish"),mt(sx,"linear")});function lx(e,t){var r,i=0,n=(e=e.slice()).length-1,a=e[i],s=e[n];return s{mt(lx,"nice")});function hx(a,s,r,i){function o(e){return a(e=0===arguments.length?new Date:new Date(+e)),e}return mt(o,"interval"),o.floor=e=>(a(e=new Date(+e)),e),o.ceil=e=>(a(e=new Date(e-1)),s(e,1),a(e),e),o.round=e=>{var t=o(e),r=o.ceil(e);return e-t(s(e=new Date(+e),null==t?1:Math.floor(t)),e),o.range=(e,t,r)=>{var i,n=[];if(e=o.ceil(e),r=null==r?1:Math.floor(r),ehx(e=>{if(e<=e)for(;a(e),!r(e);)e.setTime(e-1)},(e,t)=>{if(e<=e)if(t<0)for(;++t<=0;)for(;s(e,-1),!r(e););else for(;0<=--t;)for(;s(e,1),!r(e););}),r&&(o.count=(e,t)=>(ux.setTime(+e),dx.setTime(+t),a(ux),a(dx),Math.floor(r(ux,dx))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0i(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var ux,dx,px,gx,fx,mx,yx,vx,bx,xx,Tx,kx=r(()=>{ux=new Date,dx=new Date,mt(hx,"timeInterval")}),wx=r(()=>{kx(),(px=hx(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):px:null)}),Cx=r(()=>{kx(),(gx=hx(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),Sx=r(()=>{kx(),(fx=hx(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes())).range,(mx=hx(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),Ex=r(()=>{kx(),(yx=hx(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours())).range,(vx=hx(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),_x=r(()=>{kx(),(bx=hx(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5,e=>e.getDate()-1)).range,(xx=hx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(Tx=hx(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5))).range});function Ax(t){return hx(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5)}function Rx(t){return hx(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}var Lx,Ix,Nx,Dx,Mx,Ox,Px,Bx,$x,Fx,zx,qx,jx,Wx,Ux,Gx,Vx,Yx,Hx=r(()=>{kx(),mt(Ax,"timeWeekday"),Lx=Ax(0),Ix=Ax(1),Nx=Ax(2),Dx=Ax(3),Mx=Ax(4),Ox=Ax(5),Px=Ax(6),Lx.range,Ix.range,Nx.range,Dx.range,Mx.range,Ox.range,Px.range,mt(Rx,"utcWeekday"),Bx=Rx(0),$x=Rx(1),Fx=Rx(2),zx=Rx(3),qx=Rx(4),jx=Rx(5),Wx=Rx(6),Bx.range,$x.range,Fx.range,zx.range,qx.range,jx.range,Wx.range}),Xx=r(()=>{kx(),(Ux=hx(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())).range,(Gx=hx(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())).range}),Kx=r(()=>{kx(),(Vx=hx(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*r)}):null,(Yx=hx(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*r)}):null});function Zx(a,e,t,r,i,n){let s=[[gx,1,1e3],[gx,5,5e3],[gx,15,15e3],[gx,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[t,1,6048e5],[e,1,2592e6],[e,3,7776e6],[a,1,31536e6]];function o(e,t,r){var i=te).right(s,i);return n===s.length?a.every(pd(e/31536e6,t/31536e6,r)):0===n?px.every(Math.max(pd(e,t,r),1)):([e,t]=s[i/s[n-1][2]{Cd(),wx(),Cx(),Sx(),Ex(),_x(),Hx(),Xx(),Kx(),mt(Zx,"ticker"),[Qx,Jx]=Zx(Yx,Gx,Bx,Tx,vx,mx),[e4,t4]=Zx(Vx,Ux,Lx,bx,yx,fx)}),i4=r(()=>{wx(),Cx(),Sx(),Ex(),_x(),Hx(),Xx(),Kx(),r4()});function n4(e){var t;return 0<=e.y&&e.y<100?((t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L)).setFullYear(e.y),t):new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function a4(e){var t;return 0<=e.y&&e.y<100?((t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L))).setUTCFullYear(e.y),t):new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function s4(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function o4(e){var i=e.dateTime,n=e.date,a=e.time,t=e.periods,r=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=h4(t),h=u4(t),P=h4(r),B=u4(r),$=h4(s),F=u4(s),z=h4(o),q=u4(o),j=h4(l),W=u4(l),u={a:C,A:S,b:E,B:_,c:null,d:N4,e:N4,f:B4,g:H4,G:K4,H:D4,I:M4,j:O4,L:P4,m:$4,M:F4,p:A,q:R,Q:bT,s:xT,S:z4,u:q4,U:j4,V:U4,w:G4,W:V4,x:null,X:null,y:Y4,Y:X4,Z:Z4,"%":vT},d={a:L,A:I,b:N,B:D,c:null,d:Q4,e:Q4,f:iT,g:gT,G:mT,H:J4,I:eT,j:tT,L:rT,m:nT,M:aT,p:M,q:O,Q:bT,s:xT,S:sT,u:oT,U:lT,V:hT,w:uT,W:dT,x:null,X:null,y:pT,Y:fT,Z:yT,"%":vT},U={a:y,A:v,b:b,B:x,c:T,d:k4,e:k4,f:A4,g:v4,G:y4,H:C4,I:C4,j:w4,L:_4,m:T4,M:S4,p:m,q:x4,Q:L4,s:I4,S:E4,u:p4,U:g4,V:f4,w:d4,W:m4,x:k,X:w,y:v4,Y:y4,Z:b4,"%":R4};function p(l,c){return function(e){var t,r,i,n=[],a=-1,s=0,o=l.length;for(e instanceof Date||(e=new Date(+e));++a[e.toLowerCase(),t]))}function d4(e,t,r){return(t=kT.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function p4(e,t,r){return(t=kT.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function g4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function f4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function m4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function y4(e,t,r){return(t=kT.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function v4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function b4(e,t,r){return(t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6)))?(e.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function x4(e,t,r){return(t=kT.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function T4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function k4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function w4(e,t,r){return(t=kT.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function C4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function S4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function E4(e,t,r){return(t=kT.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function _4(e,t,r){return(t=kT.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function A4(e,t,r){return(t=kT.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function R4(e,t,r){return(t=wT.exec(t.slice(r,r+1)))?r+t[0].length:-1}function L4(e,t,r){return(t=kT.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function I4(e,t,r){return(t=kT.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function N4(e,t){return l4(e.getDate(),t,2)}function D4(e,t){return l4(e.getHours(),t,2)}function M4(e,t){return l4(e.getHours()%12||12,t,2)}function O4(e,t){return l4(1+bx.count(Vx(e),e),t,3)}function P4(e,t){return l4(e.getMilliseconds(),t,3)}function B4(e,t){return P4(e,t)+"000"}function $4(e,t){return l4(e.getMonth()+1,t,2)}function F4(e,t){return l4(e.getMinutes(),t,2)}function z4(e,t){return l4(e.getSeconds(),t,2)}function q4(e){return 0===(e=e.getDay())?7:e}function j4(e,t){return l4(Lx.count(Vx(e)-1,e),t,2)}function W4(e){var t=e.getDay();return 4<=t||0===t?Mx(e):Mx.ceil(e)}function U4(e,t){return e=W4(e),l4(Mx.count(Vx(e),e)+(4===Vx(e).getDay()),t,2)}function G4(e){return e.getDay()}function V4(e,t){return l4(Ix.count(Vx(e)-1,e),t,2)}function Y4(e,t){return l4(e.getFullYear()%100,t,2)}function H4(e,t){return l4((e=W4(e)).getFullYear()%100,t,2)}function X4(e,t){return l4(e.getFullYear()%1e4,t,4)}function K4(e,t){var r=e.getDay();return l4((e=4<=r||0===r?Mx(e):Mx.ceil(e)).getFullYear()%1e4,t,4)}function Z4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+l4(e/60|0,"0",2)+l4(e%60,"0",2)}function Q4(e,t){return l4(e.getUTCDate(),t,2)}function J4(e,t){return l4(e.getUTCHours(),t,2)}function eT(e,t){return l4(e.getUTCHours()%12||12,t,2)}function tT(e,t){return l4(1+xx.count(Yx(e),e),t,3)}function rT(e,t){return l4(e.getUTCMilliseconds(),t,3)}function iT(e,t){return rT(e,t)+"000"}function nT(e,t){return l4(e.getUTCMonth()+1,t,2)}function aT(e,t){return l4(e.getUTCMinutes(),t,2)}function sT(e,t){return l4(e.getUTCSeconds(),t,2)}function oT(e){return 0===(e=e.getUTCDay())?7:e}function lT(e,t){return l4(Bx.count(Yx(e)-1,e),t,2)}function cT(e){var t=e.getUTCDay();return 4<=t||0===t?qx(e):qx.ceil(e)}function hT(e,t){return e=cT(e),l4(qx.count(Yx(e),e)+(4===Yx(e).getUTCDay()),t,2)}function uT(e){return e.getUTCDay()}function dT(e,t){return l4($x.count(Yx(e)-1,e),t,2)}function pT(e,t){return l4(e.getUTCFullYear()%100,t,2)}function gT(e,t){return l4((e=cT(e)).getUTCFullYear()%100,t,2)}function fT(e,t){return l4(e.getUTCFullYear()%1e4,t,4)}function mT(e,t){var r=e.getUTCDay();return l4((e=4<=r||0===r?qx(e):qx.ceil(e)).getUTCFullYear()%1e4,t,4)}function yT(){return"+0000"}function vT(){return"%"}function bT(e){return+e}function xT(e){return Math.floor(+e/1e3)}var TT,kT,wT,CT,ST=r(()=>{i4(),mt(n4,"localDate"),mt(a4,"utcDate"),mt(s4,"newDate"),mt(o4,"formatLocale"),TT={"-":"",_:" ",0:"0"},kT=/^\s*\d+/,wT=/^%/,CT=/[\\^$*+?|[\]().{}]/g,mt(l4,"pad"),mt(c4,"requote"),mt(h4,"formatRe"),mt(u4,"formatLookup"),mt(d4,"parseWeekdayNumberSunday"),mt(p4,"parseWeekdayNumberMonday"),mt(g4,"parseWeekNumberSunday"),mt(f4,"parseWeekNumberISO"),mt(m4,"parseWeekNumberMonday"),mt(y4,"parseFullYear"),mt(v4,"parseYear"),mt(b4,"parseZone"),mt(x4,"parseQuarter"),mt(T4,"parseMonthNumber"),mt(k4,"parseDayOfMonth"),mt(w4,"parseDayOfYear"),mt(C4,"parseHour24"),mt(S4,"parseMinutes"),mt(E4,"parseSeconds"),mt(_4,"parseMilliseconds"),mt(A4,"parseMicroseconds"),mt(R4,"parseLiteralPercent"),mt(L4,"parseUnixTimestamp"),mt(I4,"parseUnixTimestampSeconds"),mt(N4,"formatDayOfMonth"),mt(D4,"formatHour24"),mt(M4,"formatHour12"),mt(O4,"formatDayOfYear"),mt(P4,"formatMilliseconds"),mt(B4,"formatMicroseconds"),mt($4,"formatMonthNumber"),mt(F4,"formatMinutes"),mt(z4,"formatSeconds"),mt(q4,"formatWeekdayNumberMonday"),mt(j4,"formatWeekNumberSunday"),mt(W4,"dISO"),mt(U4,"formatWeekNumberISO"),mt(G4,"formatWeekdayNumberSunday"),mt(V4,"formatWeekNumberMonday"),mt(Y4,"formatYear"),mt(H4,"formatYearISO"),mt(X4,"formatFullYear"),mt(K4,"formatFullYearISO"),mt(Z4,"formatZone"),mt(Q4,"formatUTCDayOfMonth"),mt(J4,"formatUTCHour24"),mt(eT,"formatUTCHour12"),mt(tT,"formatUTCDayOfYear"),mt(rT,"formatUTCMilliseconds"),mt(iT,"formatUTCMicroseconds"),mt(nT,"formatUTCMonthNumber"),mt(aT,"formatUTCMinutes"),mt(sT,"formatUTCSeconds"),mt(oT,"formatUTCWeekdayNumberMonday"),mt(lT,"formatUTCWeekNumberSunday"),mt(cT,"UTCdISO"),mt(hT,"formatUTCWeekNumberISO"),mt(uT,"formatUTCWeekdayNumberSunday"),mt(dT,"formatUTCWeekNumberMonday"),mt(pT,"formatUTCYear"),mt(gT,"formatUTCYearISO"),mt(fT,"formatUTCFullYear"),mt(mT,"formatUTCFullYearISO"),mt(yT,"formatUTCZone"),mt(vT,"formatLiteralPercent"),mt(bT,"formatUnixTimestamp"),mt(xT,"formatUnixTimestampSeconds")});function ET(e){return _T=o4(e),AT=_T.format,_T}var _T,AT,RT=r(()=>{ST(),ET({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"]}),mt(ET,"defaultLocale")}),LT=r(()=>{RT()});function IT(e){return new Date(e)}function NT(e){return e instanceof Date?+e:+new Date(+e)}function DT(r,i,t,n,a,s,o,l,c,h){var u=ex(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),b=h("%b %d"),x=h("%B"),T=h("%Y");function k(e){return(c(e){i4(),LT(),rx(),Bb(),cx(),mt(IT,"date"),mt(NT,"number"),mt(DT,"calendar"),mt(MT,"time")}),PT=r(()=>{jb(),ox(),zb(),OT()});function BT(e){for(var t=e.length/6|0,r=new Array(t),i=0;i{mt(BT,"default")}),zT=r(()=>{FT(),$T=BT("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),qT=r(()=>{zT()});function jT(e){return mt(function(){return e},"constant")}var WT=r(()=>{mt(jT,"default")});function UT(e){return 1{VT=Math.abs,YT=Math.atan2,HT=Math.cos,XT=Math.max,KT=Math.min,ZT=Math.sin,QT=Math.sqrt,JT=1e-12,t5=(e5=Math.PI)/2,r5=2*e5,mt(UT,"acos"),mt(GT,"asin")});function n5(r){let i=3;return r.digits=function(e){if(!arguments.length)return i;if(null==e)i=null;else{var t=Math.floor(e);if(!(0<=t))throw new RangeError("invalid digits: "+e);i=t}return r},()=>new B2(i)}var a5=r(()=>{F2(),mt(n5,"withPath")});function s5(e){return e.innerRadius}function o5(e){return e.outerRadius}function l5(e){return e.startAngle}function c5(e){return e.endAngle}function h5(e){return e&&e.padAngle}function u5(e,t,r,i,n,a,s,o){var l=(o-=a)*(r-=e)-(s-=n)*(i-=t);if(!(l*lJT?(i+=u*=_?1:-1,n-=u):(a=0,i=n=(C+S)/2),(s-=2*d)>JT?(t+=d*=_?1:-1,r-=d):(s=0,t=r=(C+S)/2)),h=w*HT(t),u=w*ZT(t),d=k*HT(n),C=k*ZT(n),JT{WT(),i5(),a5(),mt(s5,"arcInnerRadius"),mt(o5,"arcOuterRadius"),mt(l5,"arcStartAngle"),mt(c5,"arcEndAngle"),mt(h5,"arcPadAngle"),mt(u5,"intersect"),mt(d5,"cornerTangents"),mt(p5,"default")});function f5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var m5=r(()=>{Array.prototype.slice,mt(f5,"default")});function y5(e){this._context=e}function v5(e){return new y5(e)}var b5=r(()=>{mt(y5,"Linear"),y5.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}},"point")},mt(v5,"default")});function x5(e){return e[0]}function T5(e){return e[1]}var k5=r(()=>{mt(x5,"x"),mt(T5,"y")});function w5(s,o){var l=jT(!0),c=null,h=v5,u=null,d=n5(t);function t(e){var t,r,i,n=(e=f5(e)).length,a=!1;for(null==c&&(u=h(i=d())),t=0;t<=n;++t)!(t{m5(),WT(),b5(),a5(),k5(),mt(w5,"default")});function S5(e,t){return t{mt(S5,"default")});function _5(e){return e}var A5=r(()=>{mt(_5,"default")});function R5(){var p=_5,g=S5,f=null,m=jT(0),y=jT(r5),v=jT(0);function t(r){for(var e,t,i,n=(r=f5(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),c=Math.min(r5,Math.max(-r5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/n,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d{m5(),WT(),E5(),A5(),i5(),mt(R5,"default")});function I5(e){return new D5(e,!0)}function N5(e){return new D5(e,!1)}var D5,M5=r(()=>{D5=class{static{mt(this,"Bump")}constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}},mt(I5,"bumpX"),mt(N5,"bumpY")});function O5(){}var P5=r(()=>{mt(O5,"default")});function B5(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function $5(e){this._context=e}function F5(e){return new $5(e)}var z5=r(()=>{mt(B5,"point"),mt($5,"Basis"),$5.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 3:B5(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:B5(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(F5,"default")});function q5(e){this._context=e}function j5(e){return new q5(e)}var W5=r(()=>{P5(),z5(),mt(q5,"BasisClosed"),q5.prototype={areaStart:O5,areaEnd:O5,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:B5(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(j5,"default")});function U5(e){this._context=e}function G5(e){return new U5(e)}var V5=r(()=>{z5(),mt(U5,"BasisOpen"),U5.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:B5(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(G5,"default")});function Y5(e,t){this._basis=new $5(e),this._beta=t}var H5,X5=r(()=>{z5(),mt(Y5,"Bundle"),Y5.prototype={lineStart:mt(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:mt(function(){var e=this._x,t=this._y,r=e.length-1;if(0{mt(K5,"point"),mt(Z5,"Cardinal"),Z5.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:K5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:K5(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},Q5=mt(function t(r){function e(e){return new Z5(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function e3(e,t){this._context=e,this._k=(1-t)/6}var t3,r3=r(()=>{P5(),J5(),mt(e3,"CardinalClosed"),e3.prototype={areaStart:O5,areaEnd:O5,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:K5(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},t3=mt(function t(r){function e(e){return new e3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function i3(e,t){this._context=e,this._k=(1-t)/6}var n3,a3=r(()=>{J5(),mt(i3,"CardinalOpen"),i3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:K5(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},n3=mt(function t(r){function e(e){return new i3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function s3(e,t,r){var i,n,a=e._x1,s=e._y1,o=e._x2,l=e._y2;JT{i5(),J5(),mt(s3,"point"),mt(o3,"CatmullRom"),o3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(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:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:s3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},l3=mt(function t(r){function e(e){return r?new o3(e,r):new Z5(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function h3(e,t){this._context=e,this._alpha=t}var u3,d3=r(()=>{r3(),P5(),c3(),mt(h3,"CatmullRomClosed"),h3.prototype={areaStart:O5,areaEnd:O5,lineStart:mt(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:mt(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)}},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:s3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},u3=mt(function t(r){function e(e){return r?new h3(e,r):new e3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function p3(e,t){this._context=e,this._alpha=t}var g3,f3=r(()=>{a3(),c3(),mt(p3,"CatmullRomOpen"),p3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(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:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:s3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},g3=mt(function t(r){function e(e){return r?new p3(e,r):new i3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function m3(e){this._context=e}function y3(e){return new m3(e)}var v3=r(()=>{P5(),mt(m3,"LinearClosed"),m3.prototype={areaStart:O5,areaEnd:O5,lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){this._point&&this._context.closePath()},"lineEnd"),point:mt(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")},mt(y3,"default")});function b3(e){return e<0?-1:1}function x3(e,t,r){var i=e._x1-e._x0,t=t-e._x1,n=(e._y1-e._y0)/(i||t<0&&-0),e=(n*t+(r=(r-e._y1)/(t||i<0&&-0))*i)/(i+t);return(b3(n)+b3(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(e))||0}function T3(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function k3(e,t,r){var i=e._x0,n=e._x1,a=e._y1,s=(n-i)/3;e._context.bezierCurveTo(i+s,e._y0+s*t,n-s,a-s*r,n,a)}function w3(e){this._context=e}function C3(e){this._context=new S3(e)}function S3(e){this._context=e}function E3(e){return new w3(e)}function _3(e){return new C3(e)}var A3=r(()=>{mt(b3,"sign"),mt(x3,"slope3"),mt(T3,"slope2"),mt(k3,"point"),mt(w3,"MonotoneX"),w3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:k3(this,this._t0,T3(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,k3(this,T3(this,r=x3(this,e,t)),r);break;default:k3(this,this._t0,r=x3(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(C3,"MonotoneY"),(C3.prototype=Object.create(w3.prototype)).point=function(e,t){w3.prototype.point.call(this,t,e)},mt(S3,"ReflectContext"),S3.prototype={moveTo:mt(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:mt(function(){this._context.closePath()},"closePath"),lineTo:mt(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:mt(function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)},"bezierCurveTo")},mt(E3,"monotoneX"),mt(_3,"monotoneY")});function R3(e){this._context=e}function L3(e){var t,r,i=e.length-1,n=new Array(i),a=new Array(i),s=new Array(i);for(a[n[0]=0]=2,s[0]=e[0]+2*e[1],t=1;t{mt(R3,"Natural"),R3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:mt(function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var i=L3(e),n=L3(t),a=0,s=1;s{mt(D3,"Step"),D3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){0{g5(),C5(),L5(),W5(),V5(),z5(),M5(),X5(),r3(),a3(),J5(),d3(),f3(),c3(),v3(),b5(),A3(),N3(),B3()}),F3=r(()=>{}),z3=r(()=>{});function q3(e,t,r){this.k=e,this.x=t,this.y=r}function j3(e){for(;!e.__zoom;)if(!(e=e.parentNode))return W3;return e.__zoom}var W3,U3,G3,V3,Y3,H3,X3,K3,Z3,Q3,J3,ek,tk,rk,ik,nk,ak,sk,ok,lk,ck,hk,uk,dk,pk,gk,fk=r(()=>{mt(q3,"Transform"),q3.prototype={constructor:q3,scale:mt(function(e){return 1===e?this:new q3(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new q3(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:mt(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:mt(function(e){return e*this.k+this.x},"applyX"),applyY:mt(function(e){return e*this.k+this.y},"applyY"),invert:mt(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:mt(function(e){return(e-this.x)/this.k},"invertX"),invertY:mt(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:mt(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:mt(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:mt(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},W3=new q3(1,0,0),j3.prototype=q3.prototype,mt(j3,"transform")}),mk=r(()=>{}),yk=r(()=>{v2(),F3(),z3(),fk(),mk()}),vk=r(()=>{yk(),fk()}),bk=r(()=>{Cd(),$d(),R2(),z2(),Yf(),q2(),j2(),Xd(),qg(),W2(),d2(),U2(),V2(),Nv(),Dv(),Db(),V1(),F2(),Mb(),G2(),Ob(),PT(),qT(),zg(),$3(),i4(),LT(),mm(),v2(),vk()}),xk=qat(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"}),Tk=qat(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=xk();function s(e){return-1{U3=j(Tk(),1),bk(),th(),G3=mt((e,t)=>{var r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),void 0!==t.attrs)for(var i in t.attrs)r.attr(i,t.attrs[i]);return t.class&&r.attr("class",t.class),r},"drawRect"),V3=mt((e,t)=>{t={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"},G3(e,t).lower()},"drawBackgroundRect"),Y3=mt((e,t)=>{var r=t.text.replace(Cc," "),i=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class&&e.attr("class",t.class),e.append("tspan"));return i.attr("x",t.x+2*t.textMargin),i.text(r),e},"drawText"),H3=mt((e,t,r,i)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,U3.sanitizeUrl)(i),e.attr("xlink:href",t)},"drawImage"),X3=mt((e,t,r,i)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,U3.sanitizeUrl)(i),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),K3=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Z3=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),Q3=mt(()=>{let e=Q(".mermaidTooltip");return e=e.empty()?Q("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100"):e},"createTooltip")}),wk=r(()=>{function t(e,t,r,i,n,a,s){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(e),s)}function l(e,t,r,i,n,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=e.split(I.lineBreakRegex);for(let e=0;e{let n=e.append("g"),a=0;for(var s of t){var o,l=s.textColor||"#444444",c=s.lineColor||"#444444",h=s.offsetX?parseInt(s.offsetX):0,u=s.offsetY?parseInt(s.offsetY):0,c=(0===a?((o=n.append("line")).attr("x1",s.startPoint.x),o.attr("y1",s.startPoint.y),o.attr("x2",s.endPoint.x),o.attr("y2",s.endPoint.y),o.attr("stroke-width","1"),o.attr("stroke",c),o.style("fill","none"),"rel_b"!==s.type&&o.attr("marker-end","url(#"+i+"-arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||o.attr("marker-start","url(#"+i+"-arrowend)"),a=-1):((o=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",c).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),"rel_b"!==s.type&&o.attr("marker-end","url(#"+i+"-arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||o.attr("marker-start","url(#"+i+"-arrowend)")),r.messageFont());pk(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+h,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+u,s.label.width,s.label.height,{fill:l},c),s.techn&&""!==s.techn.text&&(c=r.messageFont(),pk(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+h,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+u,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:l,"font-style":"italic"},c))}},"drawRels"),ik=mt(function(e,t,r){let i=e.append("g"),n=t.bgColor||"none",a=t.borderColor||"#444444",s=t.fontColor||"black",o=t.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(ek(i,e={x:t.x,y:t.y,fill:n,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,pk(r)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},l),t.type&&""!==t.type.text&&((l=r.boundaryFont()).fontColor=s,pk(r)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},l)),t.descr&&""!==t.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,pk(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),nk=mt(function(e,t,r){let i=t.bgColor||r[t.typeC4Shape.text+"_bg_color"],n=t.borderColor||r[t.typeC4Shape.text+"_border_color"],a=t.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(t.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="}var o=e.append("g"),l=(o.attr("class","person-man"),K3());switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=t.x,l.y=t.y,l.fill=i,l.width=t.width,l.height=t.height,l.stroke=n,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},ek(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).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",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).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",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2))}switch(e=dk(r,t.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",e.fontFamily).attr("font-size",e.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":tk(o,48,48,t.x+t.width/2-24,t.y+t.image.Y,s)}let c=r[t.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,pk(r)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},c),(c=r[t.typeC4Shape.text+"Font"]()).fontColor=a,t.techn&&""!==t.techn?.text?pk(r)(t.techn.text,o,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},c):t.type&&""!==t.type.text&&pk(r)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},c),t.descr&&""!==t.descr.text&&((c=r.personFont()).fontColor=a,pk(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),ak=mt(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),sk=mt(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),ok=mt(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),lk=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),ck=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),hk=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),uk=mt(function(e,t){(e=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).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"),e.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"),dk=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),pk=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},gk={drawRect:ek,drawBoundary:ik,drawC4Shape:nk,drawRels:rk,drawImage:tk,insertArrowHead:lk,insertArrowEnd:ck,insertArrowFilledHead:hk,insertArrowCrossHead:uk,insertDatabaseIcon:ak,insertComputerIcon:sk,insertClockIcon:ok}});function Ck(e){return Number.isSafeInteger(e)&&0<=e}var Sk=r(()=>{mt(Ck,"isLength")});function Ek(e){return null!=e&&"function"!=typeof e&&Ck(e.length)}var _k=r(()=>{Sk(),mt(Ek,"isArrayLike")});function Ak(e){return"__proto__"===e}var Rk=r(()=>{mt(Ak,"isUnsafeProperty")});function Lk(e){return null==e||"object"!=typeof e&&"function"!=typeof e}var Ik=r(()=>{mt(Lk,"isPrimitive")});function Nk(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var Dk=r(()=>{mt(Nk,"getSymbols")});function Mk(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Ok,Pk,Bk,$k,Fk,zk,qk,jk,Wk,Uk,Gk,Vk,Yk,Hk,Xk,Kk,Zk,Qk,Jk,ew,tw,rw,iw=r(()=>{mt(Mk,"getTag")}),nw=r(()=>{Ok="[object RegExp]",Pk="[object String]",Bk="[object Number]",$k="[object Boolean]",Fk="[object Arguments]",zk="[object Symbol]",qk="[object Date]",jk="[object Map]",Wk="[object Set]",Uk="[object Array]",Gk="[object ArrayBuffer]",Vk="[object Object]",Yk="[object DataView]",Hk="[object Uint8Array]",Xk="[object Uint8ClampedArray]",Kk="[object Uint16Array]",Zk="[object Uint32Array]",Qk="[object Int8Array]",Jk="[object Int16Array]",ew="[object Int32Array]",tw="[object Float32Array]",rw="[object Float64Array]"});function aw(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var sw=r(()=>{mt(aw,"isTypedArray")});function ow(e,t){return lw(e,void 0,e,new Map,t)}function lw(t,e,r,i=new Map,n=void 0){if(void 0!==(e=n?.(t,e,r,i)))return e;if(Lk(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){var a=new Array(t.length);i.set(t,a);for(let e=0;e{Dk(),iw(),nw(),Ik(),sw(),mt(ow,"cloneDeepWith"),mt(lw,"cloneDeepWithImpl"),mt(cw,"copyProperties"),mt(hw,"isCloneableObject")});function dw(a,s){return ow(a,(e,t,r,i)=>{if(void 0!==(e=s?.(e,t,r,i)))return e;if("object"==typeof a){if(Mk(a)===Vk&&"function"!=typeof a.constructor)return i.set(a,t={}),cw(t,a,r,i),t;switch(Object.prototype.toString.call(a)){case Bk:case Pk:case $k:var n=new a.constructor(a?.valueOf());return cw(n,a),n;case Fk:return cw(n={},a),n.length=a.length,n[Symbol.iterator]=a[Symbol.iterator],n;default:return}}})}var pw=r(()=>{uw(),iw(),nw(),mt(dw,"cloneDeepWith")});function gw(e){return dw(e)}var fw=r(()=>{pw(),mt(gw,"cloneDeep")});function mw(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===Mk(e)}var yw=r(()=>{iw(),mt(mw,"isArguments")});function vw(e){return"object"==typeof e&&null!==e}var bw=r(()=>{mt(vw,"isObjectLike")});function xw(e){return vw(e)&&Ek(e)}var Tw=r(()=>{_k(),bw(),mt(xw,"isArrayLikeObject")});function kw(e){return Array.isArray(e)}var ww=r(()=>{mt(kw,"isArray")});function Cw(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");let a=mt(function(...e){var t=n?n.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=i.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized"),e=Cw.Cache||Map;return a.cache=new e,a}var Sw=r(()=>{mt(Cw,"memoize"),Cw.Cache=Map});function Ew(){}var _w=r(()=>{mt(Ew,"noop")});function Aw(e){var t=e?.constructor;return e===("function"==typeof t?t:Object).prototype}var Rw=r(()=>{mt(Aw,"isPrototype")});function Lw(e){return aw(e)}var Iw=r(()=>{sw(),mt(Lw,"isTypedArray")});function Nw(i){if(Lk(i))return i;var e,t,r,n,a=Mk(i);if(!Dw(i))return{};if(kw(i))return e=Array.from(i),0{r.set(t,e)}),r}if(a!==Wk)return a===Fk?(Mw(r={},t=i),r.length=t.length,r[Symbol.iterator]=t[Symbol.iterator],r):(Bw(n={},i),Mw(n,i),Ow(n,i),n);{let e=i,t=new Set;return e.forEach(e=>{t.add(e)}),t}}function Dw(e){switch(Mk(e)){case Fk:case Uk:case Gk:case Yk:case $k:case qk:case tw:case rw:case Qk:case Jk:case ew:case jk:case Bk:case Vk:case Ok:case Wk:case Pk:case zk:case Hk:case Xk:case Kk:case Zk:return!0;default:return!1}}function Mw(e,t){for(var r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function Ow(t,r){var i=Object.getOwnPropertySymbols(r);for(let e=0;e=i)&&(e[r]=t[r])}function Bw(e,t){var r=Object.getPrototypeOf(t);null!==r&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,r)}var $w=r(()=>{Ik(),iw(),nw(),ww(),Iw(),mt(Nw,"clone"),mt(Dw,"isCloneableObject"),mt(Mw,"copyOwnProperties"),mt(Ow,"copySymbolProperties"),mt(Pw,"cloneStringObjectProperties"),mt(Bw,"copyPrototype")});function Fw(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;var t;if("[object Object]"!==Object.prototype.toString.call(e))return!(null==(t=e[Symbol.toStringTag])||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable)&&e.toString()===`[object ${t}]`;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}var zw=r(()=>{mt(Fw,"isPlainObject")});function qw(e){var t,r,i,n;return Lk(e)?e:Array.isArray(e)||aw(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer?e.slice(0):null==(t=Object.getPrototypeOf(e))?Object.assign(Object.create(t),e):(i=t.constructor,e instanceof Date||e instanceof Map||e instanceof Set?new i(e):e instanceof RegExp?((r=new i(e)).lastIndex=e.lastIndex,r):e instanceof DataView?new i(e.buffer.slice(0)):e instanceof Error?((n=e instanceof AggregateError?new i(e.errors,e.message,{cause:e.cause}):new i(e.message,{cause:e.cause})).stack=e.stack,Object.assign(n,e),n):typeof File<"u"&&e instanceof File?new i([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?(r=Object.create(t),Object.assign(r,e)):e)}var jw=r(()=>{Ik(),sw(),mt(qw,"clone")});function Ww(e,...t){let r=t.slice(0,-1),i=t[t.length-1],n=e;for(let e=0;e{fw(),Rk(),jw(),Ik(),Dk(),yw(),Tw(),bw(),zw(),Iw(),mt(Ww,"mergeWith"),mt(Uw,"mergeWithDeep")});function Vw(e,...t){return Ww(e,...t,Ew)}var Yw=r(()=>{Gw(),_w(),mt(Vw,"merge")});function Hw(e){var t;return null==e||(Ek(e)?!("function"!=typeof e.splice&&"string"!=typeof e&&("u""constructor"!==e).length:0===t.length)))}var Xw=r(()=>{yw(),_k(),Iw(),Rw(),mt(Hw,"isEmpty")}),Kw=r(()=>{Sw(),$w(),Yw(),Xw()});function Zw(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),pC[e]??t):t}function Qw(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,uC.sanitizeUrl)(e):e}function Jw(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function eC(e){let t,r=0;e.forEach(e=>{r+=Jw(e,t),t=e});var i=r/2;return TC(e,i)}function tC(e){return 1===e.length?e[0]:eC(e)}function rC(e,t,r){var r=structuredClone(r),i=(P.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),i=TC(r,i),e=10+.5*e,n=Math.atan2(r[0].y-i.y,r[0].x-i.x),a={x:0,y:0};return"start_left"===t?(a.x=Math.sin(n+Math.PI)*e+(r[0].x+i.x)/2,a.y=-Math.cos(n+Math.PI)*e+(r[0].y+i.y)/2):"end_right"===t?(a.x=Math.sin(n-Math.PI)*e+(r[0].x+i.x)/2-5,a.y=-Math.cos(n-Math.PI)*e+(r[0].y+i.y)/2-5):"end_left"===t?(a.x=Math.sin(n)*e+(r[0].x+i.x)/2-5,a.y=-Math.cos(n)*e+(r[0].y+i.y)/2-5):(a.x=Math.sin(n)*e+(r[0].x+i.x)/2,a.y=-Math.cos(n)*e+(r[0].y+i.y)/2),a}function iC(e){let t="",r="";for(var i of e)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}function nC(t){let r="",i="0123456789abcdef",n=i.length;for(let e=0;eMath.round(parseFloat(e)).toString())).includes(r.toString())||t.includes(e.toString())}var uC,dC,pC,gC,fC,mC,yC,vC,bC,xC,TC,kC,wC,CC,SC,EC,_C,AC,RC,LC,IC,NC,DC,MC,OC,PC,BC,$C,FC,zC=r(()=>{uC=j(Tk(),1),bk(),th(),ki(),e(),kh(),Lr(),Kw(),xh(),dC="​",pC={curveBasis:F5,curveBasisClosed:j5,curveBasisOpen:G5,curveBumpX:I5,curveBumpY:N5,curveBundle:H5,curveCardinalClosed:t3,curveCardinalOpen:n3,curveCardinal:Q5,curveCatmullRomClosed:u3,curveCatmullRomOpen:g3,curveCatmullRom:l3,curveLinear:v5,curveLinearClosed:y3,curveMonotoneX:E3,curveMonotoneY:_3,curveNatural:I3,curveStep:M3,curveStepAfter:P3,curveStepBefore:O3},gC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,fC=mt(function(e,t){var r,i=mC(e,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(e=>e.args),nr(r),Ee(n,[...r])):i.args)return r=ch(e,t),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),mC=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${gC.source})(?=[}][%]{2}).* `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var i,n,a,s=[];null!==(i=ah.exec(e));)i.index===ah.lastIndex&&ah.lastIndex++,(i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t))&&(n=i[1]||i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null,s.push({type:n,args:a}));return 0===s.length?{type:e,args:null}:1===s.length?s[0]:s}catch(r){return P.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),yC=mt(function(e){return e.replace(ah,"")},"removeDirectives"),vC=mt(function(e,t){for(var[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray"),mt(Zw,"interpolateToCurve"),mt(Qw,"formatUrl"),bC=mt((t,...e)=>{let r=t.split("."),i=r.length-1,n=r[i],a=window;for(let e=0;e(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),TC=mt((e,t)=>{let r,i=t;for(var n of e){if(r){var a=Jw(n,r);if(0===a)return r;if(a{P.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=TC(t,25),e=e?10:5,i=Math.atan2(t[0].y-r.y,t[0].x-r.x),n={x:0,y:0};return n.x=Math.sin(i)*e+(t[0].x+r.x)/2,n.y=-Math.cos(i)*e+(t[0].y+r.y)/2,n},"calcCardinalityPosition"),mt(rC,"calcTerminalLabelPosition"),mt(iC,"getStylesFromArray"),wC=0,CC=mt(()=>(wC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wC),"generateId"),mt(nC,"makeRandomHex"),SC=mt(e=>nC(e.length),"random"),EC=mt(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"),_C=mt(function(e,t){var r=t.text.replace(I.lineBreakRegex," "),[,i]=OC(t.fontSize);return(e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.style("text-anchor",t.anchor),e.style("font-family",t.fontFamily),e.style("font-size",i),e.style("font-weight",t.fontWeight),e.attr("fill",t.fill),void 0!==t.class&&e.attr("class",t.class),(i=e.append("tspan")).attr("x",t.x+2*t.textMargin),i.attr("fill",t.fill),i.text(r),e},"drawSimpleText"),AC=Cw((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),I.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),c=[],h="";return l.forEach((e,t)=>{var r,i,n=sC(e+" ",o),a=sC(h,o);h=s""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),RC=Cw((e,i,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...e],o=[],l="";return s.forEach((e,t)=>{var r,e=""+l+e;l=sC(e,a)>=i?(t+=1,t=s.length===t,r=e+n,o.push(t?e:r),""):e}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",i)=>""+e+t+r+i.fontSize+i.fontWeight+i.fontFamily),mt(aC,"calculateTextHeight"),mt(sC,"calculateTextWidth"),LC=Cw((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};var[,n]=OC(t),t=["sans-serif",r],a=e.split(I.lineBreakRegex),s=[];if(!(r=Q("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of t){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=EC();if(u.text=c||dC,0===(u=((u=_C(l,u).style("font-size",n).style("font-weight",i).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(e,t)=>""+e+t.fontSize+t.fontWeight+t.fontFamily),IC=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{mt(this,"InitIDGenerator")}},DC=mt(function(e){return NC=NC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),NC.innerHTML=e,unescape(NC.textContent)},"entityDecode"),mt(oC,"isDetailedError"),MC=mt((e,t,r,i)=>{var n;i&&(n=e.node()?.getBBox())&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),OC=mt(e=>{var t;return"number"==typeof e?[e,e+"px"]:(t=parseInt(e??"",10),Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e])},"parseFontSize"),mt(lC,"cleanAndMerge"),PC={assignWithDepth:Ee,wrapLabel:AC,calculateTextHeight:aC,calculateTextWidth:sC,calculateTextDimensions:LC,cleanAndMerge:lC,detectInit:fC,detectDirective:mC,isSubstringInArray:vC,interpolateToCurve:Zw,calcLabelPosition:tC,calcCardinalityPosition:kC,calcTerminalLabelPosition:rC,formatUrl:Qw,getStylesFromArray:iC,generateId:CC,random:SC,runFunc:bC,entityDecode:DC,insertTitle:MC,isLabelCoordinateInPath:hC,parseFontSize:OC,InitIDGenerator:IC},BC=mt(function(e){let t=e;return t=(t=(t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/#\w+;/g,function(e){return e=e.substring(1,e.length-1),/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),$C=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),FC=mt((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+e+`_${t}_`+r+(n?"_"+n:""),"getEdgeId"),mt(cC,"handleUndefinedAttr"),mt(hC,"isLabelCoordinateInPath")});function qC(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=AC(t[e].text,n,i),t[e].textLines=t[e].text.split(I.lineBreakRegex).length,t[e].width=n,t[e].height=aC(t[e].text,i);else{var a,s,r=t[e].text.split(I.lineBreakRegex);t[e].textLines=r.length,t[e].height=0,t[e].width=0;for(s of r)t[e].width=Math.max(sC(s,i),t[e].width),a=aC(s,i),t[e].height=t[e].height+a}}function jC(t,r,i,e,n){var a,s,o=new HC(n);o.data.widthLimit=i.data.widthLimit/Math.min(VC,e.length);for([a,s]of e.entries()){let e=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=e,e=s.image.Y+s.image.height);var l=s.wrap&&YC.wrap,c=ZC(YC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",qC("label",s,l,c,o.data.widthLimit),s.label.Y=e+8,e=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",qC("type",s,l,c=ZC(YC),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=ZC(YC)).fontSize=c.fontSize-2,qC("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%VC==0?(l=i.data.startx+YC.diagramMarginX,i.data.stopy+YC.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+YC.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,n.db.getC4ShapeArray(s.alias));0<(c=n.db.getC4ShapeKeys(s.alias)).length&&e6(o,t,l,c),r=s.alias,0<(l=n.db.getBoundaries(r)).length&&jC(t,0,o,l,n),"global"!==s.alias&&JC(t,s,o),i.data.stopy=Math.max(o.data.stopy+YC.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+YC.c4ShapeMargin,i.data.stopx),WC=Math.max(WC,i.data.stopx),UC=Math.max(UC,i.data.stopy)}}var WC,UC,GC,VC,YC,HC,XC,KC,ZC,QC,JC,e6,t6,r6,i6,n6,a6,s6,o6,l6,c6=r(()=>{bk(),wk(),e(),wh(),th(),Gu(),Uu(),Lr(),zC(),Ch(),UC=WC=0,GC=4,VC=2,ph.yy=ju,YC={},HC=class{static{mt(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,XC(e.db.getConfig())}setData(e,t,r,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=i}updateVal(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+2*e.margin,r=t+e.width,i=this.nextData.starty+2*e.margin,n=i+e.height;(t>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>GC)&&(t=this.nextData.startx+e.margin+YC.nextLinePaddingX,i=this.nextData.stopy+2*e.margin,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+e.height,this.nextData.cnt=1),e.x=t,e.y=i,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,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},XC(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},XC=mt(function(e){Ee(YC,e),e.fontFamily&&(YC.personFontFamily=YC.systemFontFamily=YC.messageFontFamily=e.fontFamily),e.fontSize&&(YC.personFontSize=YC.systemFontSize=YC.messageFontSize=e.fontSize),e.fontWeight&&(YC.personFontWeight=YC.systemFontWeight=YC.messageFontWeight=e.fontWeight)},"setConf"),KC=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),ZC=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),QC=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(qC,"calcC4ShapeTextWH"),JC=mt(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=YC.c4ShapeMargin-35;var r=t.wrap&&YC.wrap,i=ZC(YC),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",sC(t.label.text,i));qC("label",t,r,i,n),gk.drawBoundary(e,t,YC)},"drawBoundary"),e6=mt(function(r,i,n,e){let a=0;for(var s of e){a=0;var o=n[s];switch((s=KC(YC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=sC("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=YC.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&YC.wrap,l=YC.width-2*YC.c4ShapePadding,c=KC(YC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",qC("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",qC("type",o,s,KC(YC,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",qC("techn",o,s,KC(YC,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let e=a,t=o.label.width;o.descr&&""!==o.descr.text&&(qC("descr",o,s,KC(YC,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,t=Math.max(o.label.width,o.descr.width),e=a-5*o.descr.textLines),t+=YC.c4ShapePadding,o.width=Math.max(o.width||YC.width,t,YC.width),o.height=Math.max(o.height||YC.height,e,YC.height),o.margin=o.margin||YC.c4ShapeMargin,r.insert(o),gk.drawC4Shape(i,o,YC)}r.bumpLastMargin(YC.c4ShapeMargin)},"drawC4ShapeArray"),t6=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},r6=mt(function(e,t){let r=e.x,i=e.y,n=t.x,a=t.y,s=r+e.width/2,o=i+e.height/2,l=Math.abs(r-n),c=Math.abs(i-a),h=c/l,u=e.height/e.width,d=null;return i==a&&r{o6=mt(e=>`.person { stroke: ${e.personBorder}; fill: ${e.personBkg}; } `,"getStyles"),l6=o6}),u6={};Vat(u6,{diagram:()=>d6});var d6,p6=r(()=>{wh(),Gu(),c6(),h6(),d6={parser:gh,db:ju,renderer:s6,styles:l6,init:mt(({c4:e,wrap:t})=>{s6.setConf(e),ju.setWrap(t)},"init")}});function g6(e){return"u">16&255),a.push(n>>8&255),a.push(255&n)),n=n<<6|i.indexOf(t.charAt(s));return 0==(e=r%4*6)?(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)):18==e?(a.push(n>>10&255),a.push(n>>2&255)):12==e&&a.push(n>>4&255),new Uint8Array(a)}function Q6(e){for(var t,r="",i=0,n=e.length,a=DE,s=0;s>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]),i=(i<<8)+e[s];return 0==(t=n%3)?r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]:2==t?r=(r=(r=(r+=a[i>>10&63])+a[i>>4&63])+a[i<<2&63])+a[64]:1==t&&(r=(r=(r=(r+=a[i>>2&63])+a[i<<4&63])+a[64])+a[64]),r}function J6(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function eS(e){if(null!==e)for(var t,r,i,n=[],a=e,s=0,o=a.length;s>10),56320+(e-65536&1023))}function mS(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function yS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||jE,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function vS(e,t){return(e={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart}).snippet=kE(e),new TE(t,e)}function bS(e,t){throw vS(e,t)}function xS(e,t){e.onWarning&&e.onWarning.call(null,vS(e,t))}function TS(e,t,r,i){var n,a,s,o;if(tl&&(l=e.lineIndent),oS(u))c++;else{if(e.lineIndentt)&&0!==i)bS(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(s=e.line,o=e.lineStart,l=e.position),$S(e,t,YE,!0,n)&&(y?f=e.result:m=e.result),y||(wS(e,d,p,g,f,m,s,o,l),g=f=m=null),SS(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)bS(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l"),null!==e.result&&u.kind!==e.kind&&bS(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result,e.tag)?(e.result=u.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):bS(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function FS(e){var t,r,i,n,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(n=e.input.charCodeAt(e.position))&&(SS(e,!0,-1),n=e.input.charCodeAt(e.position),!(0{if(0===a.length)return n.quotingType===g_?'""':"''";if(!n.noCompatMode&&(-1!==d_.indexOf(a)||p_.test(a)))return n.quotingType===g_?'"'+a+'"':"'"+a+"'";var e=n.indent*Math.max(1,s),t=-1===n.lineWidth?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-e),r=o||-1=n.flowLevel;function i(e){return HS(n,e)}switch(mt(i,"testAmbiguity"),iE(a,r,n.indent,t,i,n.quotingType,n.forceQuotes&&!o,l)){case f_:return a;case m_:return"'"+a.replace(/'/g,"''")+"'";case y_:return"|"+aE(a,n.indent)+sE(VS(a,e));case v_:return">"+aE(a,n.indent)+sE(VS(oE(a,t),e));case b_:return'"'+cE(a)+'"';default:throw new TE("impossible error: invalid scalar style")}})()}function aE(e,t){var t=rE(e)?String(t):"",r=e[e.length-1]===` `;return t+(!r||e[e.length-2]!==` `&&e!==` `?r?"":"-":"+")+` `}function sE(e){return e[e.length-1]===` `?e.slice(0,-1):e}function oE(e,t){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=e.indexOf(` `))?r:e.length,i.lastIndex=r,lE(e.slice(0,r),t)),a=e[0]===` `||" "===e[0];o=i.exec(e);){var s=o[1],o=o[2],l=" "===o[0];n+=s+(a||l||""===o?"":` `)+lE(o,t),a=l}return n}function lE(e,t){if(""===e||" "===e[0])return e;for(var r,i,n=/ [^ ]/g,a=0,s=0,o="";i=n.exec(e);)t<(i=i.index)-a&&(o+=` `+e.slice(a,r=at&&a tag resolver accepts not "'+a+'" style');i=n.represent[a](t,a)}e.dump=i}return!0}return!1}function fE(e,t,r,i,n,a,s){e.tag=null,e.dump=r,gE(e,r,!1)||gE(e,r,!0);var o,l,c=o_.call(e.dump),h=i,u=(i=i&&(e.flowLevel<0||e.flowLevel>t),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&0",e.dump=r+" "+e.dump)}return!0}function mE(e,t){var r,i,n=[],a=[];for(yE(e,n,a),r=0,i=a.length;r{for(mt(g6,"isNothing"),mt(f6,"isObject"),mt(m6,"toArray"),mt(y6,"extend"),mt(v6,"repeat"),mt(b6,"isNegativeZero"),xE={isNothing:g6,isObject:f6,toArray:m6,repeat:v6,isNegativeZero:b6,extend:y6},mt(x6,"formatError"),mt(T6,"YAMLException$1"),((T6.prototype=Object.create(Error.prototype)).constructor=T6).prototype.toString=mt(function(e){return this.name+": "+x6(this,e)},"toString"),TE=T6,mt(k6,"getLine"),mt(w6,"padStart"),mt(C6,"makeSnippet"),kE=C6,wE=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],CE=["scalar","sequence","mapping"],mt(S6,"compileStyleAliases"),mt(E6,"Type$1"),SE=E6,mt(_6,"compileList"),mt(A6,"compileMap"),mt(R6,"Schema$1"),R6.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof SE)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new TE("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}return t.forEach(function(e){if(!(e instanceof SE))throw new TE("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new TE("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new TE("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(e){if(!(e instanceof SE))throw new TE("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(R6.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=_6(e,"implicit"),e.compiledExplicit=_6(e,"explicit"),e.compiledTypeMap=A6(e.compiledImplicit,e.compiledExplicit),e},"extend"),AE=R6,s_=new SE("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),IE=new SE("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),NE=new SE("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),AE=new AE({explicit:[s_,IE,NE]}),mt(L6,"resolveYamlNull"),mt(I6,"constructYamlNull"),mt(N6,"isNull"),s_=new SE("tag:yaml.org,2002:null",{kind:"scalar",resolve:L6,construct:I6,predicate:N6,represent:{canonical:mt(function(){return"~"},"canonical"),lowercase:mt(function(){return"null"},"lowercase"),uppercase:mt(function(){return"NULL"},"uppercase"),camelcase:mt(function(){return"Null"},"camelcase"),empty:mt(function(){return""},"empty")},defaultStyle:"lowercase"}),mt(D6,"resolveYamlBoolean"),mt(M6,"constructYamlBoolean"),mt(O6,"isBoolean"),IE=new SE("tag:yaml.org,2002:bool",{kind:"scalar",resolve:D6,construct:M6,predicate:O6,represent:{lowercase:mt(function(e){return e?"true":"false"},"lowercase"),uppercase:mt(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:mt(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),mt(P6,"isHexCode"),mt(B6,"isOctCode"),mt($6,"isDecCode"),mt(F6,"resolveYamlInteger"),mt(z6,"constructYamlInteger"),mt(q6,"isInteger"),NE=new SE("tag:yaml.org,2002:int",{kind:"scalar",resolve:F6,construct:z6,predicate:q6,represent:{binary:mt(function(e){return 0<=e?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:mt(function(e){return 0<=e?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:mt(function(e){return e.toString(10)},"decimal"),hexadecimal:mt(function(e){return 0<=e?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),EE=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(j6,"resolveYamlFloat"),mt(W6,"constructYamlFloat"),_E=/^[-+]?[0-9]+e/,mt(U6,"representYamlFloat"),mt(G6,"isFloat"),ME=new SE("tag:yaml.org,2002:float",{kind:"scalar",resolve:j6,construct:W6,predicate:G6,represent:U6,defaultStyle:"lowercase"}),AE=AE.extend({implicit:[s_,IE,NE,ME]}),s_=AE,RE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),LE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),mt(V6,"resolveYamlTimestamp"),mt(Y6,"constructYamlTimestamp"),mt(H6,"representYamlTimestamp"),IE=new SE("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:V6,construct:Y6,instanceOf:Date,represent:H6}),mt(X6,"resolveYamlMerge"),NE=new SE("tag:yaml.org,2002:merge",{kind:"scalar",resolve:X6}),DE=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`,mt(K6,"resolveYamlBinary"),mt(Z6,"constructYamlBinary"),mt(Q6,"representYamlBinary"),mt(J6,"isBinary"),ME=new SE("tag:yaml.org,2002:binary",{kind:"scalar",resolve:K6,construct:Z6,predicate:J6,represent:Q6}),OE=Object.prototype.hasOwnProperty,PE=Object.prototype.toString,mt(eS,"resolveYamlOmap"),mt(tS,"constructYamlOmap"),BE=new SE("tag:yaml.org,2002:omap",{kind:"sequence",resolve:eS,construct:tS}),$E=Object.prototype.toString,mt(rS,"resolveYamlPairs"),mt(iS,"constructYamlPairs"),FE=new SE("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rS,construct:iS}),zE=Object.prototype.hasOwnProperty,mt(nS,"resolveYamlSet"),mt(aS,"constructYamlSet"),qE=new SE("tag:yaml.org,2002:set",{kind:"mapping",resolve:nS,construct:aS}),jE=s_.extend({implicit:[IE,NE],explicit:[ME,BE,FE,qE]}),WE=Object.prototype.hasOwnProperty,YE=4,HE=UE=1,XE=GE=2,KE=VE=3,ZE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,QE=/[\x85\u2028\u2029]/,JE=/[,\[\]\{\}]/,e_=/^(?:!|!!|![a-z\-]+!)$/i,t_=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(sS,"_class"),mt(oS,"is_EOL"),mt(lS,"is_WHITE_SPACE"),mt(cS,"is_WS_OR_EOL"),mt(hS,"is_FLOW_INDICATOR"),mt(uS,"fromHexCode"),mt(dS,"escapedHexLen"),mt(pS,"fromDecimalCode"),mt(gS,"simpleEscapeSequence"),mt(fS,"charFromCodepoint"),mt(mS,"setProperty"),r_=new Array(256),i_=new Array(256),n_=0;n_<256;n_++)r_[n_]=gS(n_)?1:0,i_[n_]=gS(n_);mt(yS,"State$1"),mt(vS,"generateError"),mt(bS,"throwError"),mt(xS,"throwWarning"),a_={YAML:mt(function(e,t,r){var i,n;null!==e.version&&bS(e,"duplication of %YAML directive"),1!==r.length&&bS(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&bS(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&bS(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=n<2,1!==n&&2!==n&&xS(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var i;2!==r.length&&bS(e,"TAG directive accepts exactly two arguments"),i=r[1],e_.test(r=r[0])||bS(e,"ill-formed tag handle (first argument) of the TAG directive"),WE.call(e.tagMap,r)&&bS(e,'there is a previously declared suffix for "'+r+'" tag handle'),t_.test(i)||bS(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{bS(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i},"handleTagDirective")},mt(TS,"captureSegment"),mt(kS,"mergeMappings"),mt(wS,"storeMappingPair"),mt(CS,"readLineBreak"),mt(SS,"skipSeparationSpace"),mt(ES,"testDocumentSeparator"),mt(_S,"writeFoldedLines"),mt(AS,"readPlainScalar"),mt(RS,"readSingleQuotedScalar"),mt(LS,"readDoubleQuotedScalar"),mt(IS,"readFlowCollection"),mt(NS,"readBlockScalar"),mt(DS,"readBlockSequence"),mt(MS,"readBlockMapping"),mt(OS,"readTagProperty"),mt(PS,"readAnchorProperty"),mt(BS,"readAlias"),mt($S,"composeNode"),mt(FS,"readDocument"),mt(zS,"loadDocuments"),mt(qS,"loadAll$1"),mt(jS,"load$1"),s_={loadAll:qS,load:jS},o_=Object.prototype.toString,l_=Object.prototype.hasOwnProperty,c_=65279,h_=10,u_={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},d_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],p_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(WS,"compileStyleMap"),mt(US,"encodeHex"),g_=2,mt(GS,"State"),mt(VS,"indentString"),mt(YS,"generateNextLine"),mt(HS,"testImplicitResolving"),mt(XS,"isWhitespace"),mt(KS,"isPrintable"),mt(ZS,"isNsCharOrWhitespace"),mt(QS,"isPlainSafe"),mt(JS,"isPlainSafeFirst"),mt(eE,"isPlainSafeLast"),mt(tE,"codePointAt"),mt(rE,"needIndentIndicator"),f_=1,m_=2,y_=3,v_=4,b_=5,mt(iE,"chooseScalarStyle"),mt(nE,"writeScalar"),mt(aE,"blockHeader"),mt(sE,"dropEndingNewline"),mt(oE,"foldString"),mt(lE,"foldLine"),mt(cE,"escapeString"),mt(hE,"writeFlowSequence"),mt(uE,"writeBlockSequence"),mt(dE,"writeFlowMapping"),mt(pE,"writeBlockMapping"),mt(gE,"detectType"),mt(fE,"writeNode"),mt(mE,"getDuplicateReferences"),mt(yE,"inspectNode"),mt(vE,"dump$1"),mt(bE,"renamed"),x_=AE,T_=s_.load,bE("safeLoad","load"),bE("safeLoadAll","loadAll"),bE("safeDump","dump")});function w_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function C_(e){M_=e}function S_(e,t=""){let i="string"==typeof e?e:e.source,n={replace:mt((e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(P_.caret,"$1"),i=i.replace(e,r),n},"replace"),getRegex:mt(()=>new RegExp(i,t),"getRegex")};return n}function E_(e,t){if(t){if(P_.escapeTest.test(e))return e.replace(P_.escapeReplace,o7)}else if(P_.escapeTestNoEncode.test(e))return e.replace(P_.escapeReplaceNoEncode,o7);return e}function __(e){try{e=encodeURI(e).replace(P_.percentDecode,"%")}catch{return null}return e}function A_(e,t){let r=e.replace(P_.findPipe,(e,t,r)=>{let i=!1,n=t;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(P_.splitPipe),n=0;if(i[0].trim()||i.shift(),0t)i.splice(t);else for(;i.length{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=i.length)?e.slice(i.length):e}).join(` `)}function D_(e,t){return f7.parse(e,t)}var M_,O_,P_,B_,$_,F_,z_,q_,j_,W_,U_,G_,V_,Y_,H_,X_,K_,Z_,Q_,J_,e7,t7,r7,i7,n7,a7,s7,o7,l7,c7,h7,u7,d7,p7,g7,f7,m7=r(()=>{mt(w_,"L"),M_=w_(),mt(C_,"G"),O_={exec:mt(()=>null,"exec")},mt(S_,"h"),P_={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:mt(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},j_=/^(?:[ \t]*(?:\n|$))+/,W_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,F_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y_=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,z_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,q_=/(?:[*+-]|\d{1,9}[.)])/,r7=S_(Z_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,q_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Z_=S_(Z_).replace(/bull/g,q_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),e7=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,H_=/^[^\n]+/,Q_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$_=S_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Q_).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),q_=S_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,q_).getRegex(),t7="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K_=/|$))/,i7=S_("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",K_).replace("tag",t7).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X_=S_(e7).replace("hr",Y_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",t7).getRegex(),B_={blockquote:S_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",X_).getRegex(),code:W_,def:$_,fences:F_,heading:z_,hr:Y_,html:i7,lheading:r7,list:q_,newline:j_,paragraph:X_,table:O_,text:H_},W_=S_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",t7).getRegex(),$_={...B_,lheading:Z_,table:W_,paragraph:S_(e7).replace("hr",Y_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",W_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",t7).getRegex()},F_={...B_,html:S_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S_(e7).replace("hr",Y_).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",r7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,i7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,q_=/^( {2,}|\\)\n(?!\s*$)/,j_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,g7=S_(U_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,X_).getRegex(),U_=S_(U_,"u").replace(/punct/g,t7).getRegex(),G_=S_(V_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Z_).replace(/punctSpace/g,H_).replace(/punct/g,X_).getRegex(),V_=S_(V_,"gu").replace(/notPunctSpace/g,Y_).replace(/punctSpace/g,e7).replace(/punct/g,t7).getRegex(),Y_=S_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Z_).replace(/punctSpace/g,H_).replace(/punct/g,X_).getRegex(),e7=S_(/\\(punct)/,"gu").replace(/punct/g,X_).getRegex(),t7=S_(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Z_=S_(K_).replace("(?:--\x3e|$)","--\x3e").getRegex(),H_=S_("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Z_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X_=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,K_=S_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",X_).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Z_=S_(/^!?\[(label)\]\[(ref)\]/).replace("label",X_).replace("ref",Q_).getRegex(),Q_=S_(/^!?\[(ref)\](?:\[\])?/).replace("ref",Q_).getRegex(),J_=S_("reflink|nolink(?!\\()","g").replace("reflink",Z_).replace("nolink",Q_).getRegex(),t7={...e7={_backpedal:O_,anyPunctuation:e7,autolink:t7,blockSkip:r7,br:q_,code:i7,del:O_,emStrongLDelim:g7,emStrongRDelimAst:G_,emStrongRDelimUnd:Y_,escape:z_,link:K_,nolink:Q_,punctuation:W_,reflink:Z_,reflinkSearch:J_,tag:H_,text:j_,url:O_},link:S_(/^!?\[(label)\]\((.*?)\)/).replace("label",X_).getRegex(),reflink:S_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X_).getRegex()},r7={...e7,emStrongRDelimAst:V_,emStrongLDelim:U_,url:S_(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},o7=mt(e=>s7[e],"ke"),mt(E_,"w"),mt(__,"J"),mt(A_,"V"),mt(R_,"z"),mt(L_,"ge"),mt(I_,"fe"),mt(N_,"Je"),l7=class{static{mt(this,"y")}options;rules;lexer;constructor(e){this.options=e||M_}space(e){if((e=this.rules.block.newline.exec(e))&&0" ".repeat(3*e.length)),n=d.split(` `,1)[0],a=!i.trim(),s=0;if(this.options.pedantic?(s=2,r=i.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=i.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(n)&&(t+=n+` `,d=d.substring(n.length+1),e=!0),!e)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var b,x=d.split(` `,1)[0];if(n=x,b=this.options.pedantic?n=n.replace(this.rules.other.listReplaceNesting," "):n.replace(this.rules.other.tabCharGlobal," "),m.test(n)||y.test(n)||v.test(n)||g.test(n)||f.test(n))break;if(b.search(this.rules.other.nonSpaceChar)>=s||!n.trim())r+=` `+b.slice(s);else{if(a||4<=i.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(i)||y.test(i)||f.test(i))break;r+=` `+n}a||n.trim()||(a=!0),t+=x+` `,d=d.substring(x.length+1),i=b.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(t)&&(u=!0));let o=null,l;this.options.gfm&&(o=this.rules.other.listIsTask.exec(r))&&(l="[ ] "!==o[0],r=r.replace(this.rules.other.listReplaceTask,"")),c.items.push({type:"list_item",raw:t,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=t}var r,i=c.items.at(-1);if(i){i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),c.raw=c.raw.trimEnd();for(let e=0;e"space"===e.type)).length&&r.some(e=>this.rules.other.anyLine.test(e.raw)),c.loose=r);if(c.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}}lheading(e){if(e=this.rules.block.lheading.exec(e))return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(e){var t;if(e=this.rules.block.paragraph.exec(e))return t=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1],{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}text(e){if(e=this.rules.block.text.exec(e))return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(e){if(e=this.rules.inline.escape.exec(e))return{type:"escape",raw:e[0],text:e[1]}}tag(e){if(e=this.rules.inline.tag.exec(e))return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var i,n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var a=R_(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else{if(-2===(a=L_(r[2],"()")))return;-1!!(t=e.call({lexer:this},n,r))&&(n=n.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(n)){n=n.substring(t.raw.length);var e=r.at(-1);1===t.raw.length&&void 0!==e?e.raw+=` `:r.push(t)}else if(t=this.tokenizer.code(n))n=n.substring(t.raw.length),"paragraph"===(e=r.at(-1))?.type||"text"===e?.type?(e.raw+=(e.raw.endsWith(` `)?"":` `)+t.raw,e.text+=` `+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t);else if(t=this.tokenizer.fences(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(n)){n=n.substring(t.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=(a.raw.endsWith(` `)?"":` `)+t.raw,a.text+=` `+t.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},r.push(t))}else if(t=this.tokenizer.table(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(n))n=n.substring(t.raw.length),r.push(t);else{let e=n;if(this.options.extensions?.startBlock){let t=1/0,r=n.slice(1),i;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(i=e.call({lexer:this},r))&&0<=i&&(t=Math.min(t,i))}),t<1/0&&0<=t&&(e=n.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(e)))a=r.at(-1),i&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith(` `)?"":` `)+t.raw,a.text+=` `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(t),i=e.length!==n.length,n=n.substring(t.raw.length);else if(t=this.tokenizer.text(n)){n=n.substring(t.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=(s.raw.endsWith(` `)?"":` `)+t.raw,s.text+=` `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(t)}else if(n){if(s="Infinite loop on byte: "+n.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(n,r=[]){let e=n,t=null;if(this.tokens.links){var i=Object.keys(this.tokens.links);if(0!!(t=e.call({lexer:this},n,r))&&(n=n.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(t.raw.length);var o=r.at(-1);"text"===t.type&&"text"===o?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t)}else if(t=this.tokenizer.emStrong(n,e,s))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(n))n=n.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(n)))n=n.substring(t.raw.length),r.push(t);else{let e=n;if(this.options.extensions?.startInline){let t=1/0,r=n.slice(1),i;this.options.extensions.startInline.forEach(e=>{"number"==typeof(i=e.call({lexer:this},r))&&0<=i&&(t=Math.min(t,i))}),t<1/0&&0<=t&&(e=n.substring(0,t+1))}if(t=this.tokenizer.inlineText(e))n=n.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(s=t.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t);else if(n){var l="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},h7=class{static{mt(this,"P")}options;parser;constructor(e){this.options=e||M_}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(P_.notSpaceStart)?.[0],e=e.replace(P_.endingNewline,"")+` `,t?'
'+(r?e:E_(e,!0))+`
`:"
"+(r?e:E_(e,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e `+i+" `}listitem(e){let t="",r;return e.task&&(r=this.checkbox({checked:!!e.checked}),e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&0${t+=this.parser.parse(e.tokens,!!e.loose)} `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

${this.parser.parseInline(e)}

`}table(t){let e="",r="";for(let e=0;e `+e+` `+(i=i&&`${i}`)+` `}tablerow({text:e}){return` ${e} `}tablecell(e){var t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${E_(e,!0)}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){var r=this.parser.parseInline(r),i=__(e);if(null===i)return r;let n='
"}image({href:e,title:t,text:r,tokens:i}){if(i&&(r=this.parser.parseInline(i,this.parser.textRenderer)),null===(i=__(e)))return E_(r);let n=`${r}{e=t[e].flat(1/0),i=i.concat(this.walkTokens(e,r))}):t.tokens&&(i=i.concat(this.walkTokens(t.tokens,r)))}}return i}use(...e){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{var e={...a};if(e.async=this.defaults.async||e.async||!1,a.extensions&&(a.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let r=n.renderers[i.name];r?n.renderers[i.name]=function(...e){var t=i.renderer.apply(this,e);return!1===t?r.apply(this,e):t}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||"block"!==i.level&&"inline"!==i.level)throw new Error("extension level must be 'block' or 'inline'");var e=n[i.level];e?e.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&("block"===i.level?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:"inline"===i.level&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),e.extensions=n),a.renderer){let n=this.defaults.renderer||new h7(this.defaults);for(var t in a.renderer){if(!(t in n))throw new Error(`renderer '${t}' does not exist`);if(!["options","parser"].includes(t)){let e=t,r=a.renderer[e],i=n[e];n[e]=(...e)=>{var t=r.apply(n,e);return(!1===t?i.apply(n,e):t)||""}}}e.renderer=n}if(a.tokenizer){let n=this.defaults.tokenizer||new l7(this.defaults);for(var s in a.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let e=s,r=a.tokenizer[e],i=n[e];n[e]=(...e)=>{var t=r.apply(n,e);return!1===t?i.apply(n,e):t}}}e.tokenizer=n}if(a.hooks){let n=this.defaults.hooks||new p7;for(let t in a.hooks){if(!(t in n))throw new Error(`hook '${t}' does not exist`);if(!["options","block"].includes(t)){let e=t,r=a.hooks[e],i=n[e];p7.passThroughHooks.has(t)?n[e]=e=>this.defaults.async&&p7.passThroughHooksRespectAsync.has(t)?Promise.resolve(r.call(n,e)).then(e=>i.call(n,e)):(e=r.call(n,e),i.call(n,e)):n[e]=(...e)=>{var t=r.apply(n,e);return!1===t?i.apply(n,e):t}}}e.hooks=n}if(a.walkTokens){let r=this.defaults.walkTokens,i=a.walkTokens;e.walkTokens=function(e){let t=[];return t.push(i.call(this,e)),t=r?t.concat(r.call(this,e)):t}}this.defaults={...this.defaults,...e}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return c7.lex(e,t??this.defaults)}parser(e,t){return d7.parse(e,t??this.defaults)}parseMarkdown(o){return(r,e)=>{let t={...e},i={...this.defaults,...t},n=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===t.async)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("u"a(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(n);try{i.hooks&&(r=i.hooks.preprocess(r));let e=a(r,i),t=(i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens),s(e,i));return i.hooks?i.hooks.postprocess(t):t}catch(e){return n(e)}}}onError(r,i){return e=>{var t;if(e.message+=` Please report this to https://github.com/markedjs/marked.`,r)return t="

An error occurred:

"+E_(e.message+"",!0)+"
",i?Promise.resolve(t):t;if(i)return Promise.reject(e);throw e}}},f7=new g7,mt(D_,"d"),D_.options=D_.setOptions=function(e){return f7.setOptions(e),C_(D_.defaults=f7.defaults),D_},D_.getDefaults=w_,D_.defaults=M_,D_.use=function(...e){return f7.use(...e),C_(D_.defaults=f7.defaults),D_},D_.walkTokens=function(e,t){return f7.walkTokens(e,t)},D_.parseInline=f7.parseInline,D_.Parser=d7,D_.parser=d7.parse,D_.Renderer=h7,D_.TextRenderer=u7,D_.Lexer=c7,D_.lexer=c7.lex,D_.Tokenizer=l7,D_.Hooks=p7,D_.parse=D_,c7.lex});function y7(e,{}){return ih(e.replace(//g,` `).replace(/\n{2,}/g,` `))}function v7(e){return e.split(/\\n|\n|/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:"normal"}))??[])}function b7(e,t={}){let r=y7(e,t),i=D_.lexer(r),n=[[]],a=0;function s(t,r="normal"){"text"===t.type?t.text.split(` `).forEach((e,t)=>{0!==t&&(a++,n.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&n[a].push({content:e,type:r})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[a].push({content:t.text,type:"normal"})}return mt(s,"processNode"),i.forEach(e=>{"paragraph"===e.type?e.tokens?.forEach(e=>{s(e)}):"html"===e.type?n[a].push({content:e.text,type:"normal"}):n[a].push({content:e.raw,type:"normal"})}),n}function x7(e){return e?`

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

`:""}function T7(e,{markdownAutoWrap:t}={}){function r(e){return"text"===e.type?!1===t?e.text.replace(/\n */g,"
").replace(/ /g," "):e.text.replace(/\n */g,"
"):"strong"===e.type?`${e.tokens?.map(r).join("")}`:"em"===e.type?`${e.tokens?.map(r).join("")}`:"paragraph"===e.type?`

${e.tokens?.map(r).join("")}

`:"space"===e.type?"":"html"===e.type?""+e.text:"escape"===e.type?e.text:(P.warn("Unsupported markdown: "+e.type),e.raw)}return e=D_.lexer(e),mt(r,"output"),e.map(r).join("")}var k7=r(()=>{m7(),bh(),e(),mt(y7,"preprocessMarkdown"),mt(v7,"nonMarkdownToLines"),mt(b7,"markdownToLines"),mt(x7,"nonMarkdownToHTML"),mt(T7,"markdownToHTML")});function w7(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function C7(e,t){return S7(e,[],w7(t.content),t.type)}function S7(e,t,r,i){var n,a,s;return 0===r.length?[{content:t.join(""),type:i},{content:"",type:i}]:([n,...a]=r,e([{content:(s=[...t,n]).join(""),type:i}])?S7(e,s,a,i):(0===t.length&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}]))}function E7(e,t){if(e.some(({content:e})=>e.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return _7(e,t)}function _7(e,t,r=[],i=[]){if(0===e.length)return 0{mt(w7,"splitTextToChars"),mt(C7,"splitWordToFitWidth"),mt(S7,"splitWordToFitWidthRecursion"),mt(E7,"splitLineToFitWidth"),mt(_7,"splitLineToFitWidthRecursion")});function R7(e,t){t&&e.attr("style",t)}async function L7(e,t,r,i,n=!1,a=vr()){(e=e.append("foreignObject")).attr("width",Math.min(10*r,16384)+"px"),e.attr("height",Math.min(10*r,16384)+"px");var s=e.append("xhtml:div"),a=Uc(t.label)?await Yc(t.label.replace(I.lineBreakRegex,` `),a):Rc(t.label,a),o=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),R7(l,t.labelStyle),l.attr("class",o+" "+i),R7(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(s.style("max-width",r+"px"),s.style("text-align","center")),s.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&s.attr("class","labelBkg"),(a=s.node().getBoundingClientRect()).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),a=s.node().getBoundingClientRect()),e.node()}function I7(e,t,r,i=!1){return e=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em"),i&&e.attr("text-anchor","middle"),e}function N7(e,t,r){return P7(t=I7(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function D7(e,t,r){return P7(t=I7(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function M7(t,e,r,i=!1,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=(n&&o.attr("text-anchor","middle"),0);for(var c of r){var h,u=mt(e=>N7(a,1.1,e)<=t,"checkWidth");for(h of u(c)?[c]:E7(c,u))P7(I7(o,l,1.1,n),h),l++}return(i?(e=o.node().getBBox(),s.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),a):o).node()}function O7(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return e}})}function P7(i,e){i.text(""),e.forEach((e,t)=>{var r=i.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===t?r.text(O7(e.content)):r.text(" "+O7(e.content))})}async function B7(e,n={}){let a=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,i)=>(a.push((async()=>{var e=r+":"+i;return await Jc(e)?await eh(e,void 0,{class:"label-icon"}):``})()),t)),await Promise.all(a));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var $7,F7=r(()=>{bk(),th(),e(),k7(),zC(),rh(),A7(),wi(),mt(R7,"applyStyle"),mt(L7,"addHtmlSpan"),mt(I7,"createTspan"),mt(N7,"computeWidthOfText"),mt(D7,"computeDimensionOfText"),mt(M7,"createFormattedText"),mt(O7,"decodeHTMLEntities"),mt(P7,"updateTextContentAndStyles"),mt(B7,"replaceIconSubstring"),$7=mt(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{var u;return P.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",c),a?(a=s?T7(t,h):x7(t),a=await B7($C(a),h),u=t.replace(/\\\\/g,"\\"),L7(e,{isNode:o,label:Uc(t)?u:a,labelStyle:r.replace("fill:","color:")},l,n,c,h)):(u=$C(t.replace(//g,"
")),a=M7(l,e,s?b7(u.replace("
","
"),h):v7(u),!!t&&c,!o),o?(n=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),Q(a).attr("style",n)):(l=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),Q(a).select("rect").attr("style",l.replace(/background:/g,"fill:")),e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),Q(a).select("text").attr("style",e)),i?Q(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Q(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a)},"createText")});async function z7(e,t){if((e=e.getElementsByTagName("img"))&&0!==e.length){let i=""===t.replace(/]*>/g,"").trim();await Promise.all([...e].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=(B().fontSize?B():window.getComputedStyle(document.body)).fontSize,[e=ir.fontSize]=OC(e),r.style.minWidth=e=5*e+"px",r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}}var q7=r(()=>{Uu(),Ti(),zC(),mt(z7,"configureLabelImages")});function j7(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function W7(t,e,r,i,n,a){var s=[],o=r-t,l=2*Math.PI/(o/a),c=e+(i-e)/2;for(let e=0;e<=50;e++){var h=t+e/50*o,u=c+n*Math.sin(l*(h-t));s.push({x:h,y:u})}return s}function U7(t,r,i,n,e,a){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;e"path"===e.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(e=>e.getAttribute("d")).filter(e=>null!==e).join(" ");r.setAttribute("d",i);var e=t.find(e=>"none"!==e.getAttribute("fill")),n=t.find(e=>"none"!==e.getAttribute("stroke")),a=mt((e,t)=>e?.getAttribute(t)??void 0,"getAttr");return e&&(e={fill:a(e,"fill"),"fill-opacity":a(e,"fill-opacity")??"1"},Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})),n&&(e={stroke:a(n,"stroke"),"stroke-width":a(n,"stroke-width")??"1","stroke-opacity":a(n,"stroke-opacity")??"1"},Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})),(a=document.createElementNS("http://www.w3.org/2000/svg","g")).appendChild(r),a}var V7,Y7,H7,X7,K7=r(()=>{F7(),Uu(),wi(),bk(),th(),zC(),q7(),V7=mt(async(e,t,r)=>{let i,n=t.useHtmlLabels||or(B()?.htmlLabels),a=(i=r||"node default",e.insert("g").attr("class",i).attr("id",t.domId||t.id)),s=a.insert("g").attr("class","label").attr("style",cC(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],!!t.icon||!!t.img),c="markdown"===t.labelType,h=await $7(s,Rc($C(o),B()),{useHtmlLabels:n,width:t.width||B().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},B()),u=h.getBBox(),d=(t?.padding??0)/2;return n&&(r=h.children[0],e=Q(h),await z7(r,o),u=r.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)),n?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:d,label:s}},"labelHelper"),Y7=mt(async(e,t,r)=>{let i=r.useHtmlLabels??_r(B()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await $7(n,Rc($C(t),B()),{useHtmlLabels:i,width:r.width||B()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return _r(B())&&(t=a.children[0],l=Q(a),s=t.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),H7=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),X7=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(j7,"createPathFromPoints"),mt(W7,"generateFullSineWavePoints"),mt(U7,"generateCirclePoints"),mt(G7,"mergePaths")});function Z7(e,t){return e.intersect(t)}var Q7,J7=r(()=>{mt(Z7,"intersectNode"),Q7=Z7});function e8(e,t,r,i){var n=e.x,e=e.y,a=n-i.x,s=e-i.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(i.x{mt(e8,"intersectEllipse"),t8=e8});function i8(e,t,r){return t8(e,t,t,r)}var n8,a8=r(()=>{r8(),mt(i8,"intersectCircle"),n8=i8});function s8(e,t,r,i){var n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s;if(!(0!=o&&0!=l&&0{mt(s8,"intersectLine"),mt(o8,"sameSign"),l8=s8});function h8(t,r,i){let e=t.x,n=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=e-t.width/2-s,c=n-t.height/2-o;for(let e=0;e{c8(),mt(h8,"intersectPolygon"),u8=h8}),k8=r(()=>{d8=mt((e,t)=>{var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:i+r,y:n+e}},"intersectRect"),p8=d8}),w8=r(()=>{J7(),a8(),r8(),T8(),k8(),J={node:Q7,circle:n8,ellipse:t8,polygon:u8,rect:p8}}),C8=r(()=>{Uu(),g8=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:B().handDrawnSeed}),"solidStateFill"),f8=mt(e=>({stylesMap:e=m8([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]),stylesArray:[...e]}),"compileStyles"),m8=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),y8=mt(e=>"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e,"isLabelStyle"),v8=mt(e=>{let t=f8(e).stylesArray,r=[],i=[],n=[],a=[];return t.forEach(e=>{var t=e[0];y8(t)?r.push(e.join(":")+" !important"):(i.push(e.join(":")+" !important"),t.includes("stroke")&&n.push(e.join(":")+" !important"),"fill"===t&&a.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),b8=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:i}=B(),{nodeBorder:r,mainBkg:n}=r,e=f8(e).stylesMap;return Object.assign({roughness:.7,fill:e.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:i,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:x8(e.get("stroke-dasharray"))},t)},"userNodeOverrides"),x8=mt(e=>{var t;return e?1===(e=e.trim().split(/\s+/).map(Number)).length?[t=isNaN(e[0])?0:e[0],t]:[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]:[0,0]},"getStrokeDashArray")});function S8(e,t,r){if(e&&e.length){var i,[n,a]=t,t=Math.PI/180*r,s=Math.cos(t),o=Math.sin(t);for(i of e){var[l,c]=i;i[0]=(l-n)*s-(c-a)*o+n,i[1]=(l-n)*o+(c-a)*s+a}}}function E8(e,t){return e[0]===t[0]&&e[1]===t[1]}function _8(e,r,i,t=1){var n=i,i=Math.max(r,.1),p=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,a=[0,0];if(n)for(var s of p)S8(s,a,n);if(r=((t,n)=>{var e,r=[];for(e of p){var i=[...e];E8(i[0],i[i.length-1])||i.push([i[0][0],i[0][1]]),2e.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),o.length){let r=[],i=o[0].ymin,e=0;for(;r.length||o.length;){if(o.length){let t=-1;for(let e=0;ei);e++)t=e;o.splice(0,t+1).forEach(e=>{r.push({s:i,edge:e})})}if((r=r.filter(e=>!(e.edge.ymax<=i))).sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==n||e%t==0)&&1=r.length);e+=2){var u=r[e].edge,d=r[d].edge;s.push([[Math.round(u.x),i],[Math.round(d.x),i]])}i+=n,r.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),e++}}return s})(i,t),n){for(var o of p)S8(o,a,-n);{e=a,i=-n;let t=[];r.forEach(e=>t.push(...e)),S8(t,e,i)}}return r}function A8(e,t){let r,i=t.hachureAngle+90,n=t.hachureGap,a=(n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=t.roughness&&.7<((null==(r=t.randomizer)?void 0:r.next())||Math.random())&&(a=n),_8(e,n,i,a||1)}function R8(e){var t=e[0],e=e[1];return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function L8(e,t){return e.type===t}function I8(e){let i=[],n=(e=>{for(var t=new Array;""!==e;){if(!e.match(/^([ \t\r\n,]+)/))if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:xA,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:TA,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:kA,text:""},t})(e),a="BOD",s=0,o=n[s];for(;!L8(o,kA);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return I8("M0,0"+e);s++,t=wA[o.text],a=o.text}else L8(o,TA)?t=wA[a]:(s++,t=wA[o.text],a=o.text);if(!(s+tt%2?e+i:e+r);a.push({key:"C",data:l}),r=l[4],i=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],i=o[3];break;case"q":l=o.map((e,t)=>t%2?e+i:e+r),a.push({key:"Q",data:l}),r=l[2],i=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],i=o[6];break;case"a":r+=o[5],i+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,i]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),i=o[0];break;case"v":i+=o[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],i=o[3];break;case"s":var c=o.map((e,t)=>t%2?e+i:e+r);a.push({key:"S",data:c}),r=c[2],i=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],i=o[1];break;case"t":r+=o[0],i+=o[1],a.push({key:"T",data:[r,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=t,i=n}return a}function D8(e){let n=[],a="",s=0,o=0,t=0,r=0,l=0,c=0;for(var{key:i,data:h}of e){switch(i){case"M":n.push({key:"M",data:[...h]}),[s,o]=h,[t,r]=h;break;case"C":n.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":n.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],n.push({key:"L",data:[s,o]});break;case"V":o=h[0],n.push({key:"L",data:[s,o]});break;case"S":{let e=0,t;t="C"===a||"S"===a?(e=s+(s-l),o+(o-c)):(e=s,o),n.push({key:"C",data:[e,t,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[e,t]=h,r=0,i;i="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(i-o)/3,p=e+2*(r-e)/3,g=t+2*(i-t)/3;n.push({key:"C",data:[u,d,p,g,e,t]}),l=r,c=i,s=e,o=t;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;n.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],b=h[4],x=h[5],T=h[6];0===f||0===m?(n.push({key:"C",data:[s,o,x,T,x,T]}),s=x,o=T):s===x&&o===T||(O8(s,o,x,T,f,m,y,v,b).forEach(function(e){n.push({key:"C",data:e})}),s=x,o=T);break;case"Z":n.push({key:"Z",data:[]}),s=t,o=r}a=i}return n}function M8(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function O8(e,t,r,i,n,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([e,t]=M8(e,t,-h),[r,i]=M8(r,i,-h),1<(m=(y=(e-r)/2)*y/(n*n)+(v=(t-i)/2)*v/(a*a))&&(n*=m=Math.sqrt(m),a*=m),m=n*n,b=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*b-m*v*v-b*y*y)/(m*v*v+b*y*y))),g=o*n*v/a+(e+r)/2,f=o*-a*y/n+(t+i)/2,d=Math.asin(parseFloat(((t-f)/a).toFixed(9))),p=Math.asin(parseFloat(((i-f)/a).toFixed(9))),ep&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(b=p,v=r,o=i,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=O8(r=g+n*Math.cos(p),i=f+a*Math.sin(p),v,o,n,a,s,0,l,[p,b,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),b=4/3*n*(l=Math.tan(m/4)),n=[e,t],a=[e+b*v,t-(m=4/3*a*l)*y],l=[r+b*s,i-m*o],e=[r,i];if(a[0]=2*n[0]-a[0],a[1]=2*n[1]-a[1],c)return[a,l,e].concat(u);u=[a,l,e].concat(u);var x=[];for(let e=0;e2*Math.PI&&(c=0,h=2*Math.PI),n=2*Math.PI/l.curveStepCount,n=tA(a=Math.min(n/2,(h-c)/2),e,t,r,i,c,h,1,l),l.disableMultiStroke||(a=tA(a,e,t,r,i,c,h,1.5,l),n.push(...a)),s&&(o?n.push(...K8(e,t,e+r*Math.cos(c),t+i*Math.sin(c),l),...K8(e,t,e+r*Math.cos(h),t+i*Math.sin(h),l)):n.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(c),t+i*Math.sin(c)]})),{type:"path",ops:n}}function W8(e,t){let r=D8(N8(I8(e))),i=[],n=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...K8(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;i.push(...rA(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":i.push(...K8(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function U8(e,t){var r,i=[];for(r of e)if(r.length){var n=t.maxRandomnessOffset||0,a=r.length;if(2{let t=r.fillStyle||"hachure";if(!vA[t])switch(t){case"zigzag":vA[t]||(vA[t]=new pA(e));break;case"cross-hatch":vA[t]||(vA[t]=new gA(e));break;case"dots":vA[t]||(vA[t]=new fA(e));break;case"dashed":vA[t]||(vA[t]=new mA(e));break;case"zigzag-line":vA[t]||(vA[t]=new yA(e));break;default:t="hachure",vA[t]||(vA[t]=new dA(e))}return vA[t]})(CA).fillPolygons(e,r)}function V8(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Y8(e){return e.randomizer||(e.randomizer=new bA(e.seed||0)),e.randomizer.next()}function H8(e,t,r,i=1){return r.roughness*i*(Y8(r)*(t-e)+e)}function X8(e,t,r=1){return H8(-e,e,t,r)}function K8(e,t,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=Z8(e,t,r,i,n,!0,!1);return a?s:(a=Z8(e,t,r,i,n,!0,!0),s.concat(a))}function Z8(e,t,r,i,n,a,s){let o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*Y8(n),p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=X8(p,n,c),g=X8(g,n,c);var f=[],m=mt(()=>X8(u,n,c),"M"),y=mt(()=>X8(h,n,c),"k"),v=n.preserveVertices;return a&&f.push(s?{op:"move",data:[e+(v?0:m()),t+(v?0:m())]}:{op:"move",data:[e+(v?0:X8(h,n,c)),t+(v?0:X8(h,n,c))]}),f.push(s?{op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(i-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(i-t)*d+m(),r+(v?0:m()),i+(v?0:m())]}:{op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(i-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(v?0:y()),i+(v?0:y())]}),f}function Q8(t,r,i){if(!t.length)return[];var n=[];n.push([t[0][0]+X8(r,i),t[0][1]+X8(r,i)]),n.push([t[0][0]+X8(r,i),t[0][1]+X8(r,i)]);for(let e=1;e{let e=l[c+0],t=l[c+1],r=l[c+2],i=l[c+3],n=3*t[0]-2*e[0]-i[0],a=(n*=n,3*t[1]-2*e[1]-i[1]);a*=a;var s=3*r[0]-2*i[0]-e[0],o=(s*=s,3*r[1]-2*i[1]-e[1]);return o*=o,nl&&(l=h,c=e)}return Math.sqrt(l)>e?(hA(t,r,c+1,e,a),hA(t,c,i,e,a)):(a.length||a.push(s),a.push(o)),a}function uA(t,r=.15,e){var i=[],n=(t.length-1)/3;for(let e=0;e{mt(S8,"t"),mt(E8,"e"),mt(_8,"s"),mt(A8,"n"),dA=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=A8(e,t),{type:"fillSketch",ops:this.renderLines(e,t)}}renderLines(e,t){var r,i=[];for(r of e)i.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return i}},mt(R8,"a"),pA=class extends dA{static{mt(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var i,n,e=A8(e,Object.assign({},t,{hachureGap:r})),a=Math.PI/180*t.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([i,n]of e)R8([i,n])&&s.push([[i[0]-o,i[1]+l],[...n]],[[i[0]+o,i[1]-l],[...n]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}},gA=class extends dA{static{mt(this,"r")}fillPolygons(e,t){var r=this._fillPolygons(e,t),t=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),e=this._fillPolygons(e,t);return r.ops=r.ops.concat(e.ops),r}},fA=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=A8(e,t=Object.assign({},t,{hachureAngle:0})),this.dotsOnLines(e,t)}dotsOnLines(e,t){let r=[],i=t.hachureGap,n=(i<0&&(i=4*t.strokeWidth),i=Math.max(i,.1),t.fillWeight);n<0&&(n=t.strokeWidth/2);var a,s=i/4;for(a of e){var o=R8(a),l=o/i,c=Math.ceil(l)-1,h=o-c*i,u=(a[0][0]+a[1][0])/2-i/4,d=Math.min(a[0][1],a[1][1]);for(let e=0;e{let t=R8(e),r=Math.floor(t/(h+u)),i=(t+u-r*(h+u))/2,n=e[0],a=e[1];n[0]>a[0]&&(n=e[1],a=e[0]);var s=Math.atan((a[1]-n[1])/(a[0]-n[0]));for(let e=0;e{let t=R8(e),r=Math.round(t/(2*c)),i=e[0],n=e[1];i[0]>n[0]&&(i=e[1],n=e[0]);var a=Math.atan((n[1]-i[1])/(n[0]-i[0]));for(let e=0;e{var n=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=X8(.01*s,i),o+=X8(.01*o,i);let l=t,c=r;for(;l<0;)l+=2*Math.PI,c+=2*Math.PI;c-l>2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/i.curveStepCount,u=[];for(let e=l;e<=c;e+=h)u.push([n+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([n+s*Math.cos(c),a+o*Math.sin(c)]),u.push([n,a]),G8([u],i)})(e,t,r,n))),n.stroke!==SA&&a.push(s),this._d("arc",a,n)}curve(e,t){var r=this._o(t),t=[],i=F8(e,r);if(r.fill&&r.fill!==SA)if("solid"===r.fillStyle){var n=F8(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));t.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{var a,s=[];if((n=e).length)for(a of"number"==typeof n[0][0]?[n]:n)a.length<3?s.push(...a):3===a.length?s.push(...uA(nA([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...uA(nA(a),10,(1+r.roughness)/2));s.length&&t.push(G8([s],r))}return r.stroke!==SA&&t.push(i),this._d("curve",t,r)}polygon(e,t){var r=[],i=B8(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(U8([e],t)):r.push(G8([e],t))),t.stroke!==SA&&r.push(i),this._d("polygon",r,t)}path(e,t){let r=this._o(t),i=[];var n,a,s,o;return e&&(e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),t=r.fill&&"transparent"!==r.fill&&r.fill!==SA,n=r.stroke!==SA,s=((e,t)=>{let r=D8(N8(I8(e))),i=[],n=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&n.push(...uA(s,1)),s=[]},"i"),l=mt(()=>{o(),n.length&&(i.push(n),n=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],n.push(a);break;case"L":o(),n.push([h[0],h[1]]);break;case"C":var u;s.length||(u=n.length?n[n.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),n.push([a[0],a[1]])}if(l(),!t)return i;var d,p=[];for(d of i){var g=cA(d,t);g.length&&p.push(g)}return p})(e,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=W8(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=W8(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),i.push({type:"fillPath",ops:this._mergedShape(t.ops)})):i.push(U8(s,r)):i.push(G8(s,r))),n)&&(a?s.forEach(e=>{i.push(B8(e,!1,r))}):i.push(o)),this._d("path",i,r)}opsToPath(e,t){let r="";for(var i of e.ops){var n="number"==typeof t&&0<=t?i.data.map(e=>+e.toFixed(t)):i.data;switch(i.op){case"move":r+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":r+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":r+=`L${n[0]} ${n[1]} `}}return r.trim()}toPaths(e){var t,r=e.sets||[],i=e.options||this.defaultOptions,n=[];for(t of r){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:SA};break;case"fillPath":e={d:this.opsToPath(t),stroke:SA,strokeWidth:0,fill:i.fill||SA};break;case"fillSketch":e=this.fillSketch(t,i)}e&&n.push(e)}return n}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||SA,strokeWidth:r,fill:SA}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},_A=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new EA(t)}draw(e){var t,r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(t of r)switch(t.type){case"path":n.save(),n.strokeStyle="none"===i.stroke?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,t,a),n.restore();break;case"fillPath":n.save(),n.fillStyle=i.fill||"";var s="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(n,t,a,s),n.restore();break;case"fillSketch":this.fillSketch(n,t,i)}}fillSketch(e,t,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,t,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,r,i="nonzero"){e.beginPath();for(var n of t.ops){var a="number"==typeof r&&0<=r?n.data.map(e=>+e.toFixed(r)):n.data;switch(n.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1])}}"fillPath"===t.type?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,i,n){return e=this.gen.line(e,t,r,i,n),this.draw(e),e}rectangle(e,t,r,i,n){return e=this.gen.rectangle(e,t,r,i,n),this.draw(e),e}ellipse(e,t,r,i,n){return e=this.gen.ellipse(e,t,r,i,n),this.draw(e),e}circle(e,t,r,i){return e=this.gen.circle(e,t,r,i),this.draw(e),e}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e),e}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e),e}arc(e,t,r,i,n,a,s=!1,o){return e=this.gen.arc(e,t,r,i,n,a,s,o),this.draw(e),e}curve(e,t){return e=this.gen.curve(e,t),this.draw(e),e}path(e,t){return e=this.gen.path(e,t),this.draw(e),e}},AA="http://www.w3.org/2000/svg",RA=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new EA(t)}draw(t){var r,e=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(AA,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=n.createElementNS(AA,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke",i.stroke),e.setAttribute("stroke-width",i.strokeWidth+""),e.setAttribute("fill","none"),i.strokeLineDash&&e.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",""+i.strokeLineDashOffset);break;case"fillPath":(e=n.createElementNS(AA,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",i.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,r,i)}e&&a.appendChild(e)}return a}fillSketch(e,t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),(e=e.createElementNS(AA,"path")).setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),e.setAttribute("stroke",r.fill||""),e.setAttribute("stroke-width",i+""),e.setAttribute("fill","none"),r.fillLineDash&&e.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&e.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),e}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,r,i,n){return e=this.gen.line(e,t,r,i,n),this.draw(e)}rectangle(e,t,r,i,n){return e=this.gen.rectangle(e,t,r,i,n),this.draw(e)}ellipse(e,t,r,i,n){return e=this.gen.ellipse(e,t,r,i,n),this.draw(e)}circle(e,t,r,i){return e=this.gen.circle(e,t,r,i),this.draw(e)}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e)}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e)}arc(e,t,r,i,n,a,s=!1,o){return e=this.gen.arc(e,t,r,i,n,a,s,o),this.draw(e)}curve(e,t){return e=this.gen.curve(e,t),this.draw(e)}path(e,t){return e=this.gen.path(e,t),this.draw(e)}},LA={canvas:mt((e,t)=>new _A(e,t),"canvas"),svg:mt((e,t)=>new RA(e,t),"svg"),generator:mt(e=>new EA(e),"generator"),newSeed:mt(()=>EA.newSeed(),"newSeed")}});function NA(e,t){var r=v8(t).labelStyles;t.labelStyle=r;let i=X7(t),n=i,a=(i||(n="anchor"),e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=t.cssStyles,o=LA.svg(a),l=b8(t,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==t.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",cC(s)),H7(t,h),t.intersect=function(e){return P.info("Circle intersect",t,1,e),J.circle(t,1,e)},a}var DA=r(()=>{e(),K7(),w8(),C8(),IA(),zC(),mt(NA,"anchor")});function MA(e,t,r,i,n,a,s){var o=(e+r)/2,l=(t+i)/2,c=Math.atan2(i-t,r-e),h=Math.sqrt(((r-e)/2/n)**2+((i-t)/2/a)**2);if(1t-e);return r*(1-Math.sqrt(1-(e/t/2)**2))}async function PA(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let n=t.padding??0,a="neo"===t.look?16:n,s="neo"===t.look?12:n,o=mt(e=>e+s,"calcTotalHeight"),l=mt(e=>{var t=e/2;return[t/(2.5+e/50),t]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await V7(e,t,X7(t)),u=o(t?.height||h.height),[d,p]=l(u),g=OA(u,d,p),f=(t?.width||h.width)+2*a+g-g,m=u,y=t.cssStyles,v=[{x:f/2,y:-m/2},{x:-f/2,y:-m/2},...MA(-f/2,-m/2,-f/2,m/2,d,p,!1),{x:f/2,y:m/2},...MA(f/2,m/2,f/2,-m/2,d,p,!0)],b=LA.svg(c),x=b8(t,{}),T=("handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid"),j7(v)),k=b.path(T,x),w=c.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),y&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",y),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${d/2}, 0)`),H7(t,w),t.intersect=function(e){return J.polygon(t,v,e)},c}var BA=r(()=>{K7(),w8(),C8(),IA(),mt(MA,"generateArcPoints"),mt(OA,"calculateArcSagitta"),mt(PA,"bowTieRect")});function $A(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var FA=r(()=>{mt($A,"insertPolygonShape")});async function zA(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a="neo"===n.look?28:i,s="neo"===n.look?24:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.width??l.width)+("neo"===n.look?2*a:a+qA),h=(n?.height??l.height)+("neo"===n.look?2*s:s),u=c,d=-h,p=[{x:0+qA,y:d},{x:u,y:d},{x:u,y:0},{x:0,y:0},{x:0,y:d+qA},{x:0+qA,y:d}],g,f=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(p),i=e.path(r,t);g=o.insert(()=>i,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),f&&g.attr("style",f)}else g=$A(o,c,h,p);return r&&g.attr("style",r),H7(n,g),n.intersect=function(e){return J.polygon(n,p,e)},o}var qA,jA=r(()=>{K7(),w8(),C8(),IA(),FA(),K7(),qA=12,mt(zA,"card")});function WA(e,t){var r=v8(t).nodeStyles;t.label="";let i=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),n=t.cssStyles,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=LA.svg(i),l=b8(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),j7(s)),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",n),r&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return J.polygon(t,s,e)},i}var UA=r(()=>{w8(),IA(),C8(),K7(),mt(WA,"choice")});async function GA(e,i,t){var{labelStyles:r,nodeStyles:n}=v8(i);i.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await V7(e,i,X7(i)),l=t?.padding??o,c="neo"===i.look?s.width/2+32:s.width/2+l,h,u=i.cssStyles;if("handDrawn"===i.look){let e=LA.svg(a),t=b8(i,{}),r=e.circle(0,0,2*c,t);(h=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return H7(i,h),i.calcIntersect=function(e,t){var r=e.width/2;return J.circle(e,r,t)},i.intersect=function(e){return P.info("Circle intersect",i,c,e),J.circle(i,c,e)},a}var VA=r(()=>{IA(),e(),zC(),w8(),C8(),K7(),mt(GA,"circle")});function YA(e){var t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(e*=2)/2*t},${e/2*r} L ${e/2*t},${-e/2*r} M ${e/2*t},${e/2*r} L ${-e/2*t},`+-e/2*r}function HA(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=LA.svg(n),l=b8(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=YA(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",i),H7(t,d),t.intersect=function(e){return P.info("crossedCircle intersect",t,{radius:a,point:e}),J.circle(t,a,e)},n}var XA=r(()=>{e(),K7(),C8(),IA(),w8(),mt(YA,"createLine"),mt(HA,"crossedCircle")});function KA(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;ex,":first-child").attr("stroke-opacity",0),T.insert(()=>v,":first-child"),T.attr("class","text"),d&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,T),t.intersect=function(e){return J.polygon(t,g,e)},n}var QA=r(()=>{K7(),w8(),C8(),IA(),mt(KA,"generateCirclePoints"),mt(ZA,"curlyBraceLeft")});function JA(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;ex,":first-child").attr("stroke-opacity",0),T.insert(()=>v,":first-child"),T.attr("class","text"),d&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,T),t.intersect=function(e){return J.polygon(t,g,e)},n}var tR=r(()=>{K7(),w8(),C8(),IA(),mt(JA,"generateCirclePoints"),mt(eR,"curlyBraceRight")});function rR(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;ew,":first-child").attr("stroke-opacity",0),C.insert(()=>b,":first-child"),C.insert(()=>T,":first-child"),C.attr("class","text"),d&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,C),t.intersect=function(e){return J.polygon(t,f,e)},n}var nR=r(()=>{K7(),w8(),C8(),IA(),mt(rR,"generateCirclePoints"),mt(iR,"curlyBraces")});async function aR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a}=await V7(e,t,X7(t)),n=Math.max(20,1.25*(a.width+2*n),t?.width??0),r=(a=Math.max(5,a.height+2*r,t?.height??0))/2,s=t.cssStyles,o=LA.svg(e),l=b8(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=n,h=a,u=c-r,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...U7(-u,-h/2,r,50,270,90)],g=j7(p),f=o.path(g,l),m=e.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),s&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",s),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-n/2}, ${-a/2})`),H7(t,m),t.intersect=function(e){return J.polygon(t,p,e)},e}var sR=r(()=>{K7(),w8(),C8(),IA(),mt(aR,"curvedTrapezoid")});async function oR(e,s){var{labelStyles:t,nodeStyles:r}=v8(s),t=(s.labelStyle=t,s.padding??0),i="neo"===s.look?24:t,t="neo"===s.look?24:t;(s.width||s.height)&&(g=s.width??0,s.width=(s.width??0)-t,s.widtha,":first-child"),(d=o.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&d.attr("style",p)}else{var g=lR(0,0,l,u,c,h);d=o.insert("path",":first-child").attr("d",g).attr("class","basic label-container outer-path").attr("style",cC(p)).attr("style",r)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),H7(s,d),a.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(s.padding??0)/1.5-(n.y-(n.top??0))})`),s.intersect=function(t){var r=J.rect(s,t),i=r.x-(s.x??0);if(0!=c&&(Math.abs(i)<(s.width??0)/2||Math.abs(i)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let e=h*h*(1-i*i/(c*c));0{K7(),w8(),C8(),IA(),zC(),lR=mt((e,t,r,i,n,a)=>[`M${e},`+(t+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),cR=mt((e,t,r,i,n,a)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),hR=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),dR=uR=8,mt(oR,"cylinder")}),fR=r(()=>{pR=mt((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD")});async function mR(e,i,t){var{labelStyles:r,nodeStyles:n}=v8(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await V7(e,i,X7(i)),o=Math.max(s.width+2*t.labelPaddingX,i?.width||0),l=Math.max(s.height+2*t.labelPaddingY,i?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=i,g=i.cssStyles;if(t?.rx&&t.ry&&(d=t.rx,p=t.ry),"handDrawn"===i.look){let e=LA.svg(a),t=b8(i,{}),r=d||p?e.path(pR(c,h,o,l,d||0),t):e.rectangle(c,h,o,l,t);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",cC(d)).attr("ry",cC(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return H7(i,u),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return J.rect(i,e)},a}var yR=r(()=>{K7(),w8(),fR(),C8(),IA(),zC(),mt(mR,"drawRect")});async function vR(a,e){var{cssClasses:t,labelPaddingX:r,labelPaddingY:i,padding:n,width:s,height:o}=e,a=await mR(a,e,{rx:0,ry:0,classes:t??"",labelPaddingX:r??2*(n??0),labelPaddingY:i??n??0});if("handDrawn"===e.look){let t=LA.svg(a),r=b8(e,{}),i=a.select(".basic.label-container > path:nth-child(2)"),n=i.node();if(n){let e;n instanceof SVGGraphicsElement&&(e=n.getBBox(),a.insert(()=>t.line(e.x,e.y,e.x+e.width,e.y,r),".basic.label-container g.label"),a.insert(()=>t.line(e.x,e.y+e.height,e.x+e.width,e.y+e.height,r),".basic.label-container g.label"),i.remove())}}else t=a.select(".basic.label-container"),r=(Number(t.attr("width"))||s)??0,i=(Number(t.attr("height"))||o)??0,0{yR(),C8(),IA(),mt(vR,"datastore")});async function xR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?16:t.padding??0,{shapeSvg:e,bbox:a,label:s}=await V7(e,t,X7(t)),r=a.width+r,o=.2*(n=a.height+n),r=-r/2,n=-n/2-o/2,l=t.cssStyles,c=LA.svg(e),h=b8(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:r,y:n+o},{x:-r,y:n+o},{x:-r,y:-n},{x:r,y:-n},{x:r,y:n},{x:-r,y:n},{x:-r,y:n+o}],d=c.polygon(u.map(e=>[e.x,e.y]),h),p=e.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),l&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",l),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),s.attr("transform",`translate(${r+(t.padding??0)/2-(a.x-(a.left??0))}, ${n+o+(t.padding??0)/2-(a.y-(a.top??0))})`),H7(t,p),t.intersect=function(e){return J.rect(t,e)},e}var TR=r(()=>{K7(),w8(),C8(),IA(),mt(xR,"dividedRectangle")});async function kR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),n="neo"===t.look?12:5;t.labelStyle=r;let a=t.padding??0,s="neo"===t.look?16:a,{shapeSvg:o,bbox:l}=await V7(e,t,X7(t)),c=(t?.width?t?.width/2:l.width/2)+(s??0),h=c-n,u,d=t.cssStyles;return"handDrawn"===t.look?(r=LA.svg(o),e=b8(t,{roughness:.2,strokeWidth:2.5}),n=b8(t,{roughness:.2,strokeWidth:1.5}),e=r.circle(0,0,2*c,e),r=r.circle(0,0,2*h,n),(u=o.insert("g",":first-child")).attr("class",cC(t.cssClasses)).attr("style",cC(d)),u.node()?.appendChild(e),u.node()?.appendChild(r)):(n=(u=o.insert("g",":first-child")).insert("circle",":first-child"),e=u.insert("circle"),u.attr("class","basic label-container").attr("style",i),n.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)),H7(t,u),t.intersect=function(e){return P.info("DoubleCircle intersect",t,c,e),J.circle(t,c,e)},o}var wR=r(()=>{e(),K7(),w8(),C8(),IA(),zC(),mt(kR,"doublecircle")});function CR(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=v8(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=LA.svg(a),l=r.nodeBorder,c=b8(t,{fillStyle:"solid"}),h=("handDrawn"!==t.look&&(c.roughness=0),o.circle(0,0,14,c)),u=a.insert(()=>h,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&0{IA(),e(),w8(),C8(),K7(),mt(CR,"filledCircle")});async function ER(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),r="neo"===t.look?2*r:r;(t.width||t.height)&&(t.height=t?.height??0,t.height<_R&&(t.height=_R),t.width=(t?.width??0)-r-r/2,t.widthf,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return u&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),t.width=o,t.height=l,H7(t,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(e){return P.info("Triangle intersect",t,h,e),J.polygon(t,h,e)},n}var _R,AR,RR=r(()=>{e(),K7(),w8(),C8(),IA(),K7(),AR=_R=10,mt(ER,"flippedTriangle")});function LR(e,t,{dir:r,config:{state:i,themeVariables:n}}){var a=v8(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),o=t.cssStyles,l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);"LR"===r&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));var e=-1*l/2,r=-1*c/2,h=LA.svg(s),n=b8(t,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==t.look&&(n.roughness=0,n.fillStyle="solid");let u=h.rectangle(e,r,l,c,n),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",a),H7(t,d),h=i?.padding??0,t.width&&t.height&&(t.width+=h/2||0,t.height+=h/2||0),t.intersect=function(e){return J.rect(t,e)},s}var IR=r(()=>{IA(),w8(),C8(),K7(),mt(LR,"forkJoin")});async function NR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-2*n,t.height<10&&(t.height=10),t.width=(t?.width??0)-2*r,t.width<15)&&(t.width=15);let{shapeSvg:a,bbox:s}=await V7(e,t,X7(t)),o=(t?.width||Math.max(15,s.width))+2*r,l=(t?.height||Math.max(10,s.height))+2*n,c=l/2,h=t.cssStyles,u=LA.svg(a),d=b8(t,{}),p=("handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid"),[{x:-o/2,y:-l/2},{x:o/2-c,y:-l/2},...U7(-o/2+c,0,c,50,90,270),{x:o/2-c,y:l/2},{x:-o/2,y:l/2}]),g=j7(p),f=u.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),h&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",h),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),H7(t,m),t.intersect=function(e){return P.info("Pill intersect",t,{radius:c,point:e}),J.polygon(t,p,e)},a}var DR=r(()=>{e(),K7(),w8(),C8(),IA(),mt(NR,"halfRoundedRectangle")});async function MR(e,n){var t,{labelStyles:r,nodeStyles:i}=v8(n),a="neo"===n.look?3.5:4,r=(n.labelStyle=r,n.padding??0),s="neo"===n.look?70:r,r="neo"===n.look?32:r;(n.width||n.height)&&(t=(n.height??0)/a,n.width=(n?.width??0)-2*t-r,n.height=(n.height??0)-s);let{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height||l.height)+s,h=c/a,u=(n?.width||l.width)+2*h+r,d=[{x:h,y:0},{x:u-h,y:0},{x:u,y:-c/2},{x:u-h,y:-c},{x:h,y:-c},{x:0,y:-c/2}],p,g=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=OR(0,0,u,c,h),i=e.path(r,t);p=o.insert(()=>i,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),g&&p.attr("style",g)}else p=$A(o,u,c,d);return i&&p.attr("style",i),n.width=u,n.height=c,H7(n,p),n.intersect=function(e){return J.polygon(n,d,e)},o}var OR,PR=r(()=>{K7(),w8(),C8(),IA(),FA(),OR=mt((e,t,r,i,n)=>[`M${e+n},`+t,`L${e+r-n},`+t,`L${e+r},`+(t-i/2),`L${e+r-n},`+(t-i),`L${e+n},`+(t-i),`L${e},`+(t-i/2),"Z"].join(" "),"createHexagonPathD"),mt(MR,"hexagon")});async function BR(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.label="",t.labelStyle=r,(await V7(e,t,X7(t))).shapeSvg),e=Math.max(30,t?.width??0),n=Math.max(30,t?.height??0),a=t.cssStyles,s=LA.svg(r),o=b8(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:e,y:0},{x:0,y:n},{x:e,y:n}],c=j7(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container outer-path"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-e/2}, ${-n/2})`),H7(t,u),t.intersect=function(e){return P.info("Pill intersect",t,{points:l}),J.polygon(t,l,e)},r}var $R=r(()=>{e(),K7(),w8(),C8(),IA(),mt(BR,"hourglass")});async function FR(e,n,{config:{themeVariables:t,flowchart:r}}){var i,a=v8(n).labelStyles,a=(n.labelStyle=a,n.assetHeight??48),a=Math.max(a,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await V7(e,n,"icon-shape default"),c="t"===n.pos,h=a,u=a,d=t.nodeBorder,p=f8(n).stylesMap,g=-u/2,f=-h/2,m=n.label?8:0,y=LA.svg(s),v=b8(n,{stroke:"none",fill:"none"}),b=("handDrawn"!==n.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),x=Math.max(u,o.width),T=h+o.height+m,k=y.rectangle(-x/2,-T/2,x,T,{...v,fill:"transparent",stroke:"none"}),w=s.insert(()=>b,":first-child"),C=s.insert(()=>k);return n.icon&&((r=s.append("g")).html(`${await eh(n.icon,{height:a,width:a,fallbackPrefix:""})}`),t=(e=r.node().getBBox()).width,a=e.height,i=e.y,r.attr("transform",`translate(${-t/2-e.x},${c?o.height/2+m/2-a/2-i:-o.height/2-m/2-a/2-i})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-T/2:T/2-o.height})`),w.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),H7(n,C),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{x:i-o.width/2,y:t-r/2},{x:i+o.width/2,y:t-r/2},{x:i+o.width/2,y:t-r/2+o.height+m},{x:i+u/2,y:t-r/2+o.height+m},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+o.height+m},{x:i-o.width/2,y:t-r/2+o.height+m}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+h},{x:i+o.width/2,y:t-r/2+h},{x:i+o.width/2/2,y:t+r/2},{x:i-o.width/2,y:t+r/2},{x:i-o.width/2,y:t-r/2+h},{x:i-u/2,y:t-r/2+h}],J.polygon(n,i,e)):J.rect(n,e)},s}var zR=r(()=>{IA(),e(),rh(),w8(),C8(),K7(),mt(FR,"icon")});async function qR(e,t,{config:{themeVariables:r,flowchart:i}}){var n=v8(t).labelStyles,n=(t.labelStyle=n,t.assetHeight??48),n=Math.max(n,t.assetWidth??48),i=i?.wrappingWidth,{shapeSvg:i,bbox:e,label:a}=(t.width=Math.max(n,i??0),await V7(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=f8(t).stylesMap,h=LA.svg(i),u=b8(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,i.append("g"));t.icon&&d.html(`${await eh(t.icon,{height:n,width:n,fallbackPrefix:""})}`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,b=h.circle(0,0,v,u),x=Math.max(v,e.width),T=v+e.height+s,k=h.rectangle(-x/2,-T/2,x,T,{...u,fill:"transparent",stroke:"none"}),w=i.insert(()=>b,":first-child"),C=i.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?e.height/2+s/2-f/2-y:-e.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${o?-T/2:T/2-e.height})`),w.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),H7(t,C),t.intersect=function(e){return P.info("iconSquare intersect",t,e),J.rect(t,e)},i}var jR=r(()=>{IA(),e(),rh(),w8(),C8(),K7(),mt(qR,"iconCircle")});async function WR(e,n,{config:{themeVariables:t,flowchart:r}}){var i=v8(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await V7(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=f8(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=LA.svg(a),b=b8(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let T=v.path(pR(f,m,u,h,5),b),k=Math.max(u,s.width),w=h+s.height+y,C=v.rectangle(-k/2,-w/2,k,w,{...b,fill:"transparent",stroke:"none"}),S=a.insert(()=>T,":first-child").attr("class","icon-shape2"),E=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`${await eh(n.icon,{height:i,width:i,fallbackPrefix:""})}`),r=(t=e.node().getBBox()).width,i=t.height,x=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-i/2-x:-s.height/2-y/2-i/2-x})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-w/2:w/2-s.height})`),S.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),H7(n,E),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2+s.height+y},{x:i+u/2,y:t-r/2+s.height+y},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+s.height+y},{x:i-s.width/2,y:t-r/2+s.height+y}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+h},{x:i+s.width/2,y:t-r/2+h},{x:i+s.width/2/2,y:t+r/2},{x:i-s.width/2,y:t+r/2},{x:i-s.width/2,y:t-r/2+h},{x:i-u/2,y:t-r/2+h}],J.polygon(n,i,e)):J.rect(n,e)},a}var UR=r(()=>{IA(),e(),rh(),w8(),C8(),fR(),K7(),mt(WR,"iconRounded")});async function GR(e,n,{config:{themeVariables:t,flowchart:r}}){var i=v8(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await V7(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=f8(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=LA.svg(a),b=b8(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let T=v.path(pR(f,m,u,h,.1),b),k=Math.max(u,s.width),w=h+s.height+y,C=v.rectangle(-k/2,-w/2,k,w,{...b,fill:"transparent",stroke:"none"}),S=a.insert(()=>T,":first-child"),E=a.insert(()=>C);return n.icon&&((e=a.append("g")).html(`${await eh(n.icon,{height:i,width:i,fallbackPrefix:""})}`),r=(t=e.node().getBBox()).width,i=t.height,x=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-i/2-x:-s.height/2-y/2-i/2-x})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-w/2:w/2-s.height})`),S.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),H7(n,E),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2+s.height+y},{x:i+u/2,y:t-r/2+s.height+y},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+s.height+y},{x:i-s.width/2,y:t-r/2+s.height+y}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+h},{x:i+s.width/2,y:t-r/2+h},{x:i+s.width/2/2,y:t+r/2},{x:i-s.width/2,y:t+r/2},{x:i-s.width/2,y:t-r/2+h},{x:i-u/2,y:t-r/2+h}],J.polygon(n,i,e)):J.rect(n,e)},a}var VR=r(()=>{IA(),e(),rh(),w8(),fR(),C8(),K7(),mt(GR,"iconSquare")});async function YR(e,n,{config:{flowchart:t}}){(i=new Image).src=n?.img??"",await i.decode();var r=Number(i.naturalWidth.toString().replace("px","")),i=Number(i.naturalHeight.toString().replace("px","")),a=(n.imageAspectRatio=r/i,v8(n).labelStyles),a=(n.labelStyle=a,t?.wrappingWidth);n.defaultWidth=t?.wrappingWidth;let s=Math.max(n.label?a??0:0,n?.assetWidth??r),o="on"===n.constraint&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:s,l="on"===n.constraint?o/n.imageAspectRatio:n?.assetHeight??i,{shapeSvg:c,bbox:h,label:u}=(n.width=Math.max(o,a??0),await V7(e,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=LA.svg(c),y=b8(n,{}),v=("handDrawn"!==n.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),b=Math.max(o,h.width),x=l+h.height+f,T=m.rectangle(-b/2,-x/2,b,x,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),w=c.insert(()=>T);return n.img&&((t=c.append("image")).attr("href",n.img),t.attr("width",o),t.attr("height",l),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-o/2},${d?x/2-l:-x/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),k.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),H7(n,w),n.intersect=function(e){var t,r,i;return P.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=d?[{x:i-h.width/2,y:t-r/2},{x:i+h.width/2,y:t-r/2},{x:i+h.width/2,y:t-r/2+h.height+f},{x:i+o/2,y:t-r/2+h.height+f},{x:i+o/2,y:t+r/2},{x:i-o/2,y:t+r/2},{x:i-o/2,y:t-r/2+h.height+f},{x:i-h.width/2,y:t-r/2+h.height+f}]:[{x:i-o/2,y:t-r/2},{x:i+o/2,y:t-r/2},{x:i+o/2,y:t-r/2+l},{x:i+h.width/2,y:t-r/2+l},{x:i+h.width/2/2,y:t+r/2},{x:i-h.width/2,y:t+r/2},{x:i-h.width/2,y:t-r/2+l},{x:i-o/2,y:t-r/2+l}],J.polygon(n,i,e)):J.rect(n,e)},c}var HR=r(()=>{IA(),e(),w8(),C8(),K7(),mt(YR,"imageSquare")});async function XR(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=Math.max(l.width+2*(s??0),n?.width??0),h=Math.max(l.height+2*(a??0),n?.height??0),u=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&d.attr("style",p)}else d=$A(o,c,h,u);return r&&d.attr("style",r),n.width=c,n.height=h,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var KR=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(XR,"inv_trapezoid")});async function ZR(e,t){var{shapeSvg:e,bbox:r,label:i}=await V7(e,t,"label"),n=e.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),e.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),H7(t,n),t.intersect=function(e){return J.rect(t,e)},e}var QR=r(()=>{yR(),K7(),w8(),mt(ZR,"labelRect")});async function JR(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height??l.height)+a,h=(n?.width??l.width)+s,u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-3*c/6,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&d.attr("style",p)}else d=$A(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var eL=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(JR,"lean_left")});async function tL(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height??l.height)+a,h=(n?.width??l.width)+s,u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&d.attr("style",p)}else d=$A(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var rL=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(tL,"lean_right")});function iL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",X7(t)).attr("id",t.domId??t.id),a=t.cssStyles,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=LA.svg(n),h=b8(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),j7(l)),d=c.path(u,h),p=n.insert(()=>d,":first-child");return p.attr("class","outer-path"),a&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-o})`),H7(t,p),t.intersect=function(e){return P.info("lightningBolt intersect",t,e),J.polygon(t,l,e)},n}var nL=r(()=>{e(),K7(),C8(),IA(),w8(),K7(),mt(iL,"lightningBolt")});async function aL(e,s){var{labelStyles:t,nodeStyles:r}=v8(s),t=(s.labelStyle=t,s.padding??0),i="neo"===s.look?16:t,t="neo"===s.look?24:t;(s.width||s.height)&&(f=s.width??0,s.width=(s.width??0)-i,s.widtha,":first-child").attr("class","line"),(p=o.insert(()=>n,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else{var f=sL(0,0,l,u,c,h,d);p=o.insert("path",":first-child").attr("d",f).attr("class","basic label-container outer-path").attr("style",cC(g)).attr("style",r)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),H7(s,p),a.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),s.intersect=function(t){var r=J.rect(s,t),i=r.x-(s.x??0);if(0!=c&&(Math.abs(i)<(s.width??0)/2||Math.abs(i)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let e=h*h*(1-i*i/(c*c));0{K7(),w8(),C8(),IA(),zC(),sL=mt((e,t,r,i,n,a,s)=>[`M${e},`+(t+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${e},`+(t+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oL=mt((e,t,r,i,n,a,s)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${e},`+(t+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lL=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),hL=cL=10,mt(aL,"linedCylinder")});async function dL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:a,bbox:e,label:s}=((t.width||t.height)&&(a=t.width,t.width=10*(a??0)/11-2*n,t.width<10&&(t.width=10),t.height=(t?.height??0)-2*r,t.height<10)&&(t.height=10),await V7(e,t,X7(t))),n=(t?.width||e.width)+2*(n??0),r=(t?.height||e.height)+2*(r??0),o="neo"===t.look?r/4:r/8,l=r+o,c=t.cssStyles,h=LA.svg(a),u=b8(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-n/2-n/2*.1,y:-l/2},{x:-n/2-n/2*.1,y:l/2},...W7(-n/2-n/2*.1,l/2,n/2+n/2*.1,l/2,o,.8),{x:n/2+n/2*.1,y:-l/2},{x:-n/2-n/2*.1,y:-l/2},{x:-n/2,y:-l/2},{x:-n/2,y:l/2*1.1},{x:-n/2,y:-l/2}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",c),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(0,${-o/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(e.x-(e.left??0))},${-r/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),H7(t,g),t.intersect=function(e){return J.polygon(t,d,e)},a}var pL=r(()=>{K7(),w8(),IA(),C8(),mt(dL,"linedWaveEdgedRect")});async function gL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,a="neo"===t.look?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-2*n-2*a,10),t.height=Math.max((t?.height??0)-2*r-2*a,10));let{shapeSvg:s,bbox:o,label:l}=await V7(e,t,X7(t)),c=(t?.width||o.width)+2*n+2*a,h=(t?.height||o.height)+2*r+2*a,u=c-2*a,d=h-2*a,p=-u/2,g=-d/2,f=t.cssStyles,m=LA.svg(s),y=b8(t,{}),v=[{x:p-a,y:g+a},{x:p-a,y:g+d+a},{x:p+u-a,y:g+d+a},{x:p+u-a,y:g+d},{x:p+u,y:g+d},{x:p+u,y:g+d-a},{x:p+u+a,y:g+d-a},{x:p+u+a,y:g-a},{x:p+a,y:g-a},{x:p+a,y:g},{x:p,y:g},{x:p,y:g+a}],b=[{x:p,y:g+a},{x:p+u-a,y:g+a},{x:p+u-a,y:g+d},{x:p+u,y:g+d},{x:p+u,y:g},{x:p,y:g}],x=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),j7(v)),T=m.path(x,y),k=j7(b),w=m.path(k,y);return"handDrawn"!==t.look&&(T=G7(T),w=G7(w)),(e=s.insert("g",":first-child")).insert(()=>T),e.insert(()=>w),e.attr("class","basic label-container outer-path"),f&&"handDrawn"!==t.look&&e.selectAll("path").attr("style",f),i&&"handDrawn"!==t.look&&e.selectAll("path").attr("style",i),l.attr("transform",`translate(${-o.width/2-a-(o.x-(o.left??0))}, ${-o.height/2+a-(o.y-(o.top??0))})`),H7(t,e),t.intersect=function(e){return J.polygon(t,v,e)},s}var fL=r(()=>{K7(),C8(),IA(),w8(),mt(gL,"multiRect")});async function mL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await V7(e,t,X7(t)),o=t.padding??0,l="neo"===t.look?16:o,c="neo"===t.look?12:o,h=!0,u=((t.width||t.height)&&(h=!1,t.width=(t?.width??0)-2*l,t.height=(t?.height??0)-3*c),Math.max(a.width,t?.width??0)+2*l),d=Math.max(a.height,t?.height??0)+3*c,p="neo"===t.look?d/4:d/8,g=d+(h?p/2:-p/2),f=-u/2,m=-g/2,y=t.cssStyles,v=W7(f-10,m+g+10,f+u-10,m+g+10,p,.8),b=v?.[v.length-1],x=[{x:f-10,y:10+m},{x:f-10,y:m+g+10},...v,{x:f+u-10,y:b.y-10},{x:f+u,y:b.y-10},{x:f+u,y:b.y-20},{x:f+u+10,y:b.y-20},{x:f+u+10,y:m-10},{x:10+f,y:m-10},{x:10+f,y:m},{x:f,y:m},{x:f,y:10+m}],T=[{x:f,y:10+m},{x:f+u-10,y:10+m},{x:f+u-10,y:b.y-10},{x:f+u,y:b.y-10},{x:f+u,y:m},{x:f,y:m}],k=LA.svg(n),w=b8(t,{}),C=("handDrawn"!==t.look&&(w.roughness=0,w.fillStyle="solid"),j7(x)),S=k.path(C,w),E=j7(T),_=k.path(E,w),A=n.insert(()=>S,":first-child");return A.insert(()=>_),A.attr("class","basic label-container outer-path"),y&&"handDrawn"!==t.look&&A.selectAll("path").attr("style",y),i&&"handDrawn"!==t.look&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-a.width/2-10-(a.x-(a.left??0))}, ${-a.height/2+10-p/2-(a.y-(a.top??0))})`),H7(t,A),t.intersect=function(e){return J.polygon(t,x,e)},n}var yL=r(()=>{K7(),w8(),IA(),C8(),mt(mL,"multiWaveEdgedRectangle")});async function vL(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=v8(t),{shapeSvg:i,bbox:e,label:a}=(t.labelStyle=i,t.useHtmlLabels||_r(vr())||(t.centerLabel=!0),await V7(e,t,X7(t))),s=Math.max(e.width+2*(t.padding??0),t?.width??0),o=Math.max(e.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=t.cssStyles,u=LA.svg(i),r=b8(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(r.roughness=0,r.fillStyle="solid");let d=u.rectangle(l,c,s,o,r),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container outer-path"),a.attr("class","label noteLabel"),h&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))}, ${-e.height/2-(e.y-(e.top??0))})`),H7(t,p),t.intersect=function(e){return J.rect(t,e)},i}var bL=r(()=>{IA(),w8(),C8(),K7(),wi(),wi(),mt(vL,"note")});async function xL(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await V7(e,n,X7(n)),s=i.width+(n.padding??0),o=i.height+(n.padding??0),l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(a),t=b8(n,{}),r=TL(0,0,l),i=e.path(r,t);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),u&&h.attr("style",u)}else(h=$A(a,l,l,c)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&h.attr("style",r),H7(n,h),n.calcIntersect=function(e,t){var r=e.width;return{x:(e=J.polygon(e,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],t)).x-.5,y:e.y-.5}},n.intersect=function(e){return this.calcIntersect(n,e)},a}var TL,kL=r(()=>{K7(),w8(),C8(),IA(),FA(),TL=mt((e,t,r)=>[`M${e+r/2},`+t,`L${e+r},`+(t-r/2),`L${e+r/2},`+(t-r),`L${e},`+(t-r/2),"Z"].join(" "),"createDecisionBoxPathD"),mt(xL,"question")});async function wL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let n=t.padding??0,a="neo"===t.look?21:n??0,s="neo"===t.look?12:n??0,{shapeSvg:o,bbox:l,label:c}=await V7(e,t,X7(t)),h=(t?.width??l.width)+("neo"===t.look?2*a:a),u=(t?.height??l.height)+("neo"===t.look?2*s:s),d=-h/2,p=-u/2,g=p/2,f=[{x:d+g,y:p},{x:d,y:0},{x:d+g,y:-p},{x:-d,y:-p},{x:-d,y:p}],m=t.cssStyles,y=LA.svg(o),v=b8(t,{}),b=("handDrawn"!==t.look&&(v.roughness=0,v.fillStyle="solid"),j7(f)),x=y.path(b,v),T=o.insert(()=>x,":first-child");return T.attr("class","basic label-container outer-path"),m&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${-g/2},0)`),c.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),H7(t,T),t.intersect=function(e){return J.polygon(t,f,e)},o}var CL,SL,EL=r(()=>{K7(),w8(),C8(),IA(),mt(wL,"rect_left_inv_arrow")}),_L=r(()=>{wi(),Uu(),F7(),CL=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=B(),s=_r(t);return $7(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),SL=CL});async function AL(n,a){var{labelStyles:e,nodeStyles:t}=v8(a);a.labelStyle=e;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",n.insert("g").attr("class",r).attr("id",a.domId||a.id)),i=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",t),l=a.description,c=a.label,h=await SL(o,c,a.labelStyle,!0,!0),u={width:0,height:0};_r(B())&&(e=h.children[0],n=Q(h),u=e.getBoundingClientRect(),n.attr("width",u.width),n.attr("height",u.height)),P.info("Text 2",l);var e=l||[],n=h.getBBox(),d=(e=await SL(o,Array.isArray(e)?e.join("
"):e,a.labelStyle,!0,!0)).children[0],p=Q(e),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);Q(e).attr("transform","translate( "+(u.width>n.width?0:(n.width-u.width)/2)+", "+(n.height+d+5)+")"),Q(h).attr("transform","translate( "+(u.width(P.debug("Rough node insert CXC",r),i),":first-child"),v=s.insert(()=>(P.debug("Rough node insert CXC",r),r),":first-child")}else v=i.insert("rect",":first-child"),b=i.insert("line"),v.attr("class","outer title-state").attr("style",t).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),b.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+n.height+d).attr("y2",-u.height/2-d+n.height+d);return H7(a,v),a.intersect=function(e){return J.rect(a,e)},s}var RL=r(()=>{bk(),K7(),_L(),w8(),C8(),IA(),Uu(),fR(),e(),wi(),mt(AL,"rectWithTitle")});async function LL(e,t,{config:{themeVariables:r}}){return mR(e,t,{rx:r=r?.radius??5,ry:r,classes:"",labelPaddingX:+(t?.padding??0),labelPaddingY:+(t?.padding??0)})}var IL=r(()=>{yR(),mt(LL,"roundedRect")});async function NL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?12:t.padding??0,{shapeSvg:e,bbox:a,label:s}=await V7(e,t,X7(t)),r=(t?.width??a.width)+2*r+("neo"===t.look?DL:2*DL),n=(t?.height??a.height)+2*n,o=r-DL,l=n,r=DL-r/2,n=-n/2,c=t.cssStyles,h=LA.svg(e),u=b8(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:r,y:n},{x:r+o,y:n},{x:r+o,y:n+l},{x:r-DL,y:n+l},{x:r-DL,y:n},{x:r,y:n},{x:r,y:n+l}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=e.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path").attr("style",cC(c)),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),s.attr("transform",`translate(${DL/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),H7(t,g),t.intersect=function(e){return J.rect(t,e)},e}var DL,ML=r(()=>{K7(),w8(),C8(),IA(),zC(),DL=8,mt(NL,"shadedProcess")});async function OL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a,label:s}=((t.width||t.height)&&(t.width=Math.max((t?.width??0)-2*n,10),t.height=Math.max((t?.height??0)/1.5-2*r,10)),await V7(e,t,X7(t))),o=-(n=(t?.width||a.width)+2*n)/2,l=-(r=1.5*((t?.height||a.height)+2*r)/1.5)/2,c=t.cssStyles,h=LA.svg(e),u=b8(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+r},{x:o+n,y:l+r},{x:o+n,y:l-r/2}],p=j7(d),g=h.path(p,u),f=e.insert(()=>g,":first-child");return f.attr("class","basic label-container outer-path"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(0, ${r/4})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))}, ${-r/4+(t.padding??0)-(a.y-(a.top??0))})`),H7(t,f),t.intersect=function(e){return J.polygon(t,d,e)},e}var PL=r(()=>{K7(),w8(),C8(),IA(),mt(OL,"slopedRect")});async function BL(e,t){var r=t.padding??0;return mR(e,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??("neo"===t.look?16:2*r),labelPaddingY:"neo"===t.look?12:r})}var $L=r(()=>{yR(),mt(BL,"squareRect")});async function FL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?20:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a}=await V7(e,t,X7(t)),r=a.height+("neo"===t.look?2*r:r),a=a.width+r/4+("neo"===t.look?2*n:n),n=r/2,s=t.cssStyles,o=LA.svg(e),l=b8(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-a/2+n,y:-r/2},{x:a/2-n,y:-r/2},...U7(-a/2+n,0,n,50,90,270),{x:a/2-n,y:r/2},...U7(a/2-n,0,n,50,270,450)],h=j7(c),u=o.path(h,l),d=e.insert(()=>u,":first-child");return d.attr("class","basic label-container outer-path"),s&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",i),H7(t,d),t.intersect=function(e){return J.polygon(t,c,e)},e}var zL=r(()=>{K7(),w8(),C8(),IA(),mt(FL,"stadium")});async function qL(e,t){return mR(e,t,{rx:"neo"===t.look?3:5,ry:"neo"===t.look?3:5,classes:"flowchart-node"})}var jL=r(()=>{yR(),mt(qL,"state")});function WL(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=v8(t),i=(t.labelStyle=i,t.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s,nodeShadow:o}=r,l=((t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14)&&(t.height=14),t.width||(t.width=14),t.height||(t.height=14),e.insert("g").attr("class","node default").attr("id",t.domId??t.id)),c=LA.svg(l),h=b8(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=c.circle(0,0,t.width,{...h,stroke:r,strokeWidth:2}),d=a??s,p=5*(t.width??0)/14,g=c.circle(0,0,p,{...h,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),f=l.insert(()=>u,":first-child");return f.insert(()=>g),"handDrawn"!==t.look&&f.attr("class","outer-path"),i&&f.selectAll("path").attr("style",i),n&&f.selectAll("path").attr("style",n),t.width<25&&o&&"handDrawn"!==t.look&&(r=e.node()?.ownerSVGElement?.id??"",f.attr("style",`filter:url(#${r?r+"-drop-shadow-small":"drop-shadow-small"})`)),H7(t,f),t.intersect=function(e){return J.circle(t,(t.width??0)/2,e)},l}var UL=r(()=>{IA(),w8(),C8(),K7(),mt(WL,"stateEnd")});function GL(e,t,{config:{themeVariables:r}}){var{lineColor:r,nodeShadow:i}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14)&&(t.height=14),t.width||(t.width=14),t.height||(t.height=14);let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),a;if("handDrawn"===t.look){let e=LA.svg(n).circle(0,0,t.width,g8(r));(a=n.insert(()=>e)).attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else(a=n.insert("circle",":first-child")).attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);return t.width<25&&i&&"handDrawn"!==t.look&&(r=e.node()?.ownerSVGElement?.id??"",a.attr("style",`filter:url(#${r?r+"-drop-shadow-small":"drop-shadow-small"})`)),H7(t,a),t.intersect=function(e){return J.circle(t,(t.width??7)/2,e)},n}var VL=r(()=>{IA(),w8(),C8(),K7(),mt(GL,"stateStart")});async function YL(a,s){var{labelStyles:o,nodeStyles:e}=v8(s);s.labelStyle=o;let t=s?.padding??8,r="neo"===s.look?28:t,i="neo"===s.look?12:t,{shapeSvg:l,bbox:n}=await V7(a,s,X7(s)),c=(s?.width??n.width)+2*HL+r,h=(s?.height??n.height)+i,u=c-2*HL,d=h,p=-c/2,g=-h/2,f=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:8+u,y:0},{x:8+u,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===s.look){let e=LA.svg(l),t=b8(s,{}),r=e.rectangle(p,g,16+u,d,t),i=e.line(p+HL,g,p+HL,g+d,t),n=e.line(p+HL+u,g,p+HL+u,g+d,t);l.insert(()=>i,":first-child"),l.insert(()=>n,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",cC(a)),H7(s,o)}else a=$A(l,u,d,f),e&&a.attr("style",e),H7(s,a);return s.intersect=function(e){return J.polygon(s,f,e)},l}var HL,XL=r(()=>{K7(),w8(),C8(),IA(),FA(),zC(),HL=8,mt(YL,"subroutine")});async function KL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-2*r,10),t.width=Math.max((t?.width??0)-2*n-ZL*(t.height+2*r),10));let{shapeSvg:a,bbox:s}=await V7(e,t,X7(t)),o=(t?.height||s.height)+2*r,l=ZL*o,c=ZL*o,h=(t?.width||s.width)+2*n+l-l,u=o,d=-h/2,p=-u/2,g=t.cssStyles,f=LA.svg(a),m=b8(t,{}),y=[{x:d-l/2,y:p},{x:d+h+l/2,y:p},{x:d+h+l/2,y:p+u},{x:d-l/2,y:p+u}],v=[{x:d+h-l/2,y:p+u},{x:d+h+l/2,y:p+u},{x:d+h+l/2,y:p+u-c}],b=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),j7(y)),x=f.path(b,m),T=j7(v),k=f.path(T,{...m,fillStyle:"solid"}),w=a.insert(()=>k,":first-child");return w.insert(()=>x,":first-child"),w.attr("class","basic label-container outer-path"),g&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",g),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),H7(t,w),t.intersect=function(e){return J.polygon(t,y,e)},a}var ZL,QL=r(()=>{K7(),C8(),IA(),w8(),ZL=.2,mt(KL,"taggedRect")});async function JL(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await V7(e,t,X7(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/8,l=.2*a,c=.2*s,h=s+o,u=t.cssStyles,d=LA.svg(r),p=b8(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...W7(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,o,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.3*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...W7(f+a,1.25*(m+s),f+a-l,1.3*(m+s),.02*-s,.5)],v=j7(g),b=d.path(v,p),x=j7(y),T=d.path(x,{...p,fillStyle:"solid"}),k=r.insert(()=>T,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container outer-path"),u&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),H7(t,k),t.intersect=function(e){return J.polygon(t,g,e)},r}var e9=r(()=>{K7(),w8(),IA(),C8(),mt(JL,"taggedWaveEdgedRectangle")});async function t9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await V7(e,t,X7(t))),n=Math.max(e.width+(t.padding??0),t?.width||0),a=-n/2,s=-(e=Math.max(e.height+(t.padding??0),t?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",n).attr("height",e),H7(t,o),t.intersect=function(e){return J.rect(t,e)},r}var r9=r(()=>{K7(),w8(),C8(),mt(t9,"text")});async function i9(e,a){var{labelStyles:t,nodeStyles:r}=v8(a),t=(a.labelStyle=t,a.padding??0),t="neo"===a.look?12:t/2;(a.width||a.height)&&(p=a.height??0,a.height=(a.height??0)-t,a.heightn,":first-child"),(d=s.insert(()=>i,":first-child")).attr("class","basic label-container"),u&&d.attr("style",u)}else{var p=n9(0,0,h,o,c,l);(d=s.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",cC(u)).attr("style",r)).attr("class","basic label-container outer-path"),u&&d.selectAll("path").attr("style",u),r&&d.selectAll("path").attr("style",r)}return d.attr("label-offset-x",c),d.attr("transform",`translate(${-h/2}, ${o/2} )`),n.attr("transform",`translate(${-i.width/2-c-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),H7(a,d),a.intersect=function(t){var r=J.rect(a,t),i=r.y-(a.y??0);if(0!=l&&(Math.abs(i)<(a.height??0)/2||Math.abs(i)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-c)){let e=c*c*(1-i*i/(l*l));0!=e&&(e=Math.sqrt(Math.abs(e))),e=c-e,0{K7(),C8(),IA(),w8(),zC(),n9=mt((e,t,r,i,n,a)=>`M${e},${t} a${n},${a} 0,0,1 0,${-i} l${r},0 a${n},${a} 0,0,1 0,${i} M${r},${-i} a${n},${a} 0,0,0 0,${i} l${-r},0`,"createCylinderPathD"),a9=mt((e,t,r,i,n,a)=>[`M${e},`+t,`M${e+r},`+t,`a${n},${a} 0,0,0 0,`+-i,`l${-r},0`,`a${n},${a} 0,0,0 0,`+i,`l${r},0`].join(" "),"createOuterCylinderPathD"),s9=mt((e,t,r,i,n,a)=>[`M${e+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),o9=5,l9=10,mt(i9,"tiltedCylinder")});async function h9(e,n){var{labelStyles:t,nodeStyles:r}=v8(n);n.labelStyle=t;let i=n.padding??0,a=i,s="neo"===n.look?2*i:i,{shapeSvg:o,bbox:l}=await V7(e,n,X7(n)),c=(n?.height??l.height)+a,h=(n?.width??l.width)+s,u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}],d,p=n.cssStyles;if("handDrawn"===n.look){let e=LA.svg(o),t=b8(n,{}),r=j7(u),i=e.path(r,t);d=o.insert(()=>i,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&d.attr("style",p)}else d=$A(o,h,c,u);return r&&d.attr("style",r),n.width=h,n.height=c,H7(n,d),n.intersect=function(e){return J.polygon(n,u,e)},o}var u9=r(()=>{K7(),w8(),C8(),IA(),FA(),mt(h9,"trapezoid")});async function d9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?12:r,{shapeSvg:e,bbox:a}=((t.width||t.height)&&(t.height=(t.height??0)-2*r,t.height<5&&(t.height=5),t.width=(t.width??0)-2*n,t.width<15)&&(t.width=15),await V7(e,t,X7(t))),n=(t?.width||a.width)+2*n,a=(t?.height||a.height)+2*r,r=t.cssStyles,s=LA.svg(e),o=b8(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-n/2*.8,y:-a/2},{x:n/2*.8,y:-a/2},{x:n/2,y:-a/2*.6},{x:n/2,y:a/2},{x:-n/2,y:a/2},{x:-n/2,y:-a/2*.6}],c=j7(l),h=s.path(c,o),u=e.insert(()=>h,":first-child");return u.attr("class","basic label-container outer-path"),r&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",r),i&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",i),H7(t,u),t.intersect=function(e){return J.polygon(t,l,e)},e}var p9=r(()=>{K7(),w8(),C8(),IA(),mt(d9,"trapezoidalPentagon")});async function g9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),r="neo"===t.look?2*r:r;(t.width||t.height)&&(t.width=((t?.width??0)-r)/2,t.widthm,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",i),t.width=l,t.height=c,H7(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return P.info("Triangle intersect",t,u,e),J.polygon(t,u,e)},n}var f9,m9,y9=r(()=>{e(),K7(),w8(),C8(),IA(),K7(),th(),Uu(),m9=f9=10,mt(g9,"triangle")});async function v9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let n=t.padding??0,a="neo"===t.look?16:n,s="neo"===t.look?12:n,o=!0;(t.width||t.height)&&(o=!1,t.width=(t?.width??0)-2*a,t.width<10&&(t.width=10),t.height=(t?.height??0)-2*s,t.height<10)&&(t.height=10);var{shapeSvg:r,bbox:e,label:l}=await V7(e,t,X7(t)),c=(t?.width||e.width)+2*(a??0),h=(t?.height||e.height)+2*(s??0),u="neo"===t.look?h/4:h/8,d=h+(o?u:-u),p=t.cssStyles,g=0<(g=14-c)?g/2:0,f=LA.svg(r),m=b8(t,{});"handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-c/2-g,y:d/2},...W7(-c/2-g,d/2,c/2+g,d/2,u,.8),{x:c/2+g,y:-d/2},{x:-c/2-g,y:-d/2}],v=j7(y),b=f.path(v,m),x=r.insert(()=>b,":first-child");return x.attr("class","basic label-container outer-path"),p&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",p),i&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-u/2})`),l.attr("transform",`translate(${-c/2+(t.padding??0)-(e.x-(e.left??0))},${-h/2+(t.padding??0)-u-(e.y-(e.top??0))})`),H7(t,x),t.intersect=function(e){return J.polygon(t,y,e)},r}var b9=r(()=>{K7(),w8(),IA(),C8(),mt(v9,"waveEdgedRectangle")});async function x9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,t.padding??0),n="neo"===t.look?16:r,r="neo"===t.look?20:r,{shapeSvg:a,bbox:e}=((t.width||t.height)&&(t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10),a=Math.min(.2*t.height,t.height/4),t.height=Math.ceil(t.height-r-a*(20/9)),t.width=t.width-2*n),await V7(e,t,X7(t))),n=(t?.width||e.width)+2*n,e=(e=(t?.height||e.height)+r)+2*(r=e/8),s=t.cssStyles,o=LA.svg(a),l=b8(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-n/2,y:e/2},...W7(-n/2,e/2,n/2,e/2,r,1),{x:n/2,y:-e/2},...W7(n/2,-e/2,-n/2,-e/2,r,-1)],h=j7(c),u=o.path(h,l),d=a.insert(()=>u,":first-child");return d.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",i),H7(t,d),t.intersect=function(e){return J.polygon(t,c,e)},a}var T9=r(()=>{K7(),w8(),C8(),IA(),mt(x9,"waveRectangle")});async function k9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t),r=(t.labelStyle=r,"neo"===t.look?16:t.padding??0),n="neo"===t.look?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-2*r-w9,10),t.height=Math.max((t?.height??0)-2*n-w9,10));let{shapeSvg:a,bbox:s,label:o}=await V7(e,t,X7(t)),l=(t?.width||s.width)+2*r+w9,c=(t?.height||s.height)+2*n+w9,h=l-w9,u=c-w9,d=-h/2,p=-u/2,g=t.cssStyles,f=LA.svg(a),m=b8(t,{}),y=[{x:d-w9,y:p-w9},{x:d-w9,y:p+u},{x:d+h,y:p+u},{x:d+h,y:p-w9}],v=`M${d-w9},${p-w9} L${d+h},${p-w9} L${d+h},${p+u} L${d-w9},${p+u} L${d-w9},${p-w9} M${d-w9},${p} L${d+h},${p} M${d},${p-w9} L${d},`+(p+u),b=("handDrawn"!==t.look&&(m.roughness=0,m.fillStyle="solid"),f.path(v,m)),x=a.insert(()=>b,":first-child");return x.attr("transform",`translate(${w9/2}, ${w9/2})`),x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-s.width/2+w9/2-(s.x-(s.left??0))}, ${-s.height/2+w9/2-(s.y-(s.top??0))})`),H7(t,x),t.intersect=function(e){return J.polygon(t,y,e)},a}var w9,C9=r(()=>{K7(),C8(),IA(),w8(),w9=10,mt(k9,"windowPane")});async function S9(e,t){var r,i=t,{theme:n,themeVariables:a}=(i.alias&&(t.label=i.alias),vr()),{rowEven:P,rowOdd:B,nodeBorder:$,borderColorArray:a}=a,s=("handDrawn"===t.look&&(_=(_=vr().themeVariables).background,await S9(e,{...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none","fill: "+_]})),vr());t.useHtmlLabels=s.htmlLabels;let o=s.er?.diagramPadding??10,l=s.er?.entityPadding??6,c=t.cssStyles,{labelStyles:h,nodeStyles:u}=v8(t);if(0===i.attributes.length&&t.label)return _={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},sC(t.label,s)+2*_.labelPaddingXe+(t?.rowHeight??0),0)),Math.max(E.width+2*o,t?.width||0,_)),I=Math.max((V??0)+g.height,t?.height||0),N=-L/2,D=-I/2,Y=(p.selectAll("g:not(:first-child)").each((e,t,r)=>{let i=Q(r[t]),n=i.attr("transform"),a=0,s=0;n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),i.attr("class").includes("attribute-name")?a+=v:i.attr("class").includes("attribute-keys")?a+=v+b:i.attr("class").includes("attribute-comment")&&(a+=v+b+x)),i.attr("transform",`translate(${N+o/2+a}, ${s+D+g.height+l/2})`)}),p.select(".name").attr("transform","translate("+-g.width/2+", "+(D+l/2)+")"),null!=n&&A9.has(n)&&(e=i.colorIndex??0,p.attr("data-color-id","color-"+e%a.length)),A.rectangle(N,D,L,I,R)),H=p.insert(()=>Y,":first-child").attr("class","outer-path").attr("style",c.join(""));m.push(0);for([U,C]of y.entries()){let e=(U+1)%2==0&&0!==C.yOffset,t=A.rectangle(N,g.height+D+C?.yOffset,L,C?.rowHeight,{...R,fill:e?P:B,stroke:$});p.insert(()=>t,"g.label").attr("style",c.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let M=_9(N,g.height+D,L+N,g.height+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R);p.insert(()=>O).attr("class","divider"),M=_9(v+N,g.height+D,v+N,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider"),F&&(S=v+b+N,M=_9(S,g.height+D,S,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider")),z&&(E=v+b+x+N,M=_9(E,g.height+D,E,I+D,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider"));for(G of m){var X=g.height+D+G;M=_9(N,X,L+N,X,1e-4),O=A.polygon(M.map(e=>[e.x,e.y]),R),p.insert(()=>O).attr("class","divider")}return H7(t,H),u&&"handDrawn"!==t.look&&(null!=n&&R9.has(n)?p.selectAll("path"):(_=u.split(";")?.filter(e=>e.includes("stroke"))?.map(e=>""+e).join("; "),p.selectAll("path").attr("style",_??""),p.selectAll(".row-rect-even path"))).attr("style",u),t.intersect=function(e){return J.rect(t,e)},p}async function E9(e,t,r,i=0,n=0,a=[],s=""){if(e=e.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${i}, ${n})`).attr("style",s),t!==$c(t)&&(t=(t=$c(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await $7(e,t,{width:sC(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),t.includes("<")||t.includes(">")){let e=a.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)(e=e.childNodes[0]).textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return or(r.htmlLabels)&&((i=a.children[0]).style.textAlign="start",n=Q(a),o=i.getBoundingClientRect(),n.attr("width",o.width),n.attr("height",o.height)),o}function _9(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}var A9,R9,L9=r(()=>{K7(),w8(),C8(),IA(),yR(),wi(),F7(),th(),bk(),zC(),A9=new Set(["redux-color","redux-dark-color"]),R9=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mt(S9,"erBox"),mt(E9,"addText"),mt(_9,"lineToPolygon")});async function I9(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",X7(t)).attr("id",t.domId||t.id),o=null,l=null,c=null,h=null,u=0,d,p=0;var g,f;o=s.insert("g").attr("class","annotation-group text"),0").length,e.innerHTML.includes("")&&(h+=e.innerHTML.split("").length-1),e.getElementsByTagName("img"));if(u){let i=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,e=5*parseInt(e,10)+"px",r.style.minWidth=e,r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}else i.includes("font-weight: bolder")&&Q(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var D9=r(()=>{bk(),wi(),K7(),zC(),Uu(),F7(),th(),mt(I9,"textHelper"),mt(N9,"addText")});async function M9(r,i){let o=B(),e=o.themeVariables,n=e.useGradient,l=o.class.padding??12,c=l,h=i.useHtmlLabels??or(o.htmlLabels)??!0,u=i,{shapeSvg:d,bbox:t}=(u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[],await I9(r,i,o,h,c)),{labelStyles:a,nodeStyles:s}=v8(i);i.labelStyle=a,i.cssStyles=u.styles||"";var p,r=u.styles?.join(";")||s||"";i.cssStyles||(i.cssStyles=r.replaceAll("!important","").split(";"));let g=0===u.members.length&&0===u.methods.length&&!o.class?.hideEmptyMembersBox,f=LA.svg(d),m=b8(i,{}),y=("handDrawn"!==i.look&&(m.roughness=0,m.fillStyle="solid"),Math.max(i.width??0,t.width)),v=Math.max(i.height??0,t.height),b=(i.height??0)>t.height,x=(0===u.members.length&&0===u.methods.length?v+=c:0w,":first-child"),S=(C.attr("class","basic label-container outer-path"),C.node().getBBox()),E=d.select(".annotation-group").node().getBBox().height-(g?l/2:0)||0,_=d.select(".label-group").node().getBBox().height-(g?l/2:0)||0,A=d.select(".members-group").node().getBBox().height-(g?l/2:0)||0,R=(E+_+T+l-(T-l-(g?l:0===u.members.length&&0===u.methods.length?-l/2:0)))/2;if(d.selectAll(".text").each((e,t,r)=>{let i=Q(r[t]),n=i.attr("transform"),a=(n=n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+T+l-(g?l:0===u.members.length&&0===u.methods.length?-l/2:0),s=(i.attr("class").includes("methods-group")&&(t=Math.max(A,c/2),a=b?Math.max(R,E+_+t+T+2*c+l)+2*c:E+_+t+T+4*c+l),0===u.members.length&&0===u.methods.length&&o.class?.hideEmptyMembersBox&&(a=0t).attr("class","divider"+("neo"!==i.look||n?"":" neo-line")).attr("style",r)}if(g||0t).attr("class","divider"+("neo"!==i.look||n?"":" neo-line")).attr("style",r)}return"handDrawn"!==u.look&&d.selectAll("path").attr("style",r),C.select(":nth-child(2)").attr("style",r),d.selectAll(".divider").select("path").attr("style",r),i.labelStyle?d.selectAll("span").attr("style",i.labelStyle):d.selectAll("span").attr("style",r),h||((r=(p=RegExp(/color\s*:\s*([^;]*)/)).exec(r))?(r=r[0].replace("color","fill"),d.selectAll("tspan").attr("style",r)):a&&(r=p.exec(a))&&(p=r[0].replace("color","fill"),d.selectAll("tspan").attr("style",p))),H7(i,C),i.intersect=function(e){return J.rect(i,e)},d}var O9=r(()=>{K7(),Uu(),bk(),IA(),C8(),w8(),D9(),th(),mt(M9,"classBox")});async function P9(r,i){var{labelStyles:e,nodeStyles:t}=v8(i);i.labelStyle=e;let n=i,a=i,s="verifyMethod"in i,o=X7(i),l=B().themeVariables,{borderColorArray:c,requirementEdgeLabelBackground:h}=l,u=r.insert("g").attr("class",o).attr("id",i.domId??i.id),d,p=d=s?await B9(u,`<<${n.type}>>`,0,i.labelStyle):await B9(u,"<<Element>>",0,i.labelStyle),g=await B9(u,n.name,p,i.labelStyle+"; font-weight: bold;"),f=(p+=g+20,s?(e=await B9(u,n.requirementId?"ID: "+n.requirementId:"",p,i.labelStyle),p+=e,r=await B9(u,n.text?"Text: "+n.text:"",p,i.labelStyle),p+=r,e=await B9(u,n.risk?"Risk: "+n.risk:"",p,i.labelStyle),p+=e,await B9(u,n.verifyMethod?"Verification: "+n.verifyMethod:"",p,i.labelStyle)):(r=await B9(u,a.type?"Type: "+a.type:"",p,i.labelStyle),p+=r,await B9(u,a.docRef?"Doc Ref: "+a.docRef:"",p,i.labelStyle)),(u.node()?.getBBox().width??200)+20),m=(u.node()?.getBBox().height??200)+20,y=-f/2,v=-m/2,b=LA.svg(u),x=b8(i,{}),T=("handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid"),b.rectangle(y,v,f,m,x)),k=u.insert(()=>T,":first-child");if(k.attr("class","basic label-container outer-path").attr("style",t),c?.length&&(e=i.colorIndex??0,u.attr("data-color-id","color-"+e%c.length)),u.selectAll(".label").each((e,t,r)=>{let i=Q(r[t]),n=i.attr("transform"),a=0,s=0,o=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-m/2),l=10+y;0!==t&&1!==t||(l=a),i.attr("transform",`translate(${l}, ${20+o})`)}),p>d+g+20){let e=v+d+g+20,t;t="neo"===i.look?(r=[[y,e],[y+f,e],[y+f,e+.001],[y,e+.001]],b.polygon(r,x)):b.line(y,e,y+f,e,x),u.insert(()=>t).attr("class","divider")}return H7(i,k),i.intersect=function(e){return J.rect(i,e)},t&&"handDrawn"!==i.look&&(h||c?.length)&&u.selectAll("path").attr("style",t),u}async function B9(e,t,r,i=""){if(""===t)return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=B(),s=a.htmlLabels??!0,o=await $7(n,Yh($C(t)),{width:sC(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),l;if(s)e=o.children[0],t=Q(o),l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height);else{var c;for(c of o.children[0].children)i&&c.setAttribute("style",i);(l=o.getBBox()).height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var $9=r(()=>{K7(),w8(),C8(),IA(),zC(),Uu(),F7(),bk(),mt(P9,"requirementBox"),mt(B9,"addText")});async function F9(e,i,{config:t}){var{labelStyles:n,nodeStyles:r}=v8(i),n=(i.labelStyle=n||"",i.width);i.width=(i.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await V7(e,i,X7(i)),l=i.padding||10,c,h,u=("ticket"in i&&i.ticket&&t?.kanban?.ticketBaseUrl&&(c=t?.kanban?.ticketBaseUrl.replace("#TICKET#",i.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:i.useHtmlLabels,labelStyle:i.labelStyle||"",width:i.width,img:i.img,padding:i.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await Y7(h,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await Y7(a,"ticket"in i&&i.ticket||"",u);var{label:e,bbox:t}=await Y7(a,"assigned"in i&&i.assigned||"",u),n=(i.width=n,i?.width||0),g=Math.max(p.height,t.height)/2,f=Math.max(s.height+20,i?.height||0)+g,m=-n/2,y=-f/2;o.attr("transform","translate("+(l-n/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-n/2)+", "+(-g+s.height/2)+")"),e.attr("transform","translate("+(l+n/2-t.width-20)+", "+(-g+s.height/2)+")");let v,{rx:b,ry:x}=i,T=i.cssStyles;if("handDrawn"===i.look){let e=LA.svg(a),t=b8(i,{}),r=b||x?e.path(pR(m,y,n,f,b||0),t):e.rectangle(m,y,n,f,t);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",T||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",b??5).attr("ry",x??5).attr("x",m).attr("y",y).attr("width",n).attr("height",f),(e="priority"in i&&i.priority)&&(t=a.append("line"),g=2+m,r=y+Math.floor((b??0)/2),n=y+f-Math.floor((b??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",n).attr("stroke-width","4").attr("stroke",z9(e)));return H7(i,v),i.height=f,i.intersect=function(e){return J.rect(i,e)},a}var z9,q9=r(()=>{K7(),w8(),fR(),C8(),IA(),z9=mt(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),mt(F9,"kanbanItem")});async function j9(e,i){var{labelStyles:n,nodeStyles:t}=v8(i),{shapeSvg:n,bbox:e,halfPadding:r,label:a}=(i.labelStyle=n,await V7(e,i,X7(i))),s=e.width+10*r,r=e.height+8*r,o=.15*s,l=i.cssStyles,c=e.height+20,s=Math.max(s,e.width+20),r=Math.max(r,c);a.attr("transform",`translate(${-e.width/2}, ${-e.height/2})`);let h,u=`M0 0 a${o},${o} 1 0,0 ${.25*s},${-1*r*.1} a${o},${o} 1 0,0 ${.25*s},0 a${o},${o} 1 0,0 ${.25*s},0 a${o},${o} 1 0,0 ${.25*s},${.1*r} a${o},${o} 1 0,0 ${.15*s},${.33*r} a${.8*o},${.8*o} 1 0,0 0,${.34*r} a${o},${o} 1 0,0 ${-1*s*.15},${.33*r} a${o},${o} 1 0,0 ${-1*s*.25},${.15*r} a${o},${o} 1 0,0 ${-1*s*.25},0 a${o},${o} 1 0,0 ${-1*s*.25},0 a${o},${o} 1 0,0 ${-1*s*.25},${-1*r*.15} a${o},${o} 1 0,0 ${-1*s*.1},${-1*r*.33} a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34} a${o},${o} 1 0,0 ${.1*s},${-1*r*.33} H0 V0 Z`;if("handDrawn"===i.look){let e=LA.svg(n),t=b8(i,{}),r=e.path(u,t);(h=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(l))}else h=n.insert("path",":first-child").attr("class","basic label-container").attr("style",t).attr("d",u);return h.attr("transform",`translate(${-s/2}, ${-r/2})`),H7(i,h),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return P.info("Bang intersect",i,e),J.rect(i,e)},n}var W9=r(()=>{e(),K7(),w8(),C8(),IA(),zC(),mt(j9,"bang")});async function U9(e,i){var{labelStyles:t,nodeStyles:r}=v8(i);i.labelStyle=t;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await V7(e,i,X7(i)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,p=.2*l,g=i.cssStyles,f,m=`M0 0 a${h},${h} 0 0,1 ${.25*l},${-1*l*.1} a${d},${d} 1 0,1 ${.4*l},${-1*l*.1} a${u},${u} 1 0,1 ${.35*l},${.2*l} a${h},${h} 1 0,1 ${.15*l},${.35*c} a${p},${p} 1 0,1 ${-1*l*.15},${.65*c} a${u},${h} 1 0,1 ${-1*l*.25},${.15*l} a${d},${d} 1 0,1 ${-1*l*.5},0 a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15} a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35} a${p},${p} 1 0,1 ${.1*l},${-1*c*.65} H0 V0 Z`;if("handDrawn"===i.look){let e=LA.svg(n),t=b8(i,{}),r=e.path(m,t);(f=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",cC(g))}else f=n.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",m);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-c/2})`),H7(i,f),i.calcIntersect=function(e,t){return J.rect(e,t)},i.intersect=function(e){return P.info("Cloud intersect",i,e),J.rect(i,e)},n}var G9=r(()=>{IA(),e(),zC(),w8(),C8(),K7(),mt(U9,"cloud")});async function V9(e,t){var{labelStyles:r,nodeStyles:i}=v8(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await V7(e,t,X7(t)),l=a.width+8*s,c=a.height+2*s,h="neo"===t.look?` M${-l/2} ${c/2-5} v${10-c} q0,-5 5,-5 h${l-10} q5,0 5,5 v${c-5} H${-l/2} Z `:` M${-l/2} ${c/2-5} v${10-c} q0,-5 5,-5 h${l-10} q5,0 5,5 v${c-10} q0,5 -5,5 h${-(l-10)} q-5,0 -5,-5 Z `;if(t.domId)return r=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",h),n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),H7(t,r),t.calcIntersect=function(e,t){return J.rect(e,t)},t.intersect=function(e){return J.rect(t,e)},n;throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`)}var Y9=r(()=>{w8(),C8(),K7(),mt(V9,"defaultMindmapNode")});async function H9(e,t){return GA(e,t,{padding:t.padding??0})}var X9=r(()=>{VA(),mt(H9,"mindmapCircle")});function K9(e){return e in J9}var Z9,Q9,J9,eI,tI,rI,iI,nI,aI,sI,oI,lI,cI,hI,uI,dI,pI=r(()=>{DA(),BA(),jA(),UA(),VA(),XA(),QA(),tR(),nR(),sR(),gR(),bR(),TR(),wR(),SR(),RR(),IR(),DR(),PR(),$R(),zR(),jR(),UR(),VR(),HR(),KR(),QR(),eL(),rL(),nL(),uL(),pL(),fL(),yL(),bL(),kL(),EL(),RL(),IL(),ML(),PL(),$L(),zL(),jL(),UL(),VL(),XL(),QL(),e9(),r9(),c9(),u9(),p9(),y9(),b9(),T9(),C9(),L9(),O9(),$9(),q9(),W9(),G9(),Y9(),X9(),Z9=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:BL},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:LL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:FL},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:YL},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:oR},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:vR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:GA},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:j9},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:U9},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:xL},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:MR},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tL},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:JR},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:h9},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:XR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:kR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:t9},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zA},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:NL},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:GL},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:WL},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:LR},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:BR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ZA},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eR},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:iL},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:v9},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:NR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:i9},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:aL},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:aR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:g9},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:k9},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:CR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:d9},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ER},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:OL},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:mL},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:gL},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:PA},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:HA},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:JL},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:KL},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:x9},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:wL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:dL}],Q9=mt(()=>{var e=[...Object.entries({state:qL,choice:WA,note:vL,rectWithTitle:AL,labelRect:ZR,iconSquare:GR,iconCircle:qR,icon:FR,iconRounded:WR,imageSquare:YR,anchor:NA,kanbanItem:F9,mindmapCircle:H9,defaultMindmapNode:V9,classBox:M9,erBox:S9,requirementBox:P9}),...Z9.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),J9=Q9(),mt(K9,"isValidShape")}),gI=r(()=>{bk(),k_(),Uu(),e(),pI(),zC(),th(),Wu(),kk(),An(),eI=class{constructor(){this.vertexCounter=0,this.config=B(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Bh,this.setAccDescription=Fh,this.setDiagramTitle=qh,this.getAccTitle=$h,this.getAccDescription=zh,this.getDiagramTitle=jh,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{mt(this,"FlowDB")}sanitizeText(e){return I.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(var t of this.vertices.values())if(t.id===e)return this.diagramId?this.diagramId+"-"+t.domId:t.domId;return this.diagramId?this.diagramId+"-"+e:e}addVertex(i,n,a,s,o,l,c={},e){if(i&&0!==i.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(` `)?e+` `:`{ `+e+` }`,r=T_(t,{schema:x_})),e=this.edges.find(e=>e.id===i))void 0!==(t=r)?.animate&&(e.animate=t.animate),void 0!==t?.animation&&(e.animation=t.animation),void 0!==t?.curve&&(e.interpolate=t.curve);else{let e,t=this.vertices.get(i);if(void 0===t&&(void 0===n&&void 0===a&&null!=s&&P.warn(`Style applied to unknown node "${i}". This may indicate a typo. The node will be created automatically.`),t={id:i,labelType:"text",domId:"flowchart-"+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,t)),this.vertexCounter++,void 0!==n?(this.config=B(),e=this.sanitizeText(n.text.trim()),t.labelType=n.type,e.startsWith('"')&&e.endsWith('"')&&(e=e.substring(1,e.length-1)),t.text=e):void 0===t.text&&(t.text=i),void 0!==a&&(t.type=a),s?.forEach(e=>{t.styles.push(e)}),o?.forEach(e=>{t.classes.push(e)}),void 0!==l&&(t.dir=l),void 0===t.props?t.props=c:void 0!==c&&Object.assign(t.props,c),void 0!==r){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!K9(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label,t.labelType=this.sanitizeNodeLabelType(r?.labelType)),r?.icon&&(t.icon=r?.icon,!r.label?.trim())&&t.text===i&&(t.text=""),r?.form&&(t.form=r?.form),r?.pos&&(t.pos=r?.pos),r?.img&&(t.img=r?.img,!r.label?.trim())&&t.text===i&&(t.text=""),r?.constraint&&(t.constraint=r.constraint),r.w&&(t.assetWidth=Number(r.w)),r.h&&(t.assetHeight=Number(r.h))}}}}addSingleLink(e,t,r,i){let n={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(P.info("abc78 Got edge...",n),void 0!==(e=r.text)&&(n.text=this.sanitizeText(e.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(e.type)),void 0!==r&&(n.type=r.type,n.stroke=r.stroke,n.length=10e.id===i)?(n.id=i,n.isUserDefinedId=!0):0===(t=this.edges.filter(e=>e.start===n.start&&e.end===n.end)).length?n.id=FC(n.start,n.end,{counter:0,prefix:"L"}):n.id=FC(n.start,n.end,{counter:t.length+1,prefix:"L"}),!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. You have to call mermaid.initialize.`);P.info("Pushing edge..."),this.edges.push(n)}isLinkData(e){return null!==e&&"object"==typeof e&&"id"in e&&"string"==typeof e.id}addLink(e,t,r){var i,n=this.isLinkData(r)?r.id.replace("@",""):void 0;P.info("addLink",e,t,n);for(i of e)for(var a of t){var s=i===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{"default"===e?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if("number"==typeof e&&e>=this.edges.length)throw new Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===e?this.edges.defaultStyle=t:(this.edges[e].style=t,0<(this.edges[e]?.style?.length??0)&&!this.edges[e]?.style?.some(e=>e?.startsWith("fill"))&&this.edges[e]?.style?.push("fill:none"))})}addClass(e,t){let i=t.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),i?.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(e,r){for(let t of e.split(",")){var i=this.vertices.get(t);i&&i.classes.push(r),(i=this.edges.find(e=>e.id===t))&&i.classes.push(r),(i=this.subGraphLookup.get(t))&&i.classes.push(r)}}setTooltip(e,t){if(void 0!==t){t=this.sanitizeText(t);for(var r of e.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,t)}}setClickFun(t,i,e){if("loose"===B().securityLevel&&void 0!==i){let r=[];if("string"==typeof e){r=e.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{var e=this.lookUpDomId(t);null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",()=>{PC.runFunc(i,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=PC.formatUrl(t,this.config),e.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFun(e,t,r)}),this.setClass(e,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let i=Q3();Q(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=Q(e.currentTarget),r=t.attr("title");null!==r&&(e=e.currentTarget?.getBoundingClientRect(),i.transition().duration(200).style("opacity",".9"),i.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),i.html(_n.sanitize(r)),t.classed("hover",!0))}).on("mouseout",e=>{i.transition().duration(500).style("opacity",0),Q(e.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=B(),Ph()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,t,r){let i=e.text.trim(),n=r.text;e===r&&/\s/.exec(r.text)&&(i=void 0);var a=(e=mt(e=>{let r={boolean:{},number:{},string:{}},i=[],n;return{nodeList:e.filter(function(e){var t=typeof e;return e.stmt&&"dir"===e.stmt?(n=e.value,!1):""!==e.trim()&&(t in r?!r[t].hasOwnProperty(e)&&(r[t][e]=!0):!i.includes(e)&&i.push(e))}),dir:n}},"uniq")(t.flat())).nodeList,t=e.dir,e=B().flowchart??{},t=t??(e.inheritDir?this.getDirection()??B().direction??void 0:void 0);if("gen-1"===this.version)for(let e=0;e":i="arrow_point",t.startsWith("<")&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",t.startsWith("o")&&(i="double_"+i,r=r.slice(1))}let n="normal",a=r.length-1;return r.startsWith("=")&&(n="thick"),r.startsWith("~")&&(n="invisible"),(e=this.countChar(".",r))&&(n="dotted",a=e),{type:i,stroke:n,length:a}}destructLink(e,t){if(e=this.destructEndLink(e),t){if((t=this.destructStartLink(t)).stroke!==e.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===t.type)t.type=e.type;else{if(t.type!==e.type)return{type:"INVALID",stroke:"INVALID"};t.type="double_"+t.type}return"double_arrow"===t.type&&(t.type="double_arrow_point"),t.length=e.length,t}return e}exists(e,t){for(var r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(r,i){let n=[];return r.nodes.forEach((e,t)=>{this.exists(i,e)||n.push(r.nodes[t])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return"circle"===e.form?"iconCircle":"square"===e.form?"iconSquare":"rounded"===e.form?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t="none",r="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":r=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":t=e.replace("double_",""),r=t}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,i,n,a){var r=r.get(e.id),i=i.get(e.id)??!1,s=this.findNode(t,e.id);s?(s.cssStyles=e.styles,s.cssCompiledStyles=this.getCompiledStyles(e.classes),s.cssClasses=e.classes.join(" ")):(s={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:r,padding:n.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint},i?t.push({...s,isGroup:!0,shape:"rect"}):t.push({...s,isGroup:!1,shape:this.getTypeFromVertex(e)}))}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}getData(){let a=B(),t=[],s=[],r=this.getSubGraphs(),i=new Map,n=new Map;for(let e=r.length-1;0<=e;e--){var o,l=r[e];0{this.addNodeFromVertex(e,t,i,n,a,a.look||"classic")});let h=this.getEdges();return h.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:i}=this.destructEdgeType(e.type),n=[...h.defaultStyle??[]],t=(e.style&&n.push(...e.style),{id:FC(e.start,e.end,{counter:t,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":i,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:n,style:n,pattern:e.stroke,look:a.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(t)}),{nodes:t,edges:s,other:{},config:a}}defaultConfig(){return Vh.flowchart}}}),fI=r(()=>{bk(),tI=mt((e,t)=>{let r;return"sandbox"===t&&(r=Q("#i"+e)),Q("sandbox"===t?r.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement")}),mI=r(()=>{rI=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),yI=r(()=>{Uu(),wi(),e(),mI(),bk(),IA(),F7(),k8(),_L(),fR(),C8(),iI=mt(async(i,n)=>{P.info("Creating subgraph rect for ",n.id,n);let e=B(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=v8(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),d=_r(e),p=u.insert("g").attr("class","cluster-label "),g,f=(g="markdown"===n.labelType?await $7(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}):await SL(p,n.label,n.labelStyle||"",!1,!0)).getBBox();_r(e)&&(i=g.children[0],m=Q(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;P.trace("Data ",n,JSON.stringify(n));let b;if("handDrawn"===n.look){let e=LA.svg(u),t=b8(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(pR(y,v,i,m,0),t);(b=u.insert(()=>(P.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),b.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(b=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=rI(e).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=b.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(e){return p8(n,e)},{cluster:u,labelBBox:f}},"rect"),nI=mt((e,t)=>{var r=(e=e.insert("g").attr("class","note-cluster").attr("id",t.domId)).insert("rect",":first-child"),i=0*t.padding,n=i/2,n=(r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none"),r.node().getBBox());return t.width=n.width,t.height=n.height,t.intersect=function(e){return p8(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),aI=mt(async(n,a)=>{let e=B(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=t,u=n.insert("g").attr("class",a.cssClasses).attr("id",a.domId).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),i=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=await SL(i,a.label,a.labelStyle,void 0,!0),g=p.getBBox();_r(e)&&(n=p.children[0],f=Q(p),g=n.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(n=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+n,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+n),n=a.height+n-g.height-6,v=a.x-m/2,b=a.y-y/2;a.width=m;let x=a.y-a.height/2-f+g.height+2,T;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=LA.svg(u),r=a.rx||a.ry?t.path(pR(v,b,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,b,m,y,{seed:s}),i=(T=u.insert(()=>r,":first-child"),t.rectangle(v,x,m,n,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,seed:s}));T=u.insert(()=>r,":first-child"),d=u.insert(()=>i)}else(T=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",b).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",x).attr("width",m).attr("height",n);return i.attr("transform",`translate(${a.x-g.width/2}, ${1+b-(_r(e)?0:3)})`),f=T.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return p8(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),sI=mt(async(i,n)=>{P.info("Creating subgraph rect for ",n.id,n);let e=B(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=v8(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),d=_r(e),p=u.insert("g").attr("class","cluster-label "),g=await $7(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();_r(e)&&(i=g.children[0],m=Q(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;P.trace("Data ",n,JSON.stringify(n));let b;if("handDrawn"===n.look){let e=LA.svg(u),t=b8(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(pR(y,v,i,m,n.rx),t);(b=u.insert(()=>(P.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),b.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(b=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=rI(e).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=b.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(e){return p8(n,e)},{cluster:u,labelBBox:f}},"kanbanSection"),oI=mt((t,r)=>{var{themeVariables:i,handDrawnSeed:n}=B(),i=i.nodeBorder,e=(t=t.insert("g").attr("class",r.cssClasses).attr("id",r.domId).attr("data-look",r.look)).insert("g",":first-child"),a=0*r.padding,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let c;if("handDrawn"===r.look){let e=LA.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});c=t.insert(()=>e,":first-child")}else c=e.insert("rect",":first-child"),r.look,c.attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return i=c.node().getBBox(),r.height=i.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return p8(r,e)},{cluster:t,labelBBox:{}}},"divider"),lI={rect:iI,squareRect:iI,roundedWithTitle:aI,noteGroup:nI,divider:oI,kanbanSection:sI},cI=new Map,hI=mt(async(e,t)=>{var r=t.shape||"rect",r=await lI[r](e,t);return cI.set(t.id,r),r},"insertCluster"),uI=mt(()=>{cI=new Map},"clear")}),vI=r(()=>{dI=mt((e,t)=>t?"translate("+-e.width/2+", "+-e.height/2+")":"translate("+-((e.x??0)+e.width/2)+", "+-((e.y??0)+e.height/2)+")","computeLabelTransform")});function bI(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=kI(e),t=kI(t);var[e,r]=[e.x,e.y],[t,i]=[t.x,t.y],t=t-e,e=i-r;return{angle:Math.atan(e/t),deltaX:t,deltaY:e}}var xI,TI,kI,wI,CI,SI,EI,_I,AI=r(()=>{xI={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},TI={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5},mt(bI,"calculateDeltaAndAngle"),kI=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),wI=mt(c=>({x:mt(function(e,t,r){let i=0,n=kI(r[0]).x{e(),CI=mt((e,t,r,i,n,a=!1,s)=>{t.arrowTypeStart&&_I(e,"start",t.arrowTypeStart,r,i,n,a,s),t.arrowTypeEnd&&_I(e,"end",t.arrowTypeEnd,r,i,n,a,s)},"addEdgeMarkers"),SI={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},EI=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],_I=mt((e,t,r,i,n,a,s=!1,o)=>{let l=SI[r],c=l&&EI.includes(l.type),h;l?(n=n+`_${a}-`+l.type+("start"===t?"Start":"End")+(s&&c?"-margin":""),o&&""!==o.trim()?(a=n+"_"+o.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(s=document.getElementById(n))&&((h=s.cloneNode(!0)).id=a,h.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",o),l.fill&&e.setAttribute("fill",o)}),s.parentNode?.appendChild(h)),e.attr("marker-"+t,`url(${i}#${a})`)):e.attr("marker-"+t,`url(${i}#${n})`)):P.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function LI(e,t){_r(B())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function II(t){var r=[],i=[];for(let e=1;e({...e})),s=(2<=e.length&&xI[t.arrowTypeStart]&&(n=xI[t.arrowTypeStart],s=DI(i=e[0],e[1]).angle,r=n*Math.cos(s),n*=Math.sin(s),a[0].x=i.x+r,a[0].y=i.y+n),e.length);return 2<=s&&xI[t.arrowTypeEnd]&&(r=xI[t.arrowTypeEnd],i=e[s-1],n=DI(e[s-2],i).angle,t=r*Math.cos(n),e=r*Math.sin(n),a[s-1].x=i.x-t,a[s-1].y=i.y-e),a}var OI,PI,BI,$I,FI,zI,qI,jI,WI,UI,GI,VI,YI,HI,XI,KI,ZI,QI,JI,eN,tN,rN,iN,nN,aN,sN,oN,lN,cN,hN,uN,dN,pN,gN,fN,mN,yN,vN,bN,xN=r(()=>{Uu(),wi(),e(),F7(),vI(),zC(),AI(),mI(),bk(),IA(),_L(),RI(),C8(),OI=mt(e=>"string"==typeof e?e:B()?.flowchart?.curve,"resolveEdgeCurveType"),PI=new Map,BI=new Map,$I=mt(()=>{PI.clear(),BI.clear()},"clear"),FI=mt(e=>e?"string"==typeof e?e:e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),zI=mt(async(t,r)=>{var i=B(),n=_r(i),a=v8(r).labelStyles,s=(r.labelStyle=a,(a=t.insert("g").attr("class","edgeLabel")).insert("g").attr("class","label").attr("data-id",r.id)),e="markdown"===r.labelType,e=await $7(t,r.label,{style:FI(r.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:e,width:void 0},i);s.node().appendChild(e),P.info("abc82",r,r.labelType);let o=e.getBBox(),l=o;n?(i=e.children[0],h=Q(e),o=i.getBoundingClientRect(),l=o,h.attr("width",o.width),h.attr("height",o.height)):(i=Q(e).select("text").node())&&"function"==typeof i.getBBox&&(l=i.getBBox()),s.attr("transform",dI(l,n)),PI.set(r.id,a),r.width=o.width,r.height=o.height;let c;if(r.startLabelLeft){var h=t.insert("g").attr("class","edgeTerminals"),i=h.insert("g").attr("class","inner"),s=await SL(i,r.startLabelLeft,FI(r.labelStyle)||"",!1,!1);let e=(c=s).getBBox();n&&(a=s.children[0],s=Q(s),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)),i.attr("transform",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).startLeft=h,LI(c,r.startLabelLeft)}if(r.startLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await SL(s,r.startLabelRight,FI(r.labelStyle)||"",!1,!1);let e=(c=i).getBBox();n&&(h=i.children[0],i=Q(i),e=h.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),s.attr("transform",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).startRight=a,LI(c,r.startLabelRight)}if(r.endLabelLeft){i=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),s=await SL(h,r.endLabelLeft,FI(r.labelStyle)||"",!1,!1);let e=(c=s).getBBox();n&&(a=s.children[0],s=Q(s),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)),i.attr("transform",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).endLeft=h,LI(c,r.endLabelLeft)}if(r.endLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await SL(a,r.endLabelRight,FI(r.labelStyle)||"",!1,!1);let e=(c=i).getBBox();n&&(h=i.children[0],t=Q(i),e=h.getBoundingClientRect(),t.attr("width",e.width),t.attr("height",e.height)),s.attr("transform",dI(e,n)),BI.get(r.id)||BI.set(r.id,{}),BI.get(r.id).endRight=a,LI(c,r.endLabelRight)}return e},"insertEdgeLabel"),mt(LI,"setTerminalWidth"),qI=mt((i,n)=>{P.debug("Moving label abc88 ",i.id,i.label,PI.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=B(),o=rI(o).subGraphTitleTotalMargin;if(i.label){let e=PI.get(i.id),t=i.x,r=i.y;s&&(a=PC.calcLabelPosition(s),P.debug("Moving label "+i.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(i.startLabelLeft){let e=BI.get(i.id).startLeft,t=i.x,r=i.y;s&&(n=PC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.startLabelRight){let e=BI.get(i.id).startRight,t=i.x,r=i.y;s&&(a=PC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelLeft){let e=BI.get(i.id).endLeft,t=i.x,r=i.y;s&&(o=PC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelRight){let e=BI.get(i.id).endRight,t=i.x,r=i.y;s&&(n=PC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),jI=mt((e,t)=>{var r=e.x,i=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-i);return e.width/2<=r||e.height/2<=t},"outsideNode"),WI=mt((e,i,n)=>{P.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(i)} insidePoint : ${JSON.stringify(n)} node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-n.x),s=e.width/2,o=n.xMath.abs(a-i.x)*l)return e=n.y{P.warn("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(P.info("abc88 checking point",e,i),jI(i,e)||s)P.warn("abc88 outside",e,a),a=e,s||n.push(e);else{let t=WI(i,a,e),r=(P.debug("abc88 inside",e,a,t),P.debug("abc88 intersection",t,i),!1);n.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),n.some(e=>e.x===t.x&&e.y===t.y)?P.warn("abc88 no intersect",t,n):n.push(t),s=!0}}),P.debug("returning points",n),n},"cutPathAtIntersect"),mt(II,"extractCornerPoints"),GI=mt(function(e,t,r){var i=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(i*i+e*e);return{x:t.x-r*i,y:t.y-r*e}},"findAdjacentPoint"),VI=mt(function(i){var e=II(i).cornerPointPositions,n=[];for(let r=0;r(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),HI=mt(function(t,e,r,i,n,a,s,o=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let l=B().handDrawnSeed,c=e.points,h=!1,u=n,d=a;var p,g=[];for(p in e.cssCompiledStyles)y8(p)||g.push(e.cssCompiledStyles[p]);P.debug("UIO intersect check",e.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((c=c.slice(1,e.points.length-1)).unshift(u.intersect(c[0])),P.debug("Last point UIO",e.start,"--\x3e",e.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),n=btoa(JSON.stringify(c)),e.toCluster&&(P.info("to cluster abc88",r.get(e.toCluster)),c=UI(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(P.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(c,null,2)),c=UI(c.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let f=c.filter(e=>!Number.isNaN(e.y)),m=OI(e.curve),y=("rounded"!==m&&(f=VI(f)),v5);switch(m){case"linear":y=v5;break;case"basis":y=F5;break;case"cardinal":y=Q5;break;case"bumpX":y=I5;break;case"bumpY":y=N5;break;case"catmullRom":y=l3;break;case"monotoneX":y=E3;break;case"monotoneY":y=_3;break;case"natural":y=I3;break;case"step":y=M3;break;case"stepAfter":y=P3;break;case"stepBefore":y=O3;break;case"rounded":y=v5;break;default:y=F5}let{x:v,y:b}=wI(e),x=w5().x(v).y(b).curve(y),T;switch(e.thickness){case"normal":T="edge-thickness-normal";break;case"thick":T="edge-thickness-thick";break;case"invisible":T="edge-thickness-invisible";break;default:T="edge-thickness-normal"}switch(e.pattern){case"solid":T+=" edge-pattern-solid";break;case"dotted":T+=" edge-pattern-dotted";break;case"dashed":T+=" edge-pattern-dashed";break;default:T+=" edge-pattern-solid"}let k,w="rounded"===m?NI(MI(f,e),5):x(f),C=Array.isArray(e.style)?e.style:[e.style],S=C.find(e=>e?.startsWith("stroke:")),E="",_=(e.animate&&(E="edge-animation-fast"),e.animation&&(E="edge-animation-"+e.animation),!1),A=("handDrawn"===e.look?(a=LA.svg(t),Object.assign([],f),o=a.path(w,{roughness:.3,seed:l}),T+=" transition",r=(k=Q(o).select("path").attr("id",s+"-"+e.id).attr("class"," "+T+(e.classes?" "+e.classes:"")+(E?" "+E:"")).attr("style",C?C.reduce((e,t)=>e+";"+t,""):"")).attr("d"),k.attr("d",r),t.node().appendChild(k.node())):(a=g.join(";"),o=C?C.reduce((e,t)=>e+t+";",""):"",r=(a?a+";"+o+";":o)+";"+(C?C.reduce((e,t)=>e+";"+t,""):""),k=t.append("path").attr("d",w).attr("id",s+"-"+e.id).attr("class"," "+T+(e.classes?" "+e.classes:"")+(E?" "+E:"")).attr("style",r),S=r.match(/stroke:([^;]+)/)?.[1],_=!0===e.animate||!!e.animation||a.includes("animation"),r="function"==typeof(o=k.node()).getTotalLength?o.getTotalLength():0,a=TI[e.arrowTypeStart]||0,o=TI[e.arrowTypeEnd]||0,"neo"!==e.look||_||(r=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?YI(r,a,o):`0 ${a} ${r-a-o} `+o}; stroke-dashoffset: 0;`,k.attr("style",r+k.attr("style")))),k.attr("data-edge",!0),k.attr("data-et","edge"),k.attr("data-id",e.id),k.attr("data-points",n),k.attr("data-look",cC(e.look)),e.showPoints&&f.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)}),"");return(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(A=(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",e.arrowTypeStart),P.info("arrowTypeEnd",e.arrowTypeEnd),a=!_&&"neo"===e?.look,CI(k,e,A,s,i,a,S),o=Math.floor(c.length/2),r=c[o],n={},(h=!PC.isLabelCoordinateInPath(r,k.attr("d"))||h)&&(n.updatedPath=c),n.originalPath=e.points,n},"insertEdge"),mt(NI,"generateRoundedPath"),mt(DI,"calculateDeltaAndAngle"),mt(MI,"applyMarkerOffsetsToPoints")}),TN=r(()=>{e(),wi(),XI=mt((t,e,r,i)=>{e.forEach(e=>{vN[e](t,r,i)})},"insertMarkers"),KI=mt((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),ZI=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),QI=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),JI=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),eN=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),tN=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),rN=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),iN=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),nN=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),aN=mt((e,t,r)=>{var i=vr().themeVariables.transitionColor;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",""+i)},"barbNeo"),sN=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),oN=mt((e,t,r)=>{var i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18"),(i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),lN=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),cN=mt((e,t,r)=>{var i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),hN=mt((e,t,r)=>{var i=vr().themeVariables.strokeWidth;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",""+i),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",""+i)},"only_one_neo"),uN=mt((e,t,r)=>{var{strokeWidth:i,mainBkg:n}=vr().themeVariables,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");a.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",""+i).attr("r",6),a.append("path").attr("d","M9,0 L9,18").attr("stroke-width",""+i),(a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto")).append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",""+i).attr("r",6),a.append("path").attr("d","M21,0 L21,18").attr("stroke-width",""+i)},"zero_or_one_neo"),dN=mt((e,t,r)=>{var i=vr().themeVariables.strokeWidth;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",""+i),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",""+i)},"one_or_more_neo"),pN=mt((e,t,r)=>{var{strokeWidth:i,mainBkg:n}=vr().themeVariables,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");a.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",""+i),a.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",""+i),(a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse")).append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",""+i),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",""+i)},"zero_or_more_neo"),gN=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),fN=mt((e,t,r)=>{var i=vr().themeVariables.strokeWidth;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",""+i).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),mN=mt((e,t,r)=>{(e=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),yN=mt((e,t,r)=>{var i=vr().themeVariables.strokeWidth;(e=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),e.selectAll("*").attr("stroke-width",""+i)},"requirement_contains_neo"),vN={extension:KI,composition:ZI,aggregation:QI,dependency:JI,lollipop:eN,point:tN,circle:rN,cross:iN,barb:nN,barbNeo:aN,only_one:sN,zero_or_one:oN,one_or_more:lN,zero_or_more:cN,only_one_neo:hN,zero_or_one_neo:uN,one_or_more_neo:dN,zero_or_more_neo:pN,requirement_arrow:gN,requirement_contains:mN,requirement_arrow_neo:fN,requirement_contains_neo:yN},bN=XI});async function kN(t,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?J9[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===i.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(n,r,i)}else a=await s(t,r,i),n=a;return n.attr("data-look",cC(r.look)),r.tooltip&&a.attr("title",r.tooltip),wN.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var wN,CN,SN,EN,_N,AN,RN,LN,IN,NN,DN,MN=r(()=>{e(),pI(),zC(),wN=new Map,mt(kN,"insertNode"),CN=mt((e,t)=>{wN.set(t.id,e)},"setNodeElem"),SN=mt(()=>{wN.clear()},"clear"),EN=mt(e=>{var t=wN.get(e.id),r=(P.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")}),ON=r(()=>{wi(),th(),e(),yI(),xN(),TN(),MN(),K7(),zC(),_N={common:I,getConfig:vr,insertCluster:hI,insertEdge:HI,insertEdgeLabel:zI,insertMarkers:bN,insertNode:kN,interpolateToCurve:Zw,labelHelper:V7,log:P,positionEdgeLabel:qI}}),PN=r(()=>{AN="object"==typeof global&&global&&global.Object===Object&&global,RN=AN}),BN=r(()=>{PN(),LN="object"==typeof self&&self&&self.Object===Object&&self,LN=RN||LN||Function("return this")(),IN=LN}),$N=r(()=>{BN(),NN=IN.Symbol,DN=NN});function FN(e){var t=qN.call(e,WN),r=e[WN];try{var i=!(e[WN]=void 0)}catch{}var n=jN.call(e);return i&&(t?e[WN]=r:delete e[WN]),n}var zN,qN,jN,WN,UN,GN=r(()=>{$N(),zN=Object.prototype,qN=zN.hasOwnProperty,jN=zN.toString,WN=DN?DN.toStringTag:void 0,mt(FN,"getRawTag"),UN=FN});function VN(e){return HN.call(e)}var YN,HN,XN,KN=r(()=>{YN=Object.prototype,HN=YN.toString,mt(VN,"objectToString"),XN=VN});function ZN(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(QN&&QN in Object(e)?UN:XN)(e)}var QN,JN,eD=r(()=>{$N(),GN(),KN(),QN=DN?DN.toStringTag:void 0,mt(ZN,"baseGetTag"),JN=ZN});function tD(e){return null!=e&&"object"==typeof e}var rD,iD=r(()=>{mt(tD,"isObjectLike"),rD=tD});function nD(e){return"symbol"==typeof e||rD(e)&&"[object Symbol]"==JN(e)}var aD,sD=r(()=>{eD(),iD(),mt(nD,"isSymbol"),aD=nD});function oD(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r{mt(oD,"arrayMap"),lD=oD}),dD=r(()=>{cD=Array.isArray,hD=cD});function pD(e){var t;return"string"==typeof e?e:hD(e)?lD(e,pD)+"":aD(e)?mD?mD.call(e):"":"0"==(t=e+"")&&1/e==-gD?"-0":t}var gD,fD,mD,yD,vD=r(()=>{$N(),uD(),dD(),sD(),gD=1/0,fD=DN?DN.prototype:void 0,mD=fD?fD.toString:void 0,mt(pD,"baseToString"),yD=pD});function bD(e){for(var t=e.length;t--&&xD.test(e.charAt(t)););return t}var xD,TD,kD=r(()=>{xD=/\s/,mt(bD,"trimmedEndIndex"),TD=bD});function wD(e){return e&&e.slice(0,TD(e)+1).replace(CD,"")}var CD,SD,ED=r(()=>{kD(),CD=/^\s+/,mt(wD,"baseTrim"),SD=wD});function _D(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var AD,RD=r(()=>{mt(_D,"isObject"),AD=_D});function LD(e){if("number"==typeof e)return e;if(aD(e))return ID;if(AD(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=AD(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=SD(e);var t=DD.test(e);return t||MD.test(e)?OD(e.slice(2),t?2:8):ND.test(e)?ID:+e}var ID,ND,DD,MD,OD,PD,BD=r(()=>{ED(),RD(),sD(),ID=NaN,ND=/^[-+]0x[0-9a-f]+$/i,DD=/^0b[01]+$/i,MD=/^0o[0-7]+$/i,OD=parseInt,mt(LD,"toNumber"),PD=LD});function $D(e){return e?(e=PD(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var FD,zD=r(()=>{BD(),mt($D,"toFinite"),FD=$D});function qD(e){var t=(e=FD(e))%1;return e==e?t?e-t:e:0}var jD,WD=r(()=>{zD(),mt(qD,"toInteger"),jD=qD});function UD(e){return e}var GD,VD=r(()=>{mt(UD,"identity"),GD=UD});function YD(e){return!!AD(e)&&("[object Function]"==(e=JN(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var HD,XD,KD,ZD=r(()=>{eD(),RD(),mt(YD,"isFunction"),HD=YD}),QD=r(()=>{BN(),XD=IN["__core-js_shared__"],KD=XD});function JD(e){return!!eM&&eM in e}var eM,tM,rM=r(()=>{var e;QD(),e=/[^.]+$/.exec(KD&&KD.keys&&KD.keys.IE_PROTO||""),eM=e?"Symbol(src)_1."+e:"",mt(JD,"isMasked"),tM=JD});function iM(e){if(null!=e){try{return aM.call(e)}catch{}try{return e+""}catch{}}return""}var nM,aM,sM,oM=r(()=>{nM=Function.prototype,aM=nM.toString,mt(iM,"toSource"),sM=iM});function lM(e){return!(!AD(e)||tM(e))&&(HD(e)?pM:hM).test(sM(e))}var cM,hM,uM,dM,pM,gM,fM=r(()=>{ZD(),rM(),RD(),oM(),cM=/[\\^$.*+?()[\]{}|]/g,hM=/^\[object .+?Constructor\]$/,uM=Function.prototype,dM=Object.prototype,uM=uM.toString,dM=dM.hasOwnProperty,pM=RegExp("^"+uM.call(dM).replace(cM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(lM,"baseIsNative"),gM=lM});function mM(e,t){return e?.[t]}var yM,vM=r(()=>{mt(mM,"getValue"),yM=mM});function bM(e,t){return e=yM(e,t),gM(e)?e:void 0}var xM,TM,kM,wM,CM,SM=r(()=>{fM(),vM(),mt(bM,"getNative"),xM=bM}),EM=r(()=>{SM(),BN(),TM=xM(IN,"WeakMap"),kM=TM}),_M=r(()=>{function t(){}RD(),wM=Object.create,mt(t,"object"),CM=function(e){return AD(e)?wM?wM(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function AM(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var RM,LM=r(()=>{mt(AM,"apply"),RM=AM});function IM(){}var NM,DM=r(()=>{mt(IM,"noop"),NM=IM});function MM(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r{mt(MM,"copyArray"),OM=MM});function BM(r){var i=0,n=0;return function(){var e=$M(),t=16-(e-n);if(n=e,0{$M=Date.now,mt(BM,"shortOut"),FM=BM});function qM(e){return function(){return e}}var jM,WM,UM,GM,VM,YM,HM=r(()=>{mt(qM,"constant"),jM=qM}),XM=r(()=>{SM(),WM=(()=>{try{var e=xM(Object,"defineProperty");return e({},"",{}),e}catch{}})(),UM=WM}),KM=r(()=>{HM(),XM(),VD(),GM=UM?function(e,t){return UM(e,"toString",{configurable:!0,enumerable:!1,value:jM(t),writable:!0})}:GD}),ZM=r(()=>{KM(),zM(),VM=FM(GM),YM=VM});function QM(e,t){for(var r=-1,i=null==e?0:e.length;++r{mt(QM,"arrayEach"),JM=QM});function tO(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a{mt(tO,"baseFindIndex"),rO=tO});function nO(e){return e!=e}var aO,sO=r(()=>{mt(nO,"baseIsNaN"),aO=nO});function oO(e,t,r){for(var i=r-1,n=e.length;++i{mt(oO,"strictIndexOf"),lO=oO});function hO(e,t,r){return t==t?lO(e,t,r):rO(e,aO,r)}var uO,dO=r(()=>{iO(),sO(),cO(),mt(hO,"baseIndexOf"),uO=hO});function pO(e,t){return!(null==e||!e.length)&&-1{dO(),mt(pO,"arrayIncludes"),gO=pO});function mO(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&yO.test(e))&&-1{yO=/^(?:0|[1-9]\d*)$/,mt(mO,"isIndex"),vO=mO});function xO(e,t,r){"__proto__"==t&&UM?UM(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var TO,kO=r(()=>{XM(),mt(xO,"baseAssignValue"),TO=xO});function wO(e,t){return e===t||e!=e&&t!=t}var CO,SO=r(()=>{mt(wO,"eq"),CO=wO});function EO(e,t,r){var i=e[t];AO.call(e,t)&&CO(i,r)&&(void 0!==r||t in e)||TO(e,t,r)}var _O,AO,RO,LO=r(()=>{kO(),SO(),_O=Object.prototype,AO=_O.hasOwnProperty,mt(EO,"assignValue"),RO=EO});function IO(e,t,r,i){var n=!r;r=r||{};for(var a=-1,s=t.length;++a{LO(),kO(),mt(IO,"copyObject"),NO=IO});function MO(a,s,o){return s=OO(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=OO(e.length-s,0),i=Array(r);++t{LM(),OO=Math.max,mt(MO,"overRest"),PO=MO});function $O(e,t){return YM(PO(e,t,GD),e+"")}var FO,zO=r(()=>{VD(),BO(),ZM(),mt($O,"baseRest"),FO=$O});function qO(e){return"number"==typeof e&&-1{mt(qO,"isLength"),jO=qO});function UO(e){return null!=e&&jO(e.length)&&!HD(e)}var GO,VO=r(()=>{ZD(),WO(),mt(UO,"isArrayLike"),GO=UO});function YO(e,t,r){var i;return!!AD(r)&&!!("number"==(i=typeof t)?GO(r)&&vO(t,r.length):"string"==i&&t in r)&&CO(r[t],e)}var HO,XO=r(()=>{SO(),VO(),bO(),RD(),mt(YO,"isIterateeCall"),HO=YO});function KO(o){return FO(function(e,t){var r=-1,i=t.length,n=1{zO(),XO(),mt(KO,"createAssigner"),ZO=KO});function JO(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}var eP,tP,rP=r(()=>{eP=Object.prototype,mt(JO,"isPrototype"),tP=JO});function iP(e,t){for(var r=-1,i=Array(e);++r{mt(iP,"baseTimes"),nP=iP});function sP(e){return rD(e)&&"[object Arguments]"==JN(e)}var oP,lP,cP,hP,uP,dP=r(()=>{eD(),iD(),mt(sP,"baseIsArguments"),oP=sP}),pP=r(()=>{dP(),iD(),hP=Object.prototype,lP=hP.hasOwnProperty,cP=hP.propertyIsEnumerable,hP=oP(function(){return arguments}())?oP:function(e){return rD(e)&&lP.call(e,"callee")&&!cP.call(e,"callee")},uP=hP});function gP(){return!1}var fP,mP,yP,vP,bP=r(()=>{mt(gP,"stubFalse"),fP=gP}),xP=r(()=>{BN(),bP(),yP="object"==typeof exports&&exports&&!exports.nodeType&&exports,mP=(mP=yP&&"object"==typeof module&&module&&!module.nodeType&&module)&&mP.exports===yP?IN.Buffer:void 0,yP=mP?mP.isBuffer:void 0,vP=yP||fP});function TP(e){return rD(e)&&jO(e.length)&&!!kP[JN(e)]}var kP,wP,CP=r(()=>{eD(),WO(),iD(),(kP={})["[object Float32Array]"]=kP["[object Float64Array]"]=kP["[object Int8Array]"]=kP["[object Int16Array]"]=kP["[object Int32Array]"]=kP["[object Uint8Array]"]=kP["[object Uint8ClampedArray]"]=kP["[object Uint16Array]"]=kP["[object Uint32Array]"]=!0,kP["[object Arguments]"]=kP["[object Array]"]=kP["[object ArrayBuffer]"]=kP["[object Boolean]"]=kP["[object DataView]"]=kP["[object Date]"]=kP["[object Error]"]=kP["[object Function]"]=kP["[object Map]"]=kP["[object Number]"]=kP["[object Object]"]=kP["[object RegExp]"]=kP["[object Set]"]=kP["[object String]"]=kP["[object WeakMap]"]=!1,mt(TP,"baseIsTypedArray"),wP=TP});function SP(t){return function(e){return t(e)}}var EP,_P,AP,RP,LP,IP,NP,DP=r(()=>{mt(SP,"baseUnary"),EP=SP}),MP=r(()=>{PN(),RP="object"==typeof exports&&exports&&!exports.nodeType&&exports,_P=RP&&"object"==typeof module&&module&&!module.nodeType&&module,RP=_P&&_P.exports===RP,AP=RP&&RN.process,RP=(()=>{try{return _P&&_P.require&&_P.require("util").types||AP&&AP.binding&&AP.binding("util")}catch{}})(),LP=RP}),OP=r(()=>{CP(),DP(),MP(),IP=(IP=LP&&LP.isTypedArray)?EP(IP):wP,NP=IP});function PP(e,t){var r,i=hD(e),n=!i&&uP(e),a=!i&&!n&&vP(e),s=!i&&!n&&!a&&NP(e),o=i||n||a||s,l=o?nP(e.length,String):[],c=l.length;for(r in e)!t&&!$P.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||vO(r,c))||l.push(r);return l}var BP,$P,FP,zP=r(()=>{aP(),pP(),dD(),xP(),bO(),OP(),BP=Object.prototype,$P=BP.hasOwnProperty,mt(PP,"arrayLikeKeys"),FP=PP});function qP(t,r){return function(e){return t(r(e))}}var jP,WP,UP,GP=r(()=>{mt(qP,"overArg"),jP=qP}),VP=r(()=>{GP(),WP=jP(Object.keys,Object),UP=WP});function YP(e){if(!tP(e))return UP(e);var t,r=[];for(t in Object(e))XP.call(e,t)&&"constructor"!=t&&r.push(t);return r}var HP,XP,KP,ZP=r(()=>{rP(),VP(),HP=Object.prototype,XP=HP.hasOwnProperty,mt(YP,"baseKeys"),KP=YP});function QP(e){return(GO(e)?FP:KP)(e)}var JP,eB=r(()=>{zP(),ZP(),VO(),mt(QP,"keys"),JP=QP});function tB(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var rB,iB=r(()=>{mt(tB,"nativeKeysIn"),rB=tB});function nB(e){if(!AD(e))return rB(e);var t,r=tP(e),i=[];for(t in e)("constructor"!=t||!r&&sB.call(e,t))&&i.push(t);return i}var aB,sB,oB,lB=r(()=>{RD(),rP(),iB(),aB=Object.prototype,sB=aB.hasOwnProperty,mt(nB,"baseKeysIn"),oB=nB});function cB(e){return GO(e)?FP(e,!0):oB(e)}var hB,uB=r(()=>{zP(),lB(),VO(),mt(cB,"keysIn"),hB=cB});function dB(e,t){var r;return!hD(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aD(e))||gB.test(e)||!pB.test(e)||null!=t&&e in Object(t))}var pB,gB,fB,mB,yB,vB=r(()=>{dD(),sD(),pB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gB=/^\w*$/,mt(dB,"isKey"),fB=dB}),bB=r(()=>{SM(),mB=xM(Object,"create"),yB=mB});function xB(){this.__data__=yB?yB(null):{},this.size=0}var TB,kB=r(()=>{bB(),mt(xB,"hashClear"),TB=xB});function wB(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var CB,SB=r(()=>{mt(wB,"hashDelete"),CB=wB});function EB(e){var t,r=this.__data__;return yB?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:AB.call(r,e)?r[e]:void 0}var _B,AB,RB,LB=r(()=>{bB(),_B=Object.prototype,AB=_B.hasOwnProperty,mt(EB,"hashGet"),RB=EB});function IB(e){var t=this.__data__;return yB?void 0!==t[e]:DB.call(t,e)}var NB,DB,MB,OB=r(()=>{bB(),NB=Object.prototype,DB=NB.hasOwnProperty,mt(IB,"hashHas"),MB=IB});function PB(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yB&&void 0===t?"__lodash_hash_undefined__":t,this}var BB,$B=r(()=>{bB(),mt(PB,"hashSet"),BB=PB});function FB(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{kB(),SB(),LB(),OB(),$B(),mt(FB,"Hash"),FB.prototype.clear=TB,FB.prototype.delete=CB,FB.prototype.get=RB,FB.prototype.has=MB,FB.prototype.set=BB,zB=FB});function jB(){this.__data__=[],this.size=0}var WB,UB=r(()=>{mt(jB,"listCacheClear"),WB=jB});function GB(e,t){for(var r=e.length;r--;)if(CO(e[r][0],t))return r;return-1}var VB,YB=r(()=>{SO(),mt(GB,"assocIndexOf"),VB=GB});function HB(e){var t=this.__data__;return!((e=VB(t,e))<0||(e==t.length-1?t.pop():KB.call(t,e,1),--this.size,0))}var XB,KB,ZB,QB=r(()=>{YB(),XB=Array.prototype,KB=XB.splice,mt(HB,"listCacheDelete"),ZB=HB});function JB(e){var t=this.__data__;return(e=VB(t,e))<0?void 0:t[e][1]}var e$,t$=r(()=>{YB(),mt(JB,"listCacheGet"),e$=JB});function r$(e){return-1{YB(),mt(r$,"listCacheHas"),i$=r$});function a$(e,t){var r=this.__data__,i=VB(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var s$,o$=r(()=>{YB(),mt(a$,"listCacheSet"),s$=a$});function l$(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{UB(),QB(),t$(),n$(),o$(),mt(l$,"ListCache"),l$.prototype.clear=WB,l$.prototype.delete=ZB,l$.prototype.get=e$,l$.prototype.has=i$,l$.prototype.set=s$,c$=l$}),p$=r(()=>{SM(),BN(),h$=xM(IN,"Map"),u$=h$});function g$(){this.size=0,this.__data__={hash:new zB,map:new(u$||c$),string:new zB}}var f$,m$=r(()=>{qB(),d$(),p$(),mt(g$,"mapCacheClear"),f$=g$});function y$(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var v$,b$=r(()=>{mt(y$,"isKeyable"),v$=y$});function x$(e,t){return e=e.__data__,v$(t)?e["string"==typeof t?"string":"hash"]:e.map}var T$,k$=r(()=>{b$(),mt(x$,"getMapData"),T$=x$});function w$(e){return e=T$(this,e).delete(e),this.size-=e?1:0,e}var C$,S$=r(()=>{k$(),mt(w$,"mapCacheDelete"),C$=w$});function E$(e){return T$(this,e).get(e)}var _$,A$=r(()=>{k$(),mt(E$,"mapCacheGet"),_$=E$});function R$(e){return T$(this,e).has(e)}var L$,I$=r(()=>{k$(),mt(R$,"mapCacheHas"),L$=R$});function N$(e,t){var r=T$(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var D$,M$=r(()=>{k$(),mt(N$,"mapCacheSet"),D$=N$});function O$(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{m$(),S$(),A$(),I$(),M$(),mt(O$,"MapCache"),O$.prototype.clear=f$,O$.prototype.delete=C$,O$.prototype.get=_$,O$.prototype.has=L$,O$.prototype.set=D$,P$=O$});function $$(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError(F$);var a=mt(function(){var e=arguments,t=n?n.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=i.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new($$.Cache||P$),a}var F$,z$,q$=r(()=>{B$(),F$="Expected a function",mt($$,"memoize"),$$.Cache=P$,z$=$$});function j$(e){var t=(e=z$(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var W$,U$,G$,V$,Y$,H$=r(()=>{q$(),mt(j$,"memoizeCapped"),W$=j$}),X$=r(()=>{H$(),U$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G$=/\\(\\)?/g,V$=W$(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(U$,function(e,t,r,i){n.push(r?i.replace(G$,"$1"):t||e)}),n}),Y$=V$});function K$(e){return null==e?"":yD(e)}var Z$,Q$=r(()=>{vD(),mt(K$,"toString"),Z$=K$});function J$(e,t){return hD(e)?e:fB(e,t)?[e]:Y$(Z$(e))}var eF,tF=r(()=>{dD(),vB(),X$(),Q$(),mt(J$,"castPath"),eF=J$});function rF(e){var t;return"string"==typeof e||aD(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var iF,nF=r(()=>{sD(),mt(rF,"toKey"),iF=rF});function aF(e,t){for(var r=0,i=(t=eF(t,e)).length;null!=e&&r{tF(),nF(),mt(aF,"baseGet"),sF=aF});function lF(e,t,r){return void 0===(e=null==e?void 0:sF(e,t))?r:e}var cF,hF=r(()=>{oF(),mt(lF,"get"),cF=lF});function uF(e,t){for(var r=-1,i=t.length,n=e.length;++r{mt(uF,"arrayPush"),dF=uF});function gF(e){return hD(e)||uP(e)||!!(fF&&e&&e[fF])}var fF,mF,yF=r(()=>{$N(),pP(),dD(),fF=DN?DN.isConcatSpreadable:void 0,mt(gF,"isFlattenable"),mF=gF});function vF(e,t,r,i,n){var a=-1,s=e.length;for(r=r||mF,n=n||[];++a{pF(),yF(),mt(vF,"baseFlatten"),bF=vF});function TF(e){return null!=e&&e.length?bF(e,1):[]}var kF,wF=r(()=>{xF(),mt(TF,"flatten"),kF=TF});function CF(e){return YM(PO(e,void 0,kF),e+"")}var SF,EF,_F,AF=r(()=>{wF(),BO(),ZM(),mt(CF,"flatRest"),SF=CF}),RF=r(()=>{GP(),EF=jP(Object.getPrototypeOf,Object),_F=EF});function LF(e){return!(!rD(e)||"[object Object]"!=JN(e))&&(null===(e=_F(e))||"function"==typeof(e=MF.call(e,"constructor")&&e.constructor)&&e instanceof e&&DF.call(e)==OF)}var IF,NF,DF,MF,OF,PF,BF=r(()=>{eD(),RF(),iD(),IF=Function.prototype,NF=Object.prototype,DF=IF.toString,MF=NF.hasOwnProperty,OF=DF.call(Object),mt(LF,"isPlainObject"),PF=LF});function $F(e){return FF.test(e)}var FF,zF,qF=r(()=>{FF=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt($F,"hasUnicode"),zF=$F});function jF(e,t,r,i){var n=-1,a=null==e?0:e.length;for(i&&a&&(r=e[++n]);++n{mt(jF,"arrayReduce"),WF=jF});function GF(){this.__data__=new c$,this.size=0}var VF,YF=r(()=>{d$(),mt(GF,"stackClear"),VF=GF});function HF(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var XF,KF=r(()=>{mt(HF,"stackDelete"),XF=HF});function ZF(e){return this.__data__.get(e)}var QF,JF=r(()=>{mt(ZF,"stackGet"),QF=ZF});function ez(e){return this.__data__.has(e)}var tz,rz=r(()=>{mt(ez,"stackHas"),tz=ez});function iz(e,t){var r=this.__data__;if(r instanceof c$){var i=r.__data__;if(!u$||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new P$(i)}return r.set(e,t),this.size=r.size,this}var nz,az=r(()=>{d$(),p$(),B$(),mt(iz,"stackSet"),nz=iz});function sz(e){e=this.__data__=new c$(e),this.size=e.size}var oz,lz=r(()=>{d$(),YF(),KF(),JF(),rz(),az(),mt(sz,"Stack"),sz.prototype.clear=VF,sz.prototype.delete=XF,sz.prototype.get=QF,sz.prototype.has=tz,sz.prototype.set=nz,oz=sz});function cz(e,t){return e&&NO(t,JP(t),e)}var hz,uz=r(()=>{DO(),eB(),mt(cz,"baseAssign"),hz=cz});function dz(e,t){return e&&NO(t,hB(t),e)}var pz,gz=r(()=>{DO(),uB(),mt(dz,"baseAssignIn"),pz=dz});function fz(e,t){return t?e.slice():(t=e.length,t=vz?vz(t):new e.constructor(t),e.copy(t),t)}var mz,yz,vz,bz,xz=r(()=>{BN(),mz="object"==typeof exports&&exports&&!exports.nodeType&&exports,yz=(yz=mz&&"object"==typeof module&&module&&!module.nodeType&&module)&&yz.exports===mz?IN.Buffer:void 0,vz=yz?yz.allocUnsafe:void 0,mt(fz,"cloneBuffer"),bz=fz});function Tz(e,t){for(var r=-1,i=null==e?0:e.length,n=0,a=[];++r{mt(Tz,"arrayFilter"),kz=Tz});function Cz(){return[]}var Sz,Ez,_z,Az,Rz,Lz=r(()=>{mt(Cz,"stubArray"),Sz=Cz}),Iz=r(()=>{wz(),Lz(),Ez=Object.prototype,_z=Ez.propertyIsEnumerable,Rz=(Az=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),kz(Az(t),function(e){return _z.call(t,e)}))}:Sz});function Nz(e,t){return NO(e,Rz(e),t)}var Dz,Mz,Oz,Pz=r(()=>{DO(),Iz(),mt(Nz,"copySymbols"),Dz=Nz}),Bz=r(()=>{pF(),RF(),Iz(),Lz(),Mz=Object.getOwnPropertySymbols,Oz=Mz?function(e){for(var t=[];e;)dF(t,Rz(e)),e=_F(e);return t}:Sz});function $z(e,t){return NO(e,Oz(e),t)}var Fz,zz=r(()=>{DO(),Bz(),mt($z,"copySymbolsIn"),Fz=$z});function qz(e,t,r){return t=t(e),hD(e)?t:dF(t,r(e))}var jz,Wz=r(()=>{pF(),dD(),mt(qz,"baseGetAllKeys"),jz=qz});function Uz(e){return jz(e,JP,Rz)}var Gz,Vz=r(()=>{Wz(),Iz(),eB(),mt(Uz,"getAllKeys"),Gz=Uz});function Yz(e){return jz(e,hB,Oz)}var Hz,Xz,Kz,Zz,Qz,Jz,eq,tq,rq,iq,nq,aq,sq,oq,lq,cq,hq,uq,dq,pq=r(()=>{Wz(),Bz(),uB(),mt(Yz,"getAllKeysIn"),Hz=Yz}),gq=r(()=>{SM(),BN(),Xz=xM(IN,"DataView"),Kz=Xz}),fq=r(()=>{SM(),BN(),Zz=xM(IN,"Promise"),Qz=Zz}),mq=r(()=>{SM(),BN(),Jz=xM(IN,"Set"),eq=Jz}),yq=r(()=>{gq(),p$(),fq(),mq(),EM(),eD(),oM(),tq="[object Map]",rq="[object Promise]",iq="[object Set]",nq="[object WeakMap]",aq="[object DataView]",sq=sM(Kz),oq=sM(u$),lq=sM(Qz),cq=sM(eq),hq=sM(kM),uq=JN,(Kz&&uq(new Kz(new ArrayBuffer(1)))!=aq||u$&&uq(new u$)!=tq||Qz&&uq(Qz.resolve())!=rq||eq&&uq(new eq)!=iq||kM&&uq(new kM)!=nq)&&(uq=mt(function(e){var t=JN(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?sM(e):"")switch(e){case sq:return aq;case oq:return tq;case lq:return rq;case cq:return iq;case hq:return nq}return t},"getTag")),dq=uq});function vq(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&xq.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var bq,xq,Tq,kq,wq,Cq=r(()=>{bq=Object.prototype,xq=bq.hasOwnProperty,mt(vq,"initCloneArray"),Tq=vq}),Sq=r(()=>{BN(),kq=IN.Uint8Array,wq=kq});function Eq(e){var t=new e.constructor(e.byteLength);return new wq(t).set(new wq(e)),t}var _q,Aq=r(()=>{Sq(),mt(Eq,"cloneArrayBuffer"),_q=Eq});function Rq(e,t){return t=t?_q(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var Lq,Iq=r(()=>{Aq(),mt(Rq,"cloneDataView"),Lq=Rq});function Nq(e){var t=new e.constructor(e.source,Dq.exec(e));return t.lastIndex=e.lastIndex,t}var Dq,Mq,Oq=r(()=>{Dq=/\w*$/,mt(Nq,"cloneRegExp"),Mq=Nq});function Pq(e){return $q?Object($q.call(e)):{}}var Bq,$q,Fq,zq=r(()=>{$N(),Bq=DN?DN.prototype:void 0,$q=Bq?Bq.valueOf:void 0,mt(Pq,"cloneSymbol"),Fq=Pq});function qq(e,t){return t=t?_q(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var jq,Wq=r(()=>{Aq(),mt(qq,"cloneTypedArray"),jq=qq});function Uq(e,t,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return _q(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return Lq(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return jq(e,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return Mq(e);case"[object Set]":return new i;case"[object Symbol]":return Fq(e)}}var Gq,Vq=r(()=>{Aq(),Iq(),Oq(),zq(),Wq(),mt(Uq,"initCloneByTag"),Gq=Uq});function Yq(e){return"function"!=typeof e.constructor||tP(e)?{}:CM(_F(e))}var Hq,Xq=r(()=>{_M(),RF(),rP(),mt(Yq,"initCloneObject"),Hq=Yq});function Kq(e){return rD(e)&&"[object Map]"==dq(e)}var Zq,Qq,Jq,ej=r(()=>{yq(),iD(),mt(Kq,"baseIsMap"),Zq=Kq}),tj=r(()=>{ej(),DP(),MP(),Qq=(Qq=LP&&LP.isMap)?EP(Qq):Zq,Jq=Qq});function rj(e){return rD(e)&&"[object Set]"==dq(e)}var ij,nj,aj,sj=r(()=>{yq(),iD(),mt(rj,"baseIsSet"),ij=rj}),oj=r(()=>{sj(),DP(),MP(),nj=(nj=LP&&LP.isSet)?EP(nj):ij,aj=nj});function lj(r,i,n,e,t,a){var s,o=i&cj,l=i&hj,c=i&uj;if(void 0===(s=n?t?n(r,e,t,a):n(r):s)){if(!AD(r))return r;if(e=hD(r)){if(s=Tq(r),!o)return OM(r,s)}else{var h=dq(r),u=h==pj||h==gj;if(vP(r))return bz(r,o);if(h==fj||h==dj||u&&!t){if(s=l||u?{}:Hq(r),!o)return l?Fz(r,pz(s,r)):Dz(r,hz(s,r))}else{if(!mj[h])return t?r:{};s=Gq(r,h,o)}}if(u=(a=a||new oz).get(r))return u;a.set(r,s),aj(r)?r.forEach(function(e){s.add(lj(e,i,n,e,r,a))}):Jq(r)&&r.forEach(function(e,t){s.set(t,lj(e,i,n,t,r,a))});var d=e?void 0:(c?l?Hz:Gz:l?hB:JP)(r);JM(d||r,function(e,t){d&&(e=r[t=e]),RO(s,t,lj(e,i,n,t,r,a))})}return s}var cj,hj,uj,dj,pj,gj,fj,mj,yj,vj=r(()=>{lz(),eO(),LO(),uz(),gz(),xz(),PM(),Pz(),zz(),Vz(),pq(),yq(),Cq(),Vq(),Xq(),dD(),xP(),tj(),RD(),oj(),eB(),uB(),cj=1,hj=2,uj=4,pj="[object Function]",gj="[object GeneratorFunction]",fj="[object Object]",(mj={})[dj="[object Arguments]"]=mj["[object Array]"]=mj["[object ArrayBuffer]"]=mj["[object DataView]"]=mj["[object Boolean]"]=mj["[object Date]"]=mj["[object Float32Array]"]=mj["[object Float64Array]"]=mj["[object Int8Array]"]=mj["[object Int16Array]"]=mj["[object Int32Array]"]=mj["[object Map]"]=mj["[object Number]"]=mj[fj]=mj["[object RegExp]"]=mj["[object Set]"]=mj["[object String]"]=mj["[object Symbol]"]=mj["[object Uint8Array]"]=mj["[object Uint8ClampedArray]"]=mj["[object Uint16Array]"]=mj["[object Uint32Array]"]=!0,mj["[object Error]"]=mj[pj]=mj["[object WeakMap]"]=!1,mt(lj,"baseClone"),yj=lj});function bj(e){return yj(e,4)}var xj,Tj=r(()=>{vj(),mt(bj,"clone"),xj=bj});function kj(e){return yj(e,5)}var wj,Cj=r(()=>{vj(),mt(kj,"cloneDeep"),wj=kj});function Sj(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var Ej,_j=r(()=>{mt(Sj,"setCacheAdd"),Ej=Sj});function Aj(e){return this.__data__.has(e)}var Rj,Lj=r(()=>{mt(Aj,"setCacheHas"),Rj=Aj});function Ij(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new P$;++t{B$(),_j(),Lj(),mt(Ij,"SetCache"),Ij.prototype.add=Ij.prototype.push=Ej,Ij.prototype.has=Rj,Nj=Ij});function Mj(e,t){for(var r=-1,i=null==e?0:e.length;++r{mt(Mj,"arraySome"),Oj=Mj});function Bj(e,t){return e.has(t)}var $j,Fj=r(()=>{mt(Bj,"cacheHas"),$j=Bj});function zj(e,t,r,i,n,a){var s=1&r,o=e.length;if(o!=(l=t.length)&&!(s&&o{Dj(),Pj(),Fj(),mt(zj,"equalArrays"),qj=zj});function Wj(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}var Uj,Gj=r(()=>{mt(Wj,"mapToArray"),Uj=Wj});function Vj(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Yj,Hj=r(()=>{mt(Vj,"setToArray"),Yj=Vj});function Xj(e,t,r,i,n,a,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new wq(e),new wq(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return CO(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Uj;case"[object Set]":var l,o=o||Yj;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=qj(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(Zj)return Zj.call(e)==Zj.call(t)}return!1}var Kj,Zj,Qj,Jj=r(()=>{$N(),Sq(),SO(),jj(),Gj(),Hj(),Kj=DN?DN.prototype:void 0,Zj=Kj?Kj.valueOf:void 0,mt(Xj,"equalByTag"),Qj=Xj});function eW(e,t,r,i,n,a){var s=1&r,o=Gz(e),l=o.length;if(l!=Gz(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:rW.call(t,h)))return!1}var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++c{Vz(),tW=Object.prototype,rW=tW.hasOwnProperty,mt(eW,"equalObjects"),iW=eW});function aW(e,t,r,i,n,a){var s=hD(e),o=hD(t),l=s?oW:dq(e),o=o?oW:dq(t),c=(l=l==sW?lW:l)==lW,h=(o=o==sW?lW:o)==lW;if((o=l==o)&&vP(e)){if(!vP(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new oz,s||NP(e)?qj(e,t,r,i,n,a):Qj(e,t,l,r,i,n,a)):1&r||(s=c&&hW.call(e,"__wrapped__"),l=h&&hW.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new oz,iW(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new oz)}var sW,oW,lW,cW,hW,uW,dW=r(()=>{lz(),jj(),Jj(),nW(),yq(),dD(),xP(),OP(),sW="[object Arguments]",oW="[object Array]",lW="[object Object]",cW=Object.prototype,hW=cW.hasOwnProperty,mt(aW,"baseIsEqualDeep"),uW=aW});function pW(e,t,r,i,n){return e===t||(null==e||null==t||!rD(e)&&!rD(t)?e!=e&&t!=t:uW(e,t,r,i,pW,n))}var gW,fW=r(()=>{dW(),iD(),mt(pW,"baseIsEqual"),gW=pW});function mW(e,t,r,i){var n=r.length,a=n,s=!i;if(null==e)return!a;for(e=Object(e);n--;){var o=r[n];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n{lz(),fW(),mt(mW,"baseIsMatch"),yW=mW});function bW(e){return e==e&&!AD(e)}var xW,TW=r(()=>{RD(),mt(bW,"isStrictComparable"),xW=bW});function kW(e){for(var t=JP(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,xW(n)]}return t}var wW,CW=r(()=>{TW(),eB(),mt(kW,"getMatchData"),wW=kW});function SW(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var EW,_W=r(()=>{mt(SW,"matchesStrictComparable"),EW=SW});function AW(t){var r=wW(t);return 1==r.length&&r[0][2]?EW(r[0][0],r[0][1]):function(e){return e===t||yW(e,t,r)}}var RW,LW=r(()=>{vW(),CW(),_W(),mt(AW,"baseMatches"),RW=AW});function IW(e,t){return null!=e&&t in Object(e)}var NW,DW=r(()=>{mt(IW,"baseHasIn"),NW=IW});function MW(e,t,r){for(var i=-1,n=(t=eF(t,e)).length,a=!1;++i{tF(),pP(),dD(),bO(),WO(),nF(),mt(MW,"hasPath"),OW=MW});function BW(e,t){return null!=e&&OW(e,t,NW)}var $W,FW=r(()=>{DW(),PW(),mt(BW,"hasIn"),$W=BW});function zW(r,i){return fB(r)&&xW(i)?EW(iF(r),i):function(e){var t=cF(e,r);return void 0===t&&t===i?$W(e,r):gW(i,t,3)}}var qW,jW=r(()=>{fW(),hF(),FW(),vB(),TW(),_W(),nF(),mt(zW,"baseMatchesProperty"),qW=zW});function WW(t){return function(e){return e?.[t]}}var UW,GW=r(()=>{mt(WW,"baseProperty"),UW=WW});function VW(t){return function(e){return sF(e,t)}}var YW,HW=r(()=>{oF(),mt(VW,"basePropertyDeep"),YW=VW});function XW(e){return fB(e)?UW(iF(e)):YW(e)}var KW,ZW=r(()=>{GW(),HW(),vB(),nF(),mt(XW,"property"),KW=XW});function QW(e){return"function"==typeof e?e:null==e?GD:"object"==typeof e?hD(e)?qW(e[0],e[1]):RW(e):KW(e)}var JW,eU=r(()=>{LW(),jW(),VD(),dD(),ZW(),mt(QW,"baseIteratee"),JW=QW});function tU(l){return function(e,t,r){for(var i=-1,n=Object(e),a=r(e),s=a.length;s--;){var o=a[l?s:++i];if(!1===t(n[o],o,n))break}return e}}var rU,iU,nU,aU=r(()=>{mt(tU,"createBaseFor"),rU=tU}),sU=r(()=>{aU(),iU=rU(),nU=iU});function oU(e,t){return e&&nU(e,t,JP)}var lU,cU=r(()=>{sU(),eB(),mt(oU,"baseForOwn"),lU=oU});function hU(a,s){return function(e,t){if(null!=e){if(!GO(e))return a(e,t);for(var r=e.length,i=s?r:-1,n=Object(e);(s?i--:++i{VO(),mt(hU,"createBaseEach"),uU=hU}),TU=r(()=>{cU(),xU(),dU=uU(lU),pU=dU}),kU=r(()=>{BN(),gU=mt(function(){return IN.Date.now()},"now"),fU=gU}),wU=r(()=>{zO(),SO(),XO(),uB(),mU=Object.prototype,yU=mU.hasOwnProperty,vU=FO(function(e,t){e=Object(e);var r=-1,i=t.length,n=2{kO(),SO(),mt(CU,"assignMergeValue"),SU=CU});function _U(e){return rD(e)&&GO(e)}var AU,RU=r(()=>{VO(),iD(),mt(_U,"isArrayLikeObject"),AU=_U});function LU(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var IU,NU=r(()=>{mt(LU,"safeGet"),IU=LU});function DU(e){return NO(e,hB(e))}var MU,OU=r(()=>{DO(),uB(),mt(DU,"toPlainObject"),MU=DU});function PU(e,t,r,i,n,a,s){var o,l,c,h=IU(e,r),u=IU(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=hD(u))&&vP(u),c=!o&&!l&&NP(u),d=u,o||l||c?d=hD(h)?h:AU(h)?OM(h):l?bz(u,!(t=!1)):c?jq(u,!(t=!1)):[]:PF(u)||uP(u)?uP(d=h)?d=MU(h):AD(h)&&!HD(h)||(d=Hq(u)):t=!1),t&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),SU(e,r,d)}var BU,$U=r(()=>{EU(),xz(),Wq(),PM(),Xq(),pP(),dD(),RU(),xP(),ZD(),RD(),BF(),OP(),NU(),OU(),mt(PU,"baseMergeDeep"),BU=PU});function FU(i,n,a,s,o){i!==n&&nU(n,function(e,t){var r;o=o||new oz,AD(e)?BU(i,n,t,a,FU,s,o):(r=s?s(IU(i,t),e,t+"",i,n,o):void 0,SU(i,t,void 0===r?e:r))},hB)}var zU,qU=r(()=>{lz(),EU(),sU(),$U(),RD(),uB(),NU(),mt(FU,"baseMerge"),zU=FU});function jU(e,t,r){for(var i=-1,n=null==e?0:e.length;++i{mt(jU,"arrayIncludesWith"),WU=jU});function GU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var VU,YU=r(()=>{mt(GU,"last"),VU=GU});function HU(e){return"function"==typeof e?e:GD}var XU,KU=r(()=>{VD(),mt(HU,"castFunction"),XU=HU});function ZU(e,t){return(hD(e)?JM:pU)(e,XU(t))}var y,QU=r(()=>{eO(),TU(),KU(),dD(),mt(ZU,"forEach"),y=ZU}),JU=r(()=>{QU()});function eG(e,i){var n=[];return pU(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}var tG,rG=r(()=>{TU(),mt(eG,"baseFilter"),tG=eG});function iG(e,t){return(hD(e)?kz:tG)(e,JW(t,3))}var nG,aG=r(()=>{wz(),rG(),eU(),dD(),mt(iG,"filter"),nG=iG});function sG(a){return function(e,t,r){var i,n=Object(e);return GO(e)||(i=JW(t,3),e=JP(e),t=mt(function(e){return i(n[e],e,n)},"predicate")),-1<(t=a(e,t,r))?n[i?e[t]:t]:void 0}}var oG,lG=r(()=>{eU(),VO(),eB(),mt(sG,"createFind"),oG=sG});function cG(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:jD(r))<0&&(r=hG(i+r,0)),rO(e,JW(t,3),r)):-1}var hG,uG,dG,pG,gG=r(()=>{iO(),eU(),WD(),hG=Math.max,mt(cG,"findIndex"),uG=cG}),fG=r(()=>{lG(),gG(),dG=oG(uG),pG=dG});function mG(e,i){var n=-1,a=GO(e)?Array(e.length):[];return pU(e,function(e,t,r){a[++n]=i(e,t,r)}),a}var yG,vG=r(()=>{TU(),VO(),mt(mG,"baseMap"),yG=mG});function bG(e,t){return(hD(e)?lD:yG)(e,JW(t,3))}var xG,TG=r(()=>{uD(),eU(),vG(),dD(),mt(bG,"map"),xG=bG});function kG(e,t){return null==e?e:nU(e,XU(t),hB)}var wG,CG=r(()=>{sU(),KU(),uB(),mt(kG,"forIn"),wG=kG});function SG(e,t){return e&&lU(e,XU(t))}var EG,_G=r(()=>{cU(),KU(),mt(SG,"forOwn"),EG=SG});function AG(e,t){return t{mt(AG,"baseGt"),RG=AG});function IG(e,t){return null!=e&&DG.call(e,t)}var NG,DG,MG,OG=r(()=>{NG=Object.prototype,DG=NG.hasOwnProperty,mt(IG,"baseHas"),MG=IG});function PG(e,t){return null!=e&&OW(e,t,MG)}var BG,$G=r(()=>{OG(),PW(),mt(PG,"has"),BG=PG});function FG(e){return"string"==typeof e||!hD(e)&&rD(e)&&"[object String]"==JN(e)}var zG,qG=r(()=>{eD(),dD(),iD(),mt(FG,"isString"),zG=FG});function jG(t,e){return lD(e,function(e){return t[e]})}var WG,UG=r(()=>{uD(),mt(jG,"baseValues"),WG=jG});function GG(e){return null==e?[]:WG(e,JP(e))}var VG,YG=r(()=>{UG(),eB(),mt(GG,"values"),VG=GG});function HG(e){if(null!=e){if(GO(e)&&(hD(e)||"string"==typeof e||"function"==typeof e.splice||vP(e)||NP(e)||uP(e)))return!e.length;var t,r=dq(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(tP(e))return!KP(e).length;for(t in e)if(KG.call(e,t))return!1}return!0}var XG,KG,ZG,QG=r(()=>{ZP(),yq(),pP(),dD(),VO(),xP(),rP(),OP(),XG=Object.prototype,KG=XG.hasOwnProperty,mt(HG,"isEmpty"),ZG=HG});function JG(e){return void 0===e}var eV,tV=r(()=>{mt(JG,"isUndefined"),eV=JG});function rV(e,t){return e{mt(rV,"baseLt"),iV=rV});function aV(e,i){var n={};return i=JW(i,3),lU(e,function(e,t,r){TO(n,t,i(e,t,r))}),n}var sV,oV=r(()=>{kO(),cU(),eU(),mt(aV,"mapValues"),sV=aV});function lV(e,t,r){for(var i=-1,n=e.length;++i{sD(),mt(lV,"baseExtremum"),cV=lV});function uV(e){return e&&e.length?cV(e,GD,RG):void 0}var dV,pV,gV,fV=r(()=>{hV(),LG(),VD(),mt(uV,"max"),dV=uV}),mV=r(()=>{qU(),QO(),pV=ZO(function(e,t,r){zU(e,t,r)}),gV=pV});function yV(e){return e&&e.length?cV(e,GD,iV):void 0}var vV,bV=r(()=>{hV(),nV(),VD(),mt(yV,"min"),vV=yV});function xV(e,t){return e&&e.length?cV(e,JW(t,2),iV):void 0}var TV,kV=r(()=>{hV(),eU(),nV(),mt(xV,"minBy"),TV=xV});function wV(e,t,r,i){if(AD(e))for(var n=-1,a=(t=eF(t,e)).length,s=a-1,o=e;null!=o&&++n{LO(),tF(),bO(),RD(),nF(),mt(wV,"baseSet"),CV=wV});function EV(e,t,r){for(var i=-1,n=t.length,a={};++i{oF(),SV(),tF(),mt(EV,"basePickBy"),_V=EV});function RV(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var LV,IV=r(()=>{mt(RV,"baseSortBy"),LV=RV});function NV(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=e==e,a=aD(e),s=void 0!==t,o=null===t,l=t==t,c=aD(t);if(!o&&!c&&!a&&t{sD(),mt(NV,"compareAscending"),DV=NV});function OV(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,s=n.length,o=r.length;++i{MV(),mt(OV,"compareMultiple"),PV=OV});function $V(e,i,r){i=i.length?lD(i,function(t){return hD(t)?function(e){return sF(e,1===t.length?t[0]:t)}:t}):[GD];var n=-1,e=(i=lD(i,EP(JW)),yG(e,function(t,e,r){return{criteria:lD(i,function(e){return e(t)}),index:++n,value:t}}));return LV(e,function(e,t){return PV(e,t,r)})}var FV,zV,qV,jV=r(()=>{uD(),oF(),eU(),vG(),IV(),DP(),BV(),VD(),dD(),mt($V,"baseOrderBy"),FV=$V}),WV=r(()=>{GW(),zV=UW("length"),qV=zV});function UV(e){for(var t=QV.lastIndex=0;QV.test(e);)++t;return t}var GV,VV,YV,HV,XV,KV,ZV,QV,JV,eY=r(()=>{GV="["+(HV="\\ud800-\\udfff")+"]",VV="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",YV="\\ud83c[\\udffb-\\udfff]",ZV="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",KV="[\\ufe0e\\ufe0f]?",XV="(?:\\u200d(?:"+[HV="[^"+HV+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+KV+ZV+")*",KV=KV+ZV+XV,ZV="(?:"+[HV+VV+"?",VV,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",GV].join("|")+")",QV=RegExp(YV+"(?="+YV+")|"+ZV+KV,"g"),mt(UV,"unicodeSize"),JV=UV});function tY(e){return(zF(e)?JV:qV)(e)}var rY,iY=r(()=>{WV(),qF(),eY(),mt(tY,"stringSize"),rY=tY});function nY(r,e){return _V(r,e,function(e,t){return $W(r,t)})}var aY,sY,oY,lY=r(()=>{AV(),FW(),mt(nY,"basePick"),aY=nY}),cY=r(()=>{lY(),AF(),sY=SF(function(e,t){return null==e?{}:aY(e,t)}),oY=sY});function hY(e,t,r,i){for(var n=-1,a=dY(uY((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}var uY,dY,pY,gY=r(()=>{uY=Math.ceil,dY=Math.max,mt(hY,"baseRange"),pY=hY});function fY(i){return function(e,t,r){return r&&"number"!=typeof r&&HO(e,t,r)&&(t=r=void 0),e=FD(e),void 0===t?(t=e,e=0):t=FD(t),r=void 0===r?e{gY(),XO(),zD(),mt(fY,"createRange"),mY=fY}),xY=r(()=>{bY(),yY=mY(),vY=yY});function TY(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}var kY,wY=r(()=>{mt(TY,"baseReduce"),kY=TY});function CY(e,t,r){var i=hD(e)?WF:kY,n=arguments.length<3;return i(e,JW(t,4),r,n,pU)}var SY,EY=r(()=>{UF(),TU(),eU(),wY(),dD(),mt(CY,"reduce"),SY=CY});function _Y(e){var t;return null==e?0:GO(e)?zG(e)?rY(e):e.length:"[object Map]"==(t=dq(e))||"[object Set]"==t?e.size:KP(e).length}var AY,RY,LY,IY,NY,DY=r(()=>{ZP(),yq(),VO(),qG(),iY(),mt(_Y,"size"),AY=_Y}),MY=r(()=>{xF(),jV(),zO(),XO(),RY=FO(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&HO(e,t[0],t[1])?t=[]:2{mq(),DM(),Hj(),IY=eq&&1/Yj(new eq([,-0]))[1]==1/0?function(e){return new eq(e)}:NM,NY=IY});function PY(e,t,r){var i=-1,n=gO,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=WU;else if(200<=a){var c=t?null:NY(e);if(c)return Yj(c);s=!1,n=$j,l=new Nj}else l=t?[]:o;e:for(;++i{Dj(),fO(),UU(),Fj(),OY(),Hj(),mt(PY,"baseUniq"),BY=PY}),qY=r(()=>{xF(),zO(),zY(),RU(),$Y=FO(function(e){return BY(bF(e,1,AU,!0))}),FY=$Y});function jY(e){var t=++WY;return Z$(e)+t}var WY,UY,GY=r(()=>{Q$(),WY=0,mt(jY,"uniqueId"),UY=jY});function VY(e,t,r){for(var i=-1,n=e.length,a=t.length,s={};++i{mt(VY,"baseZipObject"),YY=VY});function XY(e,t){return YY(e||[],t||[],RO)}var KY,ZY=r(()=>{LO(),HY(),mt(XY,"zipObject"),KY=XY}),QY=r(()=>{Tj(),Cj(),HM(),wU(),JU(),aG(),fG(),wF(),QU(),CG(),_G(),$G(),dD(),QG(),ZD(),tV(),eB(),YU(),TG(),oV(),fV(),mV(),bV(),kV(),kU(),cY(),xY(),EY(),DY(),MY(),qY(),GY(),YG(),ZY()});function JY(e,t){e[t]?e[t]++:e[t]=1}function eH(e,t){--e[t]||delete e[t]}function tH(e,t,r,i){return t=""+t,r=""+r,!e&&r{QY(),(nH=class{static{mt(this,"Graph")}constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=jM(void 0),this._defaultEdgeLabelFn=jM(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),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 HD(e)||(e=jM(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return JP(this._nodes)}sources(){var t=this;return nG(this.nodes(),function(e){return ZG(t._in[e])})}sinks(){var t=this;return nG(this.nodes(),function(e){return ZG(t._out[e])})}setNodes(e,t){var r=arguments,i=this;return y(e,function(e){1this.removeEdge(this._edgeObjs[e]),"removeEdge"),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],y(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),y(JP(this._in[e]),t),delete this._in[e],delete this._preds[e],y(JP(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount),this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(eV(t))t="\0";else{for(var r=t+="";!eV(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound&&"\0"!==(e=this._parent[e]))return e}children(e){var t;return eV(e)&&(e="\0"),this._isCompound?(t=this._children[e])?JP(t):void 0:"\0"===e?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return JP(e)}successors(e){if(e=this._sucs[e])return JP(e)}neighbors(e){var t=this.predecessors(e);if(t)return FY(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(r){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),n=(i.setGraph(this.graph()),this),a=(y(this._nodes,function(e,t){r(t)&&i.setNode(t,e)}),y(this._edgeObjs,function(e){i.hasNode(e.v)&&i.hasNode(e.w)&&i.setEdge(e,n.edge(e))}),{});function s(e){var t=n.parent(e);return void 0===t||i.hasNode(t)?a[e]=t:t in a?a[t]:s(t)}return mt(s,"findParent"),this._isCompound&&y(i.nodes(),function(e){i.setParent(e,s(e))}),i}setDefaultEdgeLabel(e){return HD(e)||(e=jM(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return VG(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return SY(e,function(e,t){return 1{aH()});function oH(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function lH(e,t){if("_next"!==e&&"_prev"!==e)return t}var cH,hH=r(()=>{cH=class{static{mt(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return oH(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&oH(e),e._next=t._next,t._next._prev=e,(t._next=e)._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,lH)),r=r._prev;return"["+e.join(", ")+"]"}},mt(oH,"unlink"),mt(lH,"filterOutLinks")});function uH(t,e){return t.nodeCount()<=1?[]:(e=dH((e=gH(t,e||mH)).graph,e.buckets,e.zeroIdx),kF(xG(e,function(e){return t.outEdges(e.v,e.w)})))}function dH(e,t,r){for(var i,n=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)pH(e,t,r,i);for(;i=a.dequeue();)pH(e,t,r,i);if(e.nodeCount())for(var o=t.length-2;0{QY(),sH(),hH(),mH=jM(1),mt(uH,"greedyFAS"),mt(dH,"doGreedyFAS"),mt(pH,"removeNode"),mt(gH,"buildState"),mt(fH,"assignBucket")});function vH(r){var e="greedy"===r.graph().acyclicer?uH(r,t(r)):bH(r);function t(t){return function(e){return t.edge(e).weight}}y(e,function(e){var t=r.edge(e);r.removeEdge(e),t.forwardName=e.name,t.reversed=!0,r.setEdge(e.w,e.v,t,UY("rev"))}),mt(t,"weightFn")}function bH(t){var r=[],i={},n={};function a(e){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,i[e]=!0,y(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(i,e.w)?r.push(e):a(e.w)}),delete i[e])}return mt(a,"dfs"),y(t.nodes(),a),r}function xH(i){y(i.edges(),function(e){var t,r=i.edge(e);r.reversed&&(i.removeEdge(e),t=r.forwardName,delete r.reversed,delete r.forwardName,i.setEdge(e.w,e.v,r,t))})}var TH=r(()=>{QY(),yH(),mt(vH,"run"),mt(bH,"dfsFAS"),mt(xH,"undo")});function kH(e,t,r,i){for(var n;n=UY(i),e.hasNode(n););return r.dummy=t,e.setNode(n,r),n}function wH(i){var n=(new nH).setGraph(i.graph());return y(i.nodes(),function(e){n.setNode(e,i.node(e))}),y(i.edges(),function(e){var t=n.edge(e.v,e.w)||{weight:0,minlen:1},r=i.edge(e);n.setEdge(e.v,e.w,{weight:t.weight+r.weight,minlen:Math.max(t.minlen,r.minlen)})}),n}function CH(t){var r=new nH({multigraph:t.isMultigraph()}).setGraph(t.graph());return y(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),y(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function SH(e,t){var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2;if(a||t)return e=Math.abs(t)*s>Math.abs(a)*e?(r=(e=t<0?-e:e)*a/t,e):(r=a<0?-s:s)*t/a,{x:i+r,y:n+e};throw new Error("Not possible to find intersection inside of the rectangle")}function EH(i){var n=xG(vY(LH(i)+1),function(){return[]});return y(i.nodes(),function(e){var t=i.node(e),r=t.rank;eV(r)||(n[r][t.order]=e)}),n}function _H(t){var r=vV(xG(t.nodes(),function(e){return t.node(e).rank}));y(t.nodes(),function(e){e=t.node(e),BG(e,"rank")&&(e.rank-=r)})}function AH(r){var i=vV(xG(r.nodes(),function(e){return r.node(e).rank})),n=[],a=(y(r.nodes(),function(e){var t=r.node(e).rank-i;n[t]||(n[t]=[]),n[t].push(e)}),0),s=r.graph().nodeRankFactor;y(n,function(e,t){eV(e)&&t%s!=0?--a:a&&y(e,function(e){r.node(e).rank+=a})})}function RH(e,t,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),kH(e,"border",n,t)}function LH(t){return dV(xG(t.nodes(),function(e){if(e=t.node(e).rank,!eV(e))return e}))}function IH(e,t){var r={lhs:[],rhs:[]};return y(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function NH(e,t){var r=fU();try{return t()}finally{console.log(e+" time: "+(fU()-r)+"ms")}}function DH(e,t){return t()}var MH=r(()=>{QY(),sH(),mt(kH,"addDummyNode"),mt(wH,"simplify"),mt(CH,"asNonCompoundGraph"),mt(SH,"intersectRect"),mt(EH,"buildLayerMatrix"),mt(_H,"normalizeRanks"),mt(AH,"removeEmptyRanks"),mt(RH,"addBorderNode"),mt(LH,"maxRank"),mt(IH,"partition"),mt(NH,"time"),mt(DH,"notime")});function OH(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&y(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,n=r.maxRank+1;i{QY(),MH(),mt(OH,"addBorderSegments"),mt(PH,"addBorderNode")});function $H(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||zH(e)}function FH(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||jH(e),"lr"!==t&&"rl"!==t||(UH(e),zH(e))}function zH(t){y(t.nodes(),function(e){qH(t.node(e))}),y(t.edges(),function(e){qH(t.edge(e))})}function qH(e){var t=e.width;e.width=e.height,e.height=t}function jH(t){y(t.nodes(),function(e){WH(t.node(e))}),y(t.edges(),function(e){e=t.edge(e),y(e.points,WH),Object.prototype.hasOwnProperty.call(e,"y")&&WH(e)})}function WH(e){e.y=-e.y}function UH(t){y(t.nodes(),function(e){GH(t.node(e))}),y(t.edges(),function(e){e=t.edge(e),y(e.points,GH),Object.prototype.hasOwnProperty.call(e,"x")&&GH(e)})}function GH(e){var t=e.x;e.x=e.y,e.y=t}var VH=r(()=>{QY(),mt($H,"adjust"),mt(FH,"undo"),mt(zH,"swapWidthHeight"),mt(qH,"swapWidthHeightOne"),mt(jH,"reverseY"),mt(WH,"reverseYOne"),mt(UH,"swapXY"),mt(GH,"swapXYOne")});function YH(t){t.graph().dummyChains=[],y(t.edges(),function(e){HH(t,e)})}function HH(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==i+1){e.removeEdge(t);var c,h=void 0,u=0;for(++i;i{QY(),MH(),mt(YH,"run"),mt(HH,"normalizeEdge"),mt(XH,"undo")});function ZH(r){var i={};function n(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(i,e)?t.rank:(i[e]=!0,(e=vV(xG(r.outEdges(e),function(e){return n(e.w)-r.edge(e).minlen})))!==Number.POSITIVE_INFINITY&&null!=e||(e=0),t.rank=e)}mt(n,"dfs"),y(r.sources(),n)}function QH(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var JH=r(()=>{QY(),mt(ZH,"longestPath"),mt(QH,"slack")});function eX(e){var t,r=new nH({directed:!1}),i=e.nodes()[0],n=e.nodeCount();for(r.setNode(i,{});tX(r,e){QY(),sH(),JH(),mt(eX,"feasibleTree"),mt(tX,"tightTree"),mt(rX,"findMinSlackEdge"),mt(iX,"shiftRanks")}),aX=r(()=>{}),sX=r(()=>{}),oX=r(()=>{QY(),sX(),jM(1)}),lX=r(()=>{oX()}),cX=r(()=>{}),hX=r(()=>{cX()}),uX=r(()=>{QY(),jM(1)});function dX(t){var r={},i={},n=[];function a(e){if(Object.prototype.hasOwnProperty.call(i,e))throw new pX;Object.prototype.hasOwnProperty.call(r,e)||(i[e]=!0,r[e]=!0,y(t.predecessors(e),a),delete i[e],n.push(e))}if(mt(a,"visit"),y(t.sinks(),a),AY(r)!==t.nodeCount())throw new pX;return n}function pX(){}var gX=r(()=>{QY(),dX.CycleException=pX,mt(dX,"topsort"),mt(pX,"CycleException"),pX.prototype=new Error}),fX=r(()=>{gX()});function mX(t,e,r){hD(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],a={};return y(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);yX(t,e,"post"===r,a,i,n)}),n}function yX(t,e,r,i,n,a){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r||a.push(e),y(n(e),function(e){yX(t,e,r,i,n,a)}),r&&a.push(e))}var vX=r(()=>{QY(),mt(mX,"dfs"),mt(yX,"doDfs")});function bX(e,t){return mX(e,t,"post")}var xX=r(()=>{vX(),mt(bX,"postorder")});function TX(e,t){return mX(e,t,"pre")}var kX=r(()=>{vX(),mt(TX,"preorder")}),wX=r(()=>{sX(),aH()}),CX=r(()=>{aX(),oX(),lX(),hX(),uX(),fX(),xX(),kX(),wX(),cX(),gX()});function SX(e){ZH(e=wH(e));var t,r=eX(e);for(RX(r),EX(r,e);t=IX(r);)DX(r,e,t,NX(r,e,t))}function EX(t,r){var e=(e=bX(t,t.nodes())).slice(0,e.length-1);y(e,function(e){_X(t,r,e)})}function _X(e,t,r){var i=e.node(r).parent;e.edge(r,i).cutvalue=AX(e,t,r)}function AX(i,n,a){var s=i.node(a).parent,o=!0,e=n.edge(a,s),l=0;return e||(o=!1,e=n.edge(s,a)),l=e.weight,y(n.nodeEdges(a),function(e){var t=e.v===a,r=t?e.w:e.v;r!==s&&(t=t===o,e=n.edge(e).weight,l+=t?e:-e,OX(i,a,r))&&(e=i.edge(a,r).cutvalue,l+=t?-e:e)}),l}function RX(e,t){arguments.length<2&&(t=e.nodes()[0]),LX(e,{},1,t)}function LX(t,r,i,n,e){var a=i,s=t.node(n);return r[n]=!0,y(t.neighbors(n),function(e){Object.prototype.hasOwnProperty.call(r,e)||(i=LX(t,r,i,e,n))}),s.low=a,s.lim=i++,e?s.parent=e:delete s.parent,i}function IX(t){return pG(t.edges(),function(e){return t.edge(e).cutvalue<0})}function NX(t,r,e){var i=e.v,n=e.w,e=(r.hasEdge(i,n)||(i=e.w,n=e.v),t.node(i)),i=t.node(n),a=e,s=!1,n=(e.lim>i.lim&&(a=i,s=!0),nG(r.edges(),function(e){return s===PX(0,t.node(e.v),a)&&s!==PX(0,t.node(e.w),a)}));return TV(n,function(e){return QH(r,e)})}function DX(e,t,r,i){var n=r.v;e.removeEdge(n,r.w),e.setEdge(i.v,i.w,{}),RX(e),EX(e,t),MX(e,t)}function MX(n,a){var e=pG(n.nodes(),function(e){return!a.node(e).parent}),e=(e=TX(n,e)).slice(1);y(e,function(e){var t=n.node(e).parent,r=a.edge(e,t),i=!1;r||(r=a.edge(t,e),i=!0),a.node(e).rank=a.node(t).rank+(i?r.minlen:-r.minlen)})}function OX(e,t,r){return e.hasEdge(t,r)}function PX(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var BX=r(()=>{QY(),CX(),MH(),nX(),JH(),SX.initLowLimValues=RX,SX.initCutValues=EX,SX.calcCutValue=AX,SX.leaveEdge=IX,SX.enterEdge=NX,SX.exchangeEdges=DX,mt(SX,"networkSimplex"),mt(EX,"initCutValues"),mt(_X,"assignCutValue"),mt(AX,"calcCutValue"),mt(RX,"initLowLimValues"),mt(LX,"dfsAssignLowLim"),mt(IX,"leaveEdge"),mt(NX,"enterEdge"),mt(DX,"exchangeEdges"),mt(MX,"updateRanks"),mt(OX,"isTreeEdge"),mt(PX,"isDescendant")});function $X(e){switch(e.graph().ranker){case"network-simplex":zX(e);break;case"tight-tree":FX(e);break;case"longest-path":qX(e);break;default:zX(e)}}function FX(e){ZH(e),eX(e)}function zX(e){SX(e)}var qX,jX=r(()=>{nX(),BX(),JH(),mt($X,"rank"),qX=ZH,mt(FX,"tightTreeRanker"),mt(zX,"networkSimplexRanker")});function WX(t){var r=kH(t,"root",{},"_root"),i=GX(t),n=dV(VG(i))-1,a=2*n+1,s=(t.graph().nestingRoot=r,y(t.edges(),function(e){t.edge(e).minlen*=a}),VX(t)+1);y(t.children(),function(e){UX(t,r,a,s,n,i,e)}),t.graph().nodeRankFactor=a}function UX(n,a,s,o,l,c,h){var u,d,e,t=n.children(h);t.length?(u=RH(n,"_bt"),d=RH(n,"_bb"),e=n.node(h),n.setParent(u,h),e.borderTop=u,n.setParent(d,h),e.borderBottom=d,y(t,function(e){UX(n,a,s,o,l,c,e);var t=n.node(e),r=t.borderTop||e,i=r!==(e=t.borderBottom||e)?1:l-c[h]+1;n.setEdge(u,r,{weight:t=t.borderTop?o:2*o,minlen:i,nestingEdge:!0}),n.setEdge(e,d,{weight:t,minlen:i,nestingEdge:!0})}),n.parent(h)||n.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&n.setEdge(a,h,{weight:0,minlen:s})}function GX(i){var n={};function a(e,t){var r=i.children(e);r&&r.length&&y(r,function(e){a(e,t+1)}),n[e]=t}return mt(a,"dfs"),y(i.children(),function(e){a(e,1)}),n}function VX(r){return SY(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function YX(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,y(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var HX=r(()=>{QY(),MH(),mt(WX,"run"),mt(UX,"dfs"),mt(GX,"treeDepths"),mt(VX,"sumWeights"),mt(YX,"cleanup")});function XX(n,a,e){var s,o={};y(e,function(e){for(var t,r,i=n.parent(e);i;){if((t=n.parent(i))?(r=o[t],o[t]=i):(r=s,s=i),r&&r!==i)return void a.setEdge(r,i);i=t}})}var KX=r(()=>{QY(),mt(XX,"addSubgraphConstraints")});function ZX(n,r,a){var s=QX(n),o=new nH({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return n.node(e)});return y(n.nodes(),function(i){var e=n.node(i),t=n.parent(i);(e.rank===r||e.minRank<=r&&r<=e.maxRank)&&(o.setNode(i),o.setParent(i,t||s),y(n[a](i),function(e){var t=e.v===i?e.w:e.v,r=o.edge(t,i),r=eV(r)?0:r.weight;o.setEdge(t,i,{weight:n.edge(e).weight+r})}),Object.prototype.hasOwnProperty.call(e,"minRank"))&&o.setNode(i,{borderLeft:e.borderLeft[r],borderRight:e.borderRight[r]})}),o}function QX(e){for(var t;e.hasNode(t=UY("_root")););return t}var JX=r(()=>{QY(),sH(),mt(ZX,"buildLayerGraph"),mt(QX,"createRootNode")});function eK(e,t){for(var r=0,i=1;i>1]+=e.weight;o+=e.weight*r})),o}var rK=r(()=>{QY(),mt(eK,"crossCount"),mt(tK,"twoLayerCrossCount")});function iK(r){var i={},e=nG(r.nodes(),function(e){return!r.children(e).length}),t=dV(xG(e,function(e){return r.node(e).rank})),n=xG(vY(t+1),function(){return[]});function a(e){var t;BG(i,e)||(i[e]=!0,t=r.node(e),n[t.rank].push(e),y(r.successors(e),a))}return mt(a,"dfs"),t=LY(e,function(e){return r.node(e).rank}),y(t,a),n}var nK=r(()=>{QY(),mt(iK,"initOrder")});function aK(i,e){return xG(e,function(e){var t=i.inEdges(e);return t.length?{v:e,barycenter:(t=SY(t,function(e,t){var r=i.edge(t),t=i.node(t.v);return{sum:e.sum+r.weight*t.order,weight:e.weight+r.weight}},{sum:0,weight:0})).sum/t.weight,weight:t.weight}:{v:e}})}var sK=r(()=>{QY(),mt(aK,"barycenter")});function oK(e,t){var i={};return y(e,function(e,t){t=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},eV(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),y(t.edges(),function(e){var t=i[e.v],r=i[e.w];eV(t)||eV(r)||(r.indegree++,t.out.push(i[e.w]))}),lK(nG(i,function(e){return!e.indegree}))}function lK(r){var e=[];function t(t){return function(e){e.merged||(eV(e.barycenter)||eV(t.barycenter)||e.barycenter>=t.barycenter)&&cK(t,e)}}function i(t){return function(e){e.in.push(t),0==--e.indegree&&r.push(e)}}for(mt(t,"handleIn"),mt(i,"handleOut");r.length;){var n=r.pop();e.push(n),y(n.in.reverse(),t(n)),y(n.out,i(n))}return xG(nG(e,function(e){return!e.merged}),function(e){return oY(e,["vs","i","barycenter","weight"])})}function cK(e,t){var r=0,i=0;e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var hK=r(()=>{QY(),mt(oK,"resolveConflicts"),mt(lK,"doResolveConflicts"),mt(cK,"mergeEntries")});function uK(e,t){var r=(e=IH(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,i=LY(e.rhs,function(e){return-e.i}),n=[],a=0,s=0,o=0,e=(r.sort(pK(!!t)),o=dK(n,i,o),y(r,function(e){o+=e.vs.length,n.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=dK(n,i,o)}),{vs:kF(n)});return s&&(e.barycenter=a/s,e.weight=s),e}function dK(e,t,r){for(var i;t.length&&(i=VU(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function pK(r){return function(e,t){return e.barycentert.barycenter?1:r?t.i-e.i:e.i-t.i}}var gK=r(()=>{QY(),MH(),mt(uK,"sort"),mt(dK,"consumeUnsortable"),mt(pK,"compareWithBias")});function fK(r,e,i,n){var t,a=r.children(e),s=(e=r.node(e))?e.borderLeft:void 0,o=e?e.borderRight:void 0,l={},e=(s&&(a=nG(a,function(e){return e!==s&&e!==o})),aK(r,a));return y(e,function(e){var t;r.children(e.v).length&&(t=fK(r,e.v,i,n),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&yK(e,t)}),mK(a=oK(e,i),l),e=uK(a,n),s&&(e.vs=kF([s,e.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),t=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(e,"barycenter")||(e.barycenter=0,e.weight=0),e.barycenter=(e.barycenter*e.weight+a.order+t.order)/(e.weight+2),e.weight+=2),e}function mK(e,t){y(e,function(e){e.vs=kF(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function yK(e,t){eV(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var vK=r(()=>{QY(),sK(),hK(),gK(),mt(fK,"sortSubgraph"),mt(mK,"expandSubgraphs"),mt(yK,"mergeBarycenters")});function bK(e){var t=LH(e),r=xK(e,vY(1,t+1),"inEdges"),i=xK(e,vY(t-1,-1,-1),"outEdges");kK(e,iK(e));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){TK(s%2?r:i,2<=s%4);var l,c=eK(e,l=EH(e));c{QY(),sH(),MH(),KX(),JX(),rK(),nK(),vK(),mt(bK,"order"),mt(xK,"buildLayerGraphs"),mt(TK,"sweepLayerGraphs"),mt(kK,"assignOrder")});function CK(c){var h=EK(c);y(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,i=SK(c,h,r.v,r.w),n=i.path,a=i.lca,s=0,o=n[s],l=!0;e!==r.w;){if(t=c.node(e),l){for(;(o=n[s])!==a&&c.node(o).maxRanko||l>t[c].lim););for(n=c,c=i;(c=e.parent(c))!==n;)s.push(c);return{path:a.concat(s.reverse()),lca:n}}function EK(r){var i={},n=0;function a(e){var t=n;y(r.children(e),a),i[e]={low:t,lim:n++}}return mt(a,"dfs"),y(r.children(),a),i}var _K=r(()=>{QY(),mt(CK,"parentDummyChains"),mt(SK,"findPath"),mt(EK,"postorder")});function AK(c,e){var h={};function t(e,i){var a=0,s=0,o=e.length,l=VU(i);return y(i,function(e,t){var r=LK(c,e),n=r?c.node(r).order:o;!r&&e!==l||(y(i.slice(s,t+1),function(i){y(c.predecessors(i),function(e){var t=c.node(e),r=t.order;!(rn)&&IK(s,e,a)})})}function t(r,i){var n,a=-1,s=0;return y(i,function(e,t){"border"===o.node(e).dummy&&(e=o.predecessors(e)).length&&(n=o.node(e[0]).order,l(i,s,t,a,n),s=t,a=n),l(i,s,i.length,n,r.length)}),i}return mt(l,"scan"),mt(t,"visitLayer"),SY(e,t),s}function LK(t,e){if(t.node(e).dummy)return pG(t.predecessors(e),function(e){return t.node(e).dummy})}function IK(e,t,r){r{QY(),sH(),MH(),mt(AK,"findType1Conflicts"),mt(RK,"findType2Conflicts"),mt(LK,"findOtherInnerSegmentNode"),mt(IK,"addConflict"),mt(NK,"hasConflict"),mt(DK,"verticalAlignment"),mt(MK,"horizontalCompaction"),mt(OK,"buildBlockGraph"),mt(PK,"findSmallestWidthAlignment"),mt(BK,"alignCoordinates"),mt($K,"balance"),mt(FK,"positionX"),mt(zK,"sep"),mt(qK,"width")});function WK(r){UK(r=CH(r)),EG(FK(r),function(e,t){r.node(t).x=e})}function UK(r){var e=EH(r),i=r.graph().ranksep,n=0;y(e,function(e){var t=dV(xG(e,function(e){return r.node(e).height}));y(e,function(e){r.node(e).y=n+t/2}),n+=t+i})}var GK=r(()=>{QY(),MH(),jK(),mt(WK,"position"),mt(UK,"positionY")});function VK(t,e){var r=e&&e.debugTiming?NH:DH;r("layout",()=>{var e=r(" buildLayoutGraph",()=>XK(t));r(" runLayout",()=>YK(e,r)),r(" updateInputGraph",()=>HK(t,e))})}function YK(e,t){t(" makeSpaceForEdgeLabels",()=>KK(e)),t(" removeSelfEdges",()=>aZ(e)),t(" acyclic",()=>vH(e)),t(" nestingGraph.run",()=>WX(e)),t(" rank",()=>$X(CH(e))),t(" injectEdgeLabelProxies",()=>ZK(e)),t(" removeEmptyRanks",()=>AH(e)),t(" nestingGraph.cleanup",()=>YX(e)),t(" normalizeRanks",()=>_H(e)),t(" assignRankMinMax",()=>QK(e)),t(" removeEdgeLabelProxies",()=>JK(e)),t(" normalize.run",()=>YH(e)),t(" parentDummyChains",()=>CK(e)),t(" addBorderSegments",()=>OH(e)),t(" order",()=>bK(e)),t(" insertSelfEdges",()=>sZ(e)),t(" adjustCoordinateSystem",()=>$H(e)),t(" position",()=>WK(e)),t(" positionSelfEdges",()=>oZ(e)),t(" removeBorderNodes",()=>nZ(e)),t(" normalize.undo",()=>XH(e)),t(" fixupEdgeLabelCoords",()=>rZ(e)),t(" undoCoordinateSystem",()=>FH(e)),t(" translateGraph",()=>eZ(e)),t(" assignNodeIntersects",()=>tZ(e)),t(" reversePoints",()=>iZ(e)),t(" acyclic.undo",()=>xH(e))}function HK(i,n){y(i.nodes(),function(e){var t=i.node(e),r=n.node(e);t&&(t.x=r.x,t.y=r.y,n.children(e).length)&&(t.width=r.width,t.height=r.height)}),y(i.edges(),function(e){var t=i.edge(e),e=n.edge(e);t.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(t.x=e.x,t.y=e.y)}),i.graph().width=n.graph().width,i.graph().height=n.graph().height}function XK(r){var i=new nH({multigraph:!0,compound:!0}),e=cZ(r.graph());return i.setGraph(gV({},uZ,lZ(e,hZ),oY(e,dZ))),y(r.nodes(),function(e){var t=cZ(r.node(e));i.setNode(e,bU(lZ(t,pZ),gZ)),i.setParent(e,r.parent(e))}),y(r.edges(),function(e){var t=cZ(r.edge(e));i.setEdge(e,gV({},mZ,lZ(t,fZ),oY(t,yZ)))}),i}function KK(t){var r=t.graph();r.ranksep/=2,y(t.edges(),function(e){(e=t.edge(e)).minlen*=2,"c"!==e.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?e.width+=e.labeloffset:e.height+=e.labeloffset)})}function ZK(r){y(r.edges(),function(e){var t=r.edge(e);t.width&&t.height&&(t=r.node(e.v),t={rank:(r.node(e.w).rank-t.rank)/2+t.rank,e:e},kH(r,"edge-proxy",t,"_ep"))})}function QK(t){var r=0;y(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=dV(r,e.maxRank))}),t.graph().maxRank=r}function JK(r){y(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function eZ(t){var n=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,e=t.graph(),r=e.marginx||0,i=e.marginy||0;function l(e){var t=e.x,r=e.y,i=e.width,e=e.height;n=Math.min(n,t-i/2),a=Math.max(a,t+i/2),s=Math.min(s,r-e/2),o=Math.max(o,r+e/2)}mt(l,"getExtremes"),y(t.nodes(),function(e){l(t.node(e))}),y(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),n-=r,s-=i,y(t.nodes(),function(e){(e=t.node(e)).x-=n,e.y-=s}),y(t.edges(),function(e){e=t.edge(e),y(e.points,function(e){e.x-=n,e.y-=s}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=n),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=s)}),e.width=a-n+r,e.height=o-s+i}function tZ(a){y(a.edges(),function(e){var t,r=a.edge(e),i=a.node(e.v),e=a.node(e.w),n=r.points?(t=r.points[0],r.points[r.points.length-1]):(r.points=[],t=e,i);r.points.unshift(SH(i,t)),r.points.push(SH(e,n))})}function rZ(r){y(r.edges(),function(e){var t=r.edge(e);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}})}function iZ(t){y(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function nZ(a){y(a.nodes(),function(e){var t,r,i,n;a.children(e).length&&(e=a.node(e),t=a.node(e.borderTop),r=a.node(e.borderBottom),i=a.node(VU(e.borderLeft)),n=a.node(VU(e.borderRight)),e.width=Math.abs(n.x-i.x),e.height=Math.abs(r.y-t.y),e.x=i.x+e.width/2,e.y=t.y+e.height/2)}),y(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function aZ(r){y(r.edges(),function(e){var t;e.v===e.w&&((t=r.node(e.v)).selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:e,label:r.edge(e)}),r.removeEdge(e))})}function sZ(n){var e=EH(n);y(e,function(e){var i=0;y(e,function(e,t){var r=n.node(e);r.order=t+i,y(r.selfEdges,function(e){kH(n,"selfedge",{width:e.label.width,height:e.label.height,rank:r.rank,order:t+ ++i,e:e.e,label:e.label},"_se")}),delete r.selfEdges})})}function oZ(s){y(s.nodes(),function(e){var t,r,i,n,a=s.node(e);"selfedge"===a.dummy&&(t=(n=s.node(a.e.v)).x+n.width/2,r=n.y,i=a.x-t,n=n.height/2,s.setEdge(a.e,a.label),s.removeNode(e),a.label.points=[{x:t+2*i/3,y:r-n},{x:t+5*i/6,y:r-n},{x:t+i,y:r},{x:t+5*i/6,y:r+n},{x:t+2*i/3,y:r+n}],a.label.x=a.x,a.label.y=a.y)})}function lZ(e,t){return sV(oY(e,t),Number)}function cZ(e){var r={};return y(e,function(e,t){r[t.toLowerCase()]=e}),r}var hZ,uZ,dZ,pZ,gZ,fZ,mZ,yZ,vZ=r(()=>{QY(),sH(),BH(),VH(),TH(),KH(),jX(),HX(),wK(),_K(),GK(),MH(),mt(VK,"layout"),mt(YK,"runLayout"),mt(HK,"updateInputGraph"),hZ=["nodesep","edgesep","ranksep","marginx","marginy"],uZ={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},dZ=["acyclicer","ranker","rankdir","align"],pZ=["width","height"],gZ={width:0,height:0},fZ=["minlen","weight","width","height","labeloffset"],mZ={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},yZ=["labelpos"],mt(XK,"buildLayoutGraph"),mt(KK,"makeSpaceForEdgeLabels"),mt(ZK,"injectEdgeLabelProxies"),mt(QK,"assignRankMinMax"),mt(JK,"removeEdgeLabelProxies"),mt(eZ,"translateGraph"),mt(tZ,"assignNodeIntersects"),mt(rZ,"fixupEdgeLabelCoords"),mt(iZ,"reversePointsForReversedEdges"),mt(nZ,"removeBorderNodes"),mt(aZ,"removeSelfEdges"),mt(sZ,"insertSelfEdges"),mt(oZ,"positionSelfEdges"),mt(lZ,"selectNumberAttrs"),mt(cZ,"canonicalize")}),bZ=r(()=>{TH(),vZ(),KH(),jX()});function xZ(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:TZ(e),edges:kZ(e)};return eV(e.graph())||(t.value=xj(e.graph())),t}function TZ(i){return xG(i.nodes(),function(e){var t=i.node(e),r=i.parent(e),e={v:e};return eV(t)||(e.value=t),eV(r)||(e.parent=r),e})}function kZ(i){return xG(i.edges(),function(e){var t=i.edge(e),r={v:e.v,w:e.w};return eV(e.name)||(r.name=e.name),eV(t)||(r.value=t),r})}var wZ,CZ,SZ,EZ,_Z,AZ,RZ,LZ,IZ,NZ,DZ,MZ,OZ,PZ,BZ,$Z=r(()=>{QY(),aH(),mt(xZ,"write"),mt(TZ,"writeNodes"),mt(kZ,"writeEdges")}),FZ=r(()=>{e(),sH(),$Z(),wZ=new Map,CZ=new Map,SZ=new Map,EZ=mt(()=>{CZ.clear(),SZ.clear(),wZ.clear()},"clear"),_Z=mt((e,t)=>{var r=CZ.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),AZ=mt((e,t)=>{var r=CZ.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||_Z(e.v,t)||_Z(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),RZ=mt((r,i,n,a)=>{P.warn("Copying children of ",r,"root",a,"data",i.node(r),a);var e=i.children(r)||[];r!==a&&e.push(r),P.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0{P.info("Edge",e);var t=i.edge(e.v,e.w,e.name);P.info("Edge data",t,a);try{AZ(e,a)?(P.info("Copying as ",e.v,e.w,t,e.name),n.setEdge(e.v,e.w,t,e.name),P.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):P.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){P.error(e)}})),P.debug("Removing node",e),i.removeNode(e)})},"copy"),LZ=mt((e,t)=>{let r=t.children(e),i=[...r];for(var n of r)SZ.set(n,e),i=[...i,...LZ(n,t)];return i},"extractDescendants"),IZ=mt((e,t,r)=>{let i=e.edges().filter(e=>e.v===t||e.w===t),n=e.edges().filter(e=>e.v===r||e.w===r),a=i.map(e=>({v:e.v===t?r:e.v,w:e.w===t?t:e.w})),s=n.map(e=>({v:e.v,w:e.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),NZ=mt((e,t,r)=>{var i,n=t.children(e);if(P.trace("Searching children of id ",e,n),n.length<1)return e;let a;for(i of n){var s=NZ(i,t,r),o=IZ(t,r,s);if(s){if(!(0wZ.has(e)&&wZ.get(e).externalConnections&&wZ.has(e)?wZ.get(e).id:e,"getAnchorId"),MZ=mt((a,e)=>{if(!a||10{_Z(e.v,t)^_Z(e.w,t)&&(P.warn("Edge: ",e," leaves cluster ",t),P.warn("Descendants of XXX ",t,": ",CZ.get(t)),wZ.get(t).externalConnections=!0)})):P.debug("Not a cluster ",t,CZ)});for(var t of wZ.keys()){var r=wZ.get(t).id;(r=a.parent(r))!==t&&wZ.has(r)&&!wZ.get(r).externalConnections&&(wZ.get(t).id=r)}a.edges().forEach(function(e){var t,r,i,n=a.edge(e);P.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),P.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,P.warn("Fix XXX",wZ,"ids:",e.v,e.w,"Translating: ",wZ.get(e.v)," --- ",wZ.get(e.w)),(wZ.get(e.v)||wZ.get(e.w))&&(P.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=DZ(e.v),r=DZ(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(i=a.parent(t),wZ.get(i).externalConnections=!0,n.fromCluster=e.v),r!==e.w&&(i=a.parent(r),wZ.get(i).externalConnections=!0,n.toCluster=e.w),P.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,n,e.name))}),P.warn("Adjusted Graph",xZ(a)),OZ(a,0),P.trace(wZ)}},"adjustClustersAndEdges"),OZ=mt((r,i)=>{if(P.warn("extractor - ",i,xZ(r),r.children("D")),10{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=PZ(t,e),r=[...r,...e]}),r},"sorter"),BZ=mt(e=>PZ(e,e.children()),"sortNodesByHierarchy")}),zZ={};Vat(zZ,{render:()=>jZ});var qZ,jZ,WZ=r(()=>{bZ(),$Z(),sH(),TN(),K7(),FZ(),MN(),yI(),xN(),e(),mI(),Uu(),qZ=mt(async(e,n,a,s,o,l)=>{P.warn("Graph in recursive render:XAX",xZ(n),o);let c=n.graph().rankdir,i=(P.trace("Dir in recursive render - dir:",c),e=e.insert("g").attr("class","root"),n.nodes()?P.info("Recursive render XXX",n.nodes()):P.info("No nodes found for",n),0{var e=n.edges().map(async function(e){var t=n.edge(e.v,e.w,e.name);P.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),P.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),P.info("Fix",wZ,"ids:",e.v,e.w,"Translating: ",wZ.get(e.v),wZ.get(e.w)),await zI(r,t)});await Promise.all(e)},"processEdges")(),P.info("Graph before layout:",JSON.stringify(xZ(n))),P.info("############################################# XXX"),P.info("### Layout ### XXX"),P.info("############################################# XXX"),VK(n),P.info("Graph after layout:",JSON.stringify(xZ(n))),0),p=rI(l).subGraphTitleTotalMargin;return await Promise.all(BZ(n).map(async function(e){var t,r=n.node(e);P.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,P.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,n.parent(e)),wZ.get(r.id).node=r,EN(r)):0 "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),n.node(e.v)),e=n.node(e.w),r=HI(h,t,wZ,a,r,e,s);qI(t,r)}),n.nodes().forEach(function(e){var t=n.node(e);P.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),P.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),jZ=mt(async(e,t)=>{let l=new nH({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=t.select("g");bN(r,e.markers,e.type,e.diagramId),SN(),$I(),uI(),EZ(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),P.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,i,n,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",i=t+"---"+t+"---2",n=l.node(t),l.setNode(r,{domId:r,id:r,parentId:n.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,n.parentId),l.setNode(i,{domId:i,id:i,parentId:n.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(i,n.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.endLabelLeft="",a.endLabelRight="",a.startLabelLeft="",a.id=t+"-cyclic-special-1",s.startLabelRight="",s.startLabelLeft="",s.endLabelLeft="",s.endLabelRight="",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",o.startLabelRight="",o.startLabelLeft="",o.arrowTypeStart="none",n.isGroup&&(a.fromCluster=t,o.toCluster=t),o.id=t+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(t,r,a,t+"-cyclic-special-0"),l.setEdge(r,i,s,t+"-cyclic-special-1"),l.setEdge(i,t,o,t+"-cyce.length)&&(t=e.length);for(var r=0,i=Array(t);r=e.length?{done:!0}:{done:!1,value:e[a++]}},"n"),e:mt(function(e){throw e},"e"),f:t};throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZZ(e,t,r){return(t=aQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QZ(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function JZ(e,t){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw n}}return o}}function eQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rQ(e,t){return GZ(e)||JZ(e,t)||oQ(e,t)||eQ()}function iQ(e){return VZ(e)||QZ(e)||oQ(e)||tQ()}function nQ(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!=typeof(r=r.call(e,t)))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function aQ(e){return"symbol"==typeof(e=nQ(e,"string"))?e:e+""}function sQ(e){return(sQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oQ(e,t){var r;if(e)return"string"==typeof e?UZ(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?UZ(e,t):void 0}function lQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cQ(){return ore||(ore=1,mt(e,"isObject"),sre=e),sre;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function hQ(){var e;return cre||(cre=1,e="object"==typeof are&&are&&are.Object===Object&&are,lre=e),lre}function uQ(){var e,t;return ure||(ure=1,t=hQ(),e="object"==typeof self&&self&&self.Object===Object&&self,t=t||e||Function("return this")(),hre=t),hre}function dQ(){var e,t;return pre||(pre=1,e=uQ(),t=mt(function(){return e.Date.now()},"now"),dre=t),dre}function pQ(){var r;return fre||(fre=1,r=/\s/,mt(e,"trimmedEndIndex"),gre=e),gre;function e(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}function gQ(){var t,r;return yre||(yre=1,t=pQ(),r=/^\s+/,mt(e,"baseTrim"),mre=e),mre;function e(e){return e&&e.slice(0,t(e)+1).replace(r,"")}}function fQ(){var e;return bre||(bre=1,e=uQ().Symbol,vre=e),vre}function mQ(){var e,t,a,s,o;return Tre||(Tre=1,e=fQ(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0,mt(r,"getRawTag"),xre=r),xre;function r(e){var t=a.call(e,o),r=e[o];try{var i=!(e[o]=void 0)}catch{}var n=s.call(e);return i&&(t?e[o]=r:delete e[o]),n}}function yQ(){var t;return wre||(wre=1,t=Object.prototype.toString,mt(e,"objectToString"),kre=e),kre;function e(e){return t.call(e)}}function vQ(){var e,t,r,i;return Sre||(Sre=1,e=fQ(),t=mQ(),r=yQ(),i=e?e.toStringTag:void 0,mt(n,"baseGetTag"),Cre=n),Cre;function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(i&&i in Object(e)?t:r)(e)}}function bQ(){return _re||(_re=1,mt(e,"isObjectLike"),Ere=e),Ere;function e(e){return null!=e&&"object"==typeof e}}function xQ(){var t,r;return Rre||(Rre=1,t=vQ(),r=bQ(),mt(e,"isSymbol"),Are=e),Are;function e(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==t(e)}}function TQ(){var r,i,n,a,s,o,l;return Ire||(Ire=1,r=gQ(),i=cQ(),n=xQ(),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,mt(e,"toNumber"),Lre=e),Lre;function e(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=i(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=r(e);var t=s.test(e);return t||o.test(e)?l(e.slice(2),t?2:8):a.test(e)?NaN:+e}}function kQ(){var k,w,C,S,E;return Dre||(Dre=1,k=cQ(),w=dQ(),C=TQ(),S=Math.max,E=Math.min,mt(e,"debounce"),Nre=e),Nre;function e(i,r,e){var n,a,s,o,l,c,h=0,t=!1,u=!1,d=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function p(e){var t=n,r=a;return n=a=void 0,h=e,o=i.apply(r,t)}function g(e){return h=e,l=setTimeout(y,r),t?p(e):o}function f(e){var t=r-(e-c);return u?E(t,s-(e-h)):t}function m(e){var t=e-c;return void 0===c||r<=t||t<0||u&&s<=e-h}function y(){var e=w();if(m(e))return v(e);l=setTimeout(y,f(e))}function v(e){return l=void 0,d&&n?p(e):(n=a=void 0,o)}function b(){void 0!==l&&clearTimeout(l),n=c=a=l=void(h=0)}function x(){return void 0===l?o:v(w())}function T(){var e=w(),t=m(e);if(n=arguments,a=this,c=e,t){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),o}return r=C(r)||0,k(e)&&(t=!!e.leading,u="maxWait"in e,s=u?S(C(e.maxWait)||0,r):s,d="trailing"in e?!!e.trailing:d),mt(p,"invokeFunc"),mt(g,"leadingEdge"),mt(f,"remainingWait"),mt(m,"shouldInvoke"),mt(y,"timerExpired"),mt(v,"trailingEdge"),mt(b,"cancel"),mt(x,"flush"),mt(T,"debounced"),T.cancel=b,T.flush=x,T}}function wQ(e,t,r,i,n){return n=n*Math.PI/180,{x:Math.cos(n)*(e-r)-Math.sin(n)*(t-i)+r,y:Math.sin(n)*(e-r)+Math.cos(n)*(t-i)+i}}function CQ(e,t,r){var i,n,a;return 0===r?e:(i=(t.x1+t.x2)/2,a=1/(n=t.w/t.h),t=wQ(e.x,e.y,i,e=(t.y1+t.y2)/2,r),{x:(r=Kre(t.x,t.y,i,e,n,a)).x,y:r.y})}function SQ(){return Cie||(Cie=1,s=kie,function(){var d,l,p,g,t,c,r,f,m,e,i,n,h,u;function a(e){this.cmp=e??d,this.nodes=[]}l=Math.floor,m=Math.min,d=mt(function(e,t){return e>1])<0;)e[r]=a,r=s;return e[r]=n},"_siftdown"),u=mt(function(e,t,r){var i,n,a,s,o;for(null==r&&(r=d),n=e.length,a=e[o=t],i=2*t+1;i{try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Roe=e),Roe}function TJ(){var i;return Noe||(Noe=1,i=xJ(),mt(e,"baseAssignValue"),Ioe=e),Ioe;function e(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}function kJ(){var n,a,s;return Moe||(Moe=1,n=TJ(),a=HQ(),s=Object.prototype.hasOwnProperty,mt(e,"assignValue"),Doe=e),Doe;function e(e,t,r){var i=e[t];s.call(e,t)&&a(i,r)&&(void 0!==r||t in e)||n(e,t,r)}}function wJ(){var i;return Poe||(Poe=1,i=/^(?:0|[1-9]\d*)$/,mt(e,"isIndex"),Ooe=e),Ooe;function e(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&i.test(e))&&-1>0&255)/255,t[1]=(e>>8&255)/255,t[2]=(e>>16&255)/255,t[3]=(e>>24&255)/255,t}function Iee(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function Nee(t,e){var r=t.createTexture();return r.buffer=function(e){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function Dee(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function Mee(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function Oee(e,t,r,i,n,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*i,n);case e.INT:return new Int32Array(r.buffer,a*i,n)}}function Pee(e,t,r,i){var n=(t=rQ(Dee(e,t),2))[0],i=Mee(e,t=t[1],i),a=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW),t===e.FLOAT?e.vertexAttribPointer(r,n,t,!1,0,0):t===e.INT&&e.vertexAttribIPointer(r,n,t,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),a}function Bee(t,e,r,i){var n=(r=rQ(Dee(t,r),3))[0],a=r[1],r=r[2],s=Mee(t,a,e*n),o=n*r,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*o,t.DYNAMIC_DRAW),t.enableVertexAttribArray(i),a===t.FLOAT?t.vertexAttribPointer(i,n,a,!1,o,0):a===t.INT&&t.vertexAttribIPointer(i,n,a,o,0),t.vertexAttribDivisor(i,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;h{function i(e){if(YZ(this,i),this._obj=Object.create(null),this.size=0,null!=e)for(var t=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e,r=0;r{if(mte){if(mte.requestAnimationFrame)return function(e){mte.requestAnimationFrame(e)};if(mte.mozRequestAnimationFrame)return function(e){mte.mozRequestAnimationFrame(e)};if(mte.webkitRequestAnimationFrame)return function(e){mte.webkitRequestAnimationFrame(e)};if(mte.msRequestAnimationFrame)return function(e){mte.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Pre())},1e3/60)}})(),$re=mt(function(e){return Bre(e)},"requestAnimationFrame"),Fre=Pre,zre=mt(function(e){for(var t,r=1y&&(u[v]=y,g[v]=T,f[v]=b),r||(v=T*o+x,!r&&u[v]>y&&(u[v]=y,g[v]=x,f[v]=b)))}for(var k=0;k=e.x1&&e.y2>=e.y1?{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1}:null!=e.w&&null!=e.h&&0<=e.w&&0<=e.h?{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}:void 0:void 0},"makeBoundingBox"),tne=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),rne=mt(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),ine=mt(function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},"updateBoundingBox"),nne=mt(function(e,t,r){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r),e.y2=Math.max(e.y2,r),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),ane=mt(function(e){var t=1t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),cne=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),hne=mt(function(e,t){return cne(e,t.x,t.y)},"pointInBoundingBox"),une=mt(function(e,t){return cne(e,t.x1,t.y1)&&cne(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),dne=null!=(Zhe=Math.hypot)?Zhe:function(e,t){return Math.sqrt(e*e+t*t)},mt(_Q,"inflatePolygon"),mt(AQ,"miterBox"),pne=mt(function(e,t,r,i,n,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=_ne(e,t,r,i,h=r+n-l,u=i+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=_ne(e,t,r,i,o=r-n+l,h=i+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),gne=mt(function(e,t,r,i,n,a,s){var o=Math.min(r,n),r=Math.max(r,n),n=Math.min(i,a),i=Math.max(i,a);return o-s<=e&&e<=r+s&&n-s<=t&&t<=i+s},"inLineVicinity"),fne=mt(function(e,t,r,i,n,a,s,o,l){var c=Math.min(r,s,n)-l,r=Math.max(r,s,n)+l,s=Math.min(i,o,a)-l,n=Math.max(i,o,a)+l;return!(eo&&(o=t[s][c],l=c);n[l].push(e[s])}for(var h=0;h=n.threshold||"dendrogram"===n.mode&&1===e.length)return!1;var p=t[s],g=t[i[s]],f="dendrogram"===n.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};e[p.index]=f,e.splice(g.index,1),t[p.key]=f;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=t[n*e+(a=l)])}0=t.minIterations-1||v==t.maxIterations-1)){for(var W=0,N=0;N{var e=o[t];null!=e&&null!=e.then?e.then(function(e){s(t,e)},function(e){i(e)}):s(t,e)})(e)})},jae.resolve=function(r){return new jae(function(e,t){e(r)})},jae.reject=function(r){return new jae(function(e,t){t(r)})},Hae=typeof Promise<"u"?Promise:jae,Xae=mt(function(e,t,r){var i=Dte(e),n=!i;(t=this._private=Kte({duration:1e3},t,r)).target=e,t.style=t.style||t.css,t.started=!1,t.playing=!1,t.hooked=!1,t.applying=!1,t.progress=0,t.completes=[],t.frames=[],t.complete&&Cte(t.complete)&&t.completes.push(t.complete),n&&(r=e.position(),t.startPosition=t.startPosition||{x:r.x,y:r.y},t.startStyle=t.startStyle||e.cy().style().getAnimationStartStyle(e,t.style)),i&&(n=e.pan(),t.startPan={x:n.x,y:n.y},t.startZoom=e.zoom()),this.length=1,this[0]=this},"Animation"),Bhe=Xae.prototype,Kte(Bhe,{instanceString:mt(function(){return"animation"},"instanceString"),hook:mt(function(){var e,t=this._private;return t.hooked||(e=t.target._private.animation,(t.queue?e.queue:e.current).push(this),Lte(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0),this},"hook"),play:mt(function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:mt(function(){return this._private.playing},"playing"),apply:mt(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:mt(function(){return this._private.applying},"applying"),pause:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:mt(function(){return this.progress(0)},"rewind"),fastforward:mt(function(){return this.progress(1)},"fastforward"),time:mt(function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},"time"),progress:mt(function(e){var t=this._private,r=t.playing;return void 0===e?t.progress:(r&&this.pause(),t.progress=e,t.started=!1,r&&this.play(),this)},"progress"),completed:mt(function(){return 1===this._private.progress},"completed"),reverse:mt(function(){var i=this._private,e=i.playing,t=(e&&this.pause(),i.progress=1-i.progress,i.started=!1,mt(function(e,t){var r=i[e];null!=r&&(i[e]=i[t],i[t]=r)},"swap"));if(t("zoom","startZoom"),t("pan","startPan"),t("position","startPosition"),i.style)for(var r=0;r\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Yte,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+Hoe.metaChar+"))+",Hoe.className="(?:[\\w-]|(?:\\\\"+Hoe.metaChar+"))+",Hoe.value=Hoe.string+"|"+Hoe.number,Hoe.id=Hoe.variable;for(var t,r=Hoe.comparatorOp.split("|"),n=0;n{for(var e,t={},r=0;r")+h(e.child,t);case Koe.ANCESTOR:case Koe.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case Koe.COMPOUND_SPLIT:var a=h(e.left,t),n=h(e.subject,t),s=h(e.right,t);return a+(0":u=!0,i=r=":u=!0,i=r<=e;break;case"<":u=!0,i=ea.length?t.substr(a.length):""}function i(){c=c.length>u.length?c.substr(u.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,""),mt(r,"removeSelAndBlockFromRemaining"),mt(i,"removePropAndValFromRem");!t.match(/^\s*$/);){var n=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!n){oie("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}var a=n[0],s=n[1];if("core"!==s&&new dle(s).invalid)oie("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=n[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){oie("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?h.push({name:d,val:p}):oie("Skipping property: Invalid property definition in: "+u):oie("Skipping property: Invalid property name in: "+u),i()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:t,value:r,strValue:""+r+(b||""),units:b,bypass:i},l.unitless||"px"!==b&&"em"!==b?s.pfValue=r:s.pfValue="px"!==b&&b?this.getEmSizeInPixels()*r:r,"ms"!==b&&"s"!==b||(s.pfValue="ms"===b?r:1e3*r),"deg"!==b&&"rad"!==b||(s.pfValue="rad"===b?r:Wie(r)),"%"===b&&(s.pfValue=r/100),s);if(l.propList){var T,k=[];if("none"!=(T=""+r)){for(var w=T.split(/\s*,\s*|\s+/),C=0;Cthis._private.maxZoom?this._private.maxZoom:t)=i.minZoom&&(i.maxZoom=t),this},"zoomRange"),minZoom:mt(function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:mt(function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:mt(function(e){var t,r,i=this._private,n=i.pan,a=i.zoom,s=!i.zoomingEnabled;return he(e)?r=e:Ete(e)&&(r=e.level,null!=e.position?t=Pie(e.position,a,n):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!i.panningEnabled&&(s=!0),r=(r=r>i.maxZoom?i.maxZoom:r)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=r,n.push("zoom"))),!i||a&&e.cancelOnFailedZoom||!t.panningEnabled||(r=e.pan,he(r.x)&&(t.pan.x=r.x,s=!1),he(r.y)&&(t.pan.y=r.y,s=!1),s)||n.push("pan"),0=r.numIter||(Cce(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature=r.animationThreshold&&a(),$re(h)):(Pce(n,r),o())},"frame");h()}else{for(;c;)c=s(l),l++;Pce(n,r),o()}return this},nee.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},nee.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},vce=mt(function(e,t,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=ene(r.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:n.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;cr.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop(t=bne(y,v,h[u],h[u+1],h[u+2],h[u+3])))return C(e,t),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(h=i.allpts,u=0;u+5(t=vne(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return C(e,t),!0;for(var l=l||r.source,c=c||r.target,d=b.getArrowWidth(n,a),p=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}],u=0;u(t.y-e.y)*(r.x-e.x)}return mt(n,"ccw"),n(e,r,i)!==n(t,r,i)&&n(e,t,r)!==n(e,t,i)}mt(g,"preprop"),mt(f,"getRotatedLabelBox"),mt(m,"doLinesIntersect");for(var y=0;yMath.abs(x)?n:i:"upward"===u||"downward"===u?(h=i,y=!0):"leftward"!==u&&"rightward"!==u||(h=n,y=!0),(n=h===i)?x:m),i=Vie(h=n?b:v),x=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(T)},"getIsTooClose"))(m),u=y(Math.abs(T)-Math.abs(m)),!g&&!u||x?n?(h=a.y1+m+(c?o/2*i:0),b=a.x1,t=a.x2,r.segpts=[b,h,t,h]):(p=a.x1+m+(c?s/2*i:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):n?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(x=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,x,l,x]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(b)<=t/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,x=a.y2,r.segpts=[v,l,v,x]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=e.pstyle("taxi-radius").value,g="arc-radius"===e.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(e,t){var r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,b,x,T,k,w,C=e._private.rscratch;"bezier"===C.edgeType&&(m=t.srcPos,r=t.tgtPos,i=t.srcW,n=t.srcH,a=t.tgtW,s=t.tgtH,w=t.srcShape,o=t.tgtShape,v=t.srcCornerRadius,l=t.tgtCornerRadius,b=t.srcRs,t=t.tgtRs,y=!he(C.startX)||!he(C.startY),f=!he(C.arrowStartX)||!he(C.arrowStartY),c=!he(C.endX)||!he(C.endY),h=!he(C.arrowEndX)||!he(C.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=(T=Yie({x:C.ctrlpts[0],y:C.ctrlpts[1]},{x:C.startX,y:C.startY}))n.poolIndex()&&(e=i,i=n,n=e),r.srcPos=i.position()),s=r.tgtPos=n.position(),o=r.srcW=i.outerWidth(),l=r.srcH=i.outerHeight(),c=r.tgtW=n.outerWidth(),h=r.tgtH=n.outerHeight(),u=r.srcShape=M.nodeShapes[D.getNodeShape(i)],d=r.tgtShape=M.nodeShapes[D.getNodeShape(n)],p=r.srcCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,g=r.tgtCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,f=r.tgtRs=n._private.rscratch,m=r.srcRs=i._private.rscratch;r.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=I.desktopTapThreshold2),b(t)),o=(e&&(I.hoverData.tapholdCancelled=!0),mt(function(){var e=I.hoverData.dragDelta=I.hoverData.dragDelta||[];0===e.length?(e.push(f[0]),e.push(f[1])):(e[0]+=f[0],e[1]+=f[1])},"updateDragDelta")),y=(n=!0,N(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),mt(function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}},"makeEvent")),v=mt(function(){I.data.bgActivePosistion=void 0,I.hoverData.selecting||a.emit(y("boxstart")),u[4]=1,I.hoverData.selecting=!0,I.redrawHint("select",!0),I.redraw()},"goIntoBoxMode");if(3===I.hoverData.which?e&&(r=y("cxtdrag"),(g||a).emit(r),I.hoverData.cxtDragged=!0,!I.hoverData.cxtOver||d!==I.hoverData.cxtOver)&&(I.hoverData.cxtOver&&I.hoverData.cxtOver.emit(y("cxtdragout")),I.hoverData.cxtOver=d)&&d.emit(y("cxtdragover")):I.hoverData.dragging?(n=!0,a.panningEnabled()&&a.userPanningEnabled()&&(I.hoverData.justStartedPan?(r=I.hoverData.mdownPos,i={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},I.hoverData.justStartedPan=!1):i={x:f[0]*s,y:f[1]*s},a.panBy(i),a.emit(y("dragpan")),I.hoverData.dragged=!0),l=I.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&N(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&N(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),I.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(M(m),g.emit(y("freeon")),m.emit(y("free")),I.dragData.didDrag)&&(g.emit(y("dragfreeon")),m.emit(y("dragfree"))),v()):g&&g.grabbed()&&I.nodeIsDraggable(g)&&((r=!I.dragData.didDrag)&&I.redrawHint("eles",!0),I.dragData.didDrag=!0,I.hoverData.draggingEles||D(m,{inDragLayer:!0}),s={x:0,y:0},he(f[0])&&he(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((i=I.hoverData.dragDelta)&&he(i[0])&&he(i[1])&&(s.x+=i[0],s.y+=i[1])),I.hoverData.draggingEles=!0,m.silentShift(s).emit(y("position")).emit(y("drag")),I.redrawHint("drag",!0),I.redraw()):o()),n=!0):e&&(I.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!I.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&G(g,I.hoverData.downs)&&(I.hoverData.dragging=!0,I.hoverData.justStartedPan=!0,u[4]=0,I.data.bgActivePosistion=$ie(c),I.redrawHint("select",!0),I.redraw()):v(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),I.registerBinding(e,"mouseup",mt(function(t){var e,r,i,n,a,s,o,l,c;1===I.hoverData.which&&1!==t.which&&I.hoverData.capture||I.hoverData.capture&&(I.hoverData.capture=!1,e=I.cy,r=I.projectIntoViewport(t.clientX,t.clientY),i=I.selection,l=I.findNearestElement(r[0],r[1],!0,!1),n=I.dragData.possibleDragElements,a=I.hoverData.down,c=b(t),I.data.bgActivePosistion&&(I.redrawHint("select",!0),I.redraw()),I.hoverData.tapholdCancelled=!0,I.data.bgActivePosistion=void 0,a&&a.unactivate(),s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),3===I.hoverData.which?(o=s("cxttapend"),(a||e).emit(o),I.hoverData.cxtDragged||(o=s("cxttap"),(a||e).emit(o)),I.hoverData.cxtDragged=!1,I.hoverData.which=null):1===I.hoverData.which&&(N(l,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),I.dragData.didDrag||I.hoverData.dragged||I.hoverData.selecting||I.hoverData.isOverThresholdDrag||(N(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),u=!1,t.timeStamp-d<=e.multiClickDebounceTime()?(h&&clearTimeout(h),u=!0,d=null,N(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(h=setTimeout(function(){u||N(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),d=t.timeStamp)),null!=a||I.dragData.didDrag||I.hoverData.selecting||I.hoverData.dragged||b(t)||(e.$(p).unselect(["tapunselect"]),0=I.touchTapThreshold2}if(e&&I.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-W,T=t.touches[0].clientY-U,k=t.touches[1].clientX-W,w=t.touches[1].clientY-U,2.25<=(l=ce(x,T,k,w))/q||22500<=l)&&(I.touchData.cxt=!1,I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),g=o("cxttapend"),I.touchData.start?(I.touchData.start.unactivate().emit(g),I.touchData.start=null):i.emit(g)),e&&I.touchData.cxt){var g=o("cxtdrag"),f=(I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),(I.touchData.start||i).emit(g),I.touchData.start&&(I.touchData.start._private.grabbed=!1),I.touchData.cxtDragged=!0,I.findNearestElement(n[0],n[1],!0,!0));(!I.touchData.cxtOver||f!==I.touchData.cxtOver)&&(I.touchData.cxtOver&&I.touchData.cxtOver.emit(o("cxtdragout")),I.touchData.cxtOver=f)&&f.emit(o("cxtdragover"))}else if(e&&t.touches[2]&&i.boxSelectionEnabled())t.preventDefault(),I.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,I.touchData.selecting||i.emit(o("boxstart")),I.touchData.selecting=!0,I.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(n[0]+n[2]+n[4])/3,r[3]=(n[1]+n[3]+n[5])/3):(r[0]=(n[0]+n[2]+n[4])/3,r[1]=(n[1]+n[3]+n[5])/3,r[2]=(n[0]+n[2]+n[4])/3+1,r[3]=(n[1]+n[3]+n[5])/3+1),I.redrawHint("select",!0),I.redraw();else if(e&&t.touches[1]&&!I.touchData.didSelect&&i.zoomingEnabled()&&i.panningEnabled()&&i.userZoomingEnabled()&&i.userPanningEnabled()){if(t.preventDefault(),I.data.bgActivePosistion=void 0,I.redrawHint("select",!0),C=I.dragData.touchDragEles){I.redrawHint("drag",!0);for(var m=0;m=f.deqFastCost*(1e3/60-(e?i:0)))break}else if(e){if(l>=f.deqCost*n||l>=f.deqAvgCost*i)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0=.2*e.width&&this.retireTexture(e)},cue.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,fie(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),gie(i,a),r.push(a),a}},cue.queueElement=function(e,t){var r=this.getElementQueue(),i=this.getElementKeyToQueue(),n=this.getKey(e),a=i[n];a?(a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,r.updateItem(a)):(a={eles:e.spawn().merge(e),level:t,reqs:1,key:n},r.push(a),i[n]=a)},cue.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),i=[],n=this.lookup,a=0;a<1&&0=f||!une(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,e),g.eles.push(v),b[a]=g}}return l||(m?null:u)},gue.getEleLevelForLayerLevel=function(e,t){return e},gue.drawEleInLayer=function(e,t,r,i){var n=this.renderer,e=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(r=this.getEleLevelForLayerLevel(r,i),n.setImgSmoothing(e,!1),n.drawCachedElement(e,t,null,null,r,!0),n.setImgSmoothing(e,!0))},gue.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var i=0,n=0;ns.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(n[s.NODE]=!0,n[s.SELECT_BOX]=!0),t.style()),v=t.zoom(),b=void 0!==c?c:v,x=t.pan(),T={x:x.x,y:x.y},k={zoom:v,pan:{x:x.x,y:x.y}},w=(void 0===(w=s.prevViewport)||k.zoom!==w.zoom||k.pan.x!==w.pan.x||k.pan.y!==w.pan.y||f&&!g||(s.motionBlurPxRatio=1),b*=i,(T=h||T).x*=i,T.y*=i,s.getCachedZSortedEles());function C(e,t,r,i,n){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,r,i,n),e.globalCompositeOperation=a}function S(e,t){var r,i,n,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=T,i=b,n=s.canvasWidth,s.canvasHeight):(r={x:x.x*p,y:x.y*p},i=v*p,n=s.canvasWidth*p,s.canvasHeight*p);e.setTransform(1,0,0,1,0,0),"motionBlur"===t?C(e,0,0,n,a):o||void 0!==t&&!t||e.clearRect(0,0,n,a),l||(e.translate(r.x,r.y),e.scale(i,i)),h&&e.translate(h.x,h.y),c&&e.scale(c,c)}mt(C,"mbclear"),mt(S,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=t.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER],(f=s.data.bufferContexts[s.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),f.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:f,drawOnlyNodeLayer:!0,forcedPxRatio:i*s.textureMult}),(k=s.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),n[s.DRAG]=!1,n[s.NODE]=!1,E=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,E.setTransform(1,0,0,1,0,0),d?C(E,0,0,k.width,k.height):E.clearRect(0,0,k.width,k.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(E,f[0],f[1],f[2],m),E.fillRect(0,0,k.width,k.height),v=t.zoom(),S(E,!1),E.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i),E.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/i,k.height/k.zoom/i)):s.textureOnViewport&&!o&&(s.textureCache=null);var E,_,f=t.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!n[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!n[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(n[s.NODE]||l||r||m[s.NODE])&&(_=d&&!m[s.NODE]&&1!==p,S(E=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(E,w.nondrag,i,f):s.drawLayeredElements(E,w.nondrag,i,f),s.debug&&s.drawDebugPoints(E,w.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,S(E=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(E,w.drag,i,f):s.drawCachedElements(E,w.drag,i,f),s.debug&&s.drawDebugPoints(E,w.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(e,S),d&&1!==p&&(r=u.contexts[s.NODE],_=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],i=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=mt(function(e,t,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,s.canvasWidth,s.canvasHeight):C(e,0,0,s.canvasWidth,s.canvasHeight),r=p,e.drawImage(t,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(n[s.NODE]||m[s.NODE])&&(f(r,_,m[s.NODE]),n[s.NODE]=!1),n[s.DRAG]||m[s.DRAG])&&(f(g,i,m[s.DRAG]),n[s.DRAG]=!1),s.prevViewport=k,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!a,s.mbFrames=0,n[s.NODE]=!0,n[s.DRAG]=!0,s.redraw()},100)),o||t.emit("render")},drawSelectionRectangle:function(e,t){var r,i=this,n=i.cy,a=i.data,n=n.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=a.canvasNeedsRedraw;(i.showFps||!s&&l[i.SELECT_BOX]&&!o)&&(t(s=e.forcedContext||a.contexts[i.SELECT_BOX]),1==i.selection[4]&&(i.hoverData.selecting||i.touchData.selecting)&&(r=i.cy.zoom(),t=n.core("selection-box-border-width").value/r,s.lineWidth=t,s.fillStyle="rgba("+n.core("selection-box-color").value[0]+","+n.core("selection-box-color").value[1]+","+n.core("selection-box-color").value[2]+","+n.core("selection-box-opacity").value+")",s.fillRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]),0=t-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(e,g),this.needsBuffer=!0,g},"draw")},{key:"getOffsets",value:mt(function(e){return this.keyToLocation.get(e)},"getOffsets")},{key:"isEmpty",value:mt(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:mt(function(e){var t,r;return!this.locked&&(t=this.texSize,r=this.texRows,e=this.getScale(e).texW,!(this.freePointer.x+e>t)||this.freePointer.row p1. vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); // Determine the bend direction. float sigma = sign(dot(p01 + p21, normal)); float width = aLineWidth[0]; if(sign(pos.y) == -sigma) { // This is an intersecting vertex. Adjust the position so that there's no overlap. vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } else { // This is a non-intersecting vertex. Treat it like a mitre join. vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } vColor = aColor; } else if(aVertType == `).concat(3,` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); if(vid == 1) position = vec2( 0.0, 0.0); if(vid == 2) position = vec2( 0.15, -0.3); gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else { gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space } vAtlasId = aAtlasId; vVertType = aVertType; vIndex = aIndex; } `),i=this.batchManager.getIndexArray(),n=kee(t,r,`#version 300 es precision highp float; // declare texture unit for each texture atlas in the batch `.concat(i.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join(` `),` uniform vec4 uBGColor; uniform float uZoom; in vec2 vTexCoord; in vec4 vColor; in vec2 vPosition; // model coordinates flat in int vAtlasId; flat in vec4 vIndex; flat in int vVertType; flat in vec2 vTopRight; flat in vec2 vBotLeft; flat in vec4 vCornerRadius; flat in vec4 vBorderColor; flat in vec2 vBorderWidth; out vec4 outColor; `).concat(` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } `,` `).concat(` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } `,` `).concat(` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } `,` `).concat(` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry // find root with Newton solver vec2 q = ab*(p-ab); float w = (q.x1.0) ? d : -d; } `,` vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha return vec4( top.rgb + (bot.rgb * (1.0 - top.a)), top.a + (bot.a * (1.0 - top.a)) ); } vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance // scale to the zoom level so that borders don't look blurry when zoomed in // note 1.5 is an aribitrary value chosen because it looks good return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); } void main(void) { if(vVertType == `).concat(0,`) { // look up the texel from the texture unit `).concat(i.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join(` else `),` } else if(vVertType == `).concat(3,`) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow } else if(vVertType == `).concat(4,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done } else if(vVertType == `).concat(4," || vVertType == ").concat(7,` || vVertType == `).concat(5," || vVertType == ").concat(6,`) { // use SDF float outerBorder = vBorderWidth[0]; float innerBorder = vBorderWidth[1]; float borderPadding = outerBorder * 2.0; float w = vTopRight.x - vBotLeft.x - borderPadding; float h = vTopRight.y - vBotLeft.y - borderPadding; vec2 b = vec2(w/2.0, h/2.0); // half width, half height vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center float d; // signed distance if(vVertType == `).concat(4,`) { d = rectangleSD(p, b); } else if(vVertType == `).concat(7,` && w == h) { d = circleSD(p, b.x); // faster than ellipse } else if(vVertType == `).concat(7,`) { d = ellipseSD(p, b); } else { d = roundRectangleSD(p, b, vCornerRadius.wzyx); } // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box if(d > 0.0) { if(d > outerBorder) { discard; } else { outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); } } else { if(d > innerBorder) { vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; vec4 innerBorderColor = blend(vBorderColor, vColor); outColor = distInterp(innerBorderColor, outerColor, d); } else { vec4 outerColor; if(innerBorder == 0.0 && outerBorder == 0.0) { outerColor = vec4(0); } else if(innerBorder == 0.0) { outerColor = vBorderColor; } else { outerColor = blend(vBorderColor, vColor); } outColor = distInterp(vColor, outerColor, d - innerBorder); } } } else { outColor = vColor; } `).concat(e.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } `));n.aPosition=t.getAttribLocation(n,"aPosition"),n.aIndex=t.getAttribLocation(n,"aIndex"),n.aVertType=t.getAttribLocation(n,"aVertType"),n.aTransform=t.getAttribLocation(n,"aTransform"),n.aAtlasId=t.getAttribLocation(n,"aAtlasId"),n.aTex=t.getAttribLocation(n,"aTex"),n.aPointAPointB=t.getAttribLocation(n,"aPointAPointB"),n.aPointCPointD=t.getAttribLocation(n,"aPointCPointD"),n.aLineWidth=t.getAttribLocation(n,"aLineWidth"),n.aColor=t.getAttribLocation(n,"aColor"),n.aCornerRadius=t.getAttribLocation(n,"aCornerRadius"),n.aBorderColor=t.getAttribLocation(n,"aBorderColor"),n.uPanZoomMatrix=t.getUniformLocation(n,"uPanZoomMatrix"),n.uAtlasSize=t.getUniformLocation(n,"uAtlasSize"),n.uBGColor=t.getUniformLocation(n,"uBGColor"),n.uZoom=t.getUniformLocation(n,"uZoom"),n.uTextures=[];for(var a=0;a=this.maxInstances)&&this.endBatch()}}}catch(e){l.e(e)}finally{l.f()}}},"drawTexture")},{key:"setTransformMatrix",value:mt(function(e,t,r,i){var n,a,s=!(4=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:mt(function(e,t,r){var i,n,a,s,o=this.simpleShapeOptions.get(r);this._isVisible(e,o)&&(s=o.shapeProps,void 0===(n=this._getVertTypeForShape(e,s.shape))||o.isSimple&&!o.isSimple(e)?this.drawTexture(e,t,r):(r=this.instanceCount,5!==(this.vertTypeBuffer.getView(r)[0]=n)&&6!==n||(i=o.getBoundingBox(e),i=this._getCornerRadius(e,s.radius,i),(a=this.cornerRadiusBuffer.getView(r))[0]=i,a[1]=i,a[2]=i,a[3]=i,6===n&&(a[0]=0,a[2]=0)),Lee(t,this.indexBuffer.getView(r)),Ree(e.pstyle(s.color).value,e.pstyle(s.opacity).value,this.colorBuffer.getView(r)),(i=this.lineWidthBuffer.getView(r))[0]=0,i[1]=0,s.border&&0<(n=e.pstyle("border-width").value)&&(Ree(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(r)),"inside"===(a=e.pstyle("border-position").value)?(i[0]=0,i[1]=-n):"outside"===a?(i[0]=n,i[1]=0):(i[0]=t=n/2,i[1]=-t)),s=this.transformBuffer.getMatrixView(r),this.setTransformMatrix(e,s,o),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()))},"drawNode")},{key:"_getVertTypeForShape",value:mt(function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:mt(function(e,t,r){var i=r.w,r=r.h;return"auto"===e.pstyle(t).value?Bne(i,r):(e=e.pstyle(t).pfValue,Math.min(e,r/2,i/2))},"_getCornerRadius")},{key:"drawEdgeArrow",value:mt(function(e,t,r){var i,n,a,s,o,l;e.visible()&&(l=e._private.rscratch,l="source"===r?(i=l.arrowStartX,n=l.arrowStartY,l.srcArrowAngle):(i=l.arrowEndX,n=l.arrowEndY,l.tgtArrowAngle),isNaN(i)||null==i||isNaN(n)||null==n||isNaN(l)||null==l||"none"!==e.pstyle(r+"-arrow-shape").value&&(r=e.pstyle(r+"-arrow-color").value,a=e.pstyle("opacity").value*e.pstyle("line-opacity").value,s=e.pstyle("width").pfValue,e=e.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,e),e=this.instanceCount,qee(o=this.transformBuffer.getMatrixView(e)),Wee(o,o,[i,n]),Gee(o,o,[s,s]),Uee(o,o,l),this.vertTypeBuffer.getView(e)[0]=3,Lee(t,this.indexBuffer.getView(e)),Ree(r,a,this.colorBuffer.getView(e)),this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch())},"drawEdgeArrow")},{key:"drawEdgeLine",value:mt(function(e,t){if(e.visible()){var r=this._getEdgePoints(e);if(r){var i=e.pstyle("opacity").value,n=e.pstyle("line-opacity").value,a=e.pstyle("width").pfValue,s=e.pstyle("line-color").value,o=i*n;if(r.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==r.length)e=this.instanceCount,this.vertTypeBuffer.getView(e)[0]=1,Lee(t,this.indexBuffer.getView(e)),Ree(s,o,this.colorBuffer.getView(e)),this.lineWidthBuffer.getView(e)[0]=a,(i=this.pointAPointBBuffer.getView(e))[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:mt(function(e){return!((e=e._private.rscratch).badLine||null==e.allpts||isNaN(e.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:mt(function(e){var t=e._private.rscratch;if(this._isValidEdge(e))return 4==(t=t.allpts).length?t:(e=this._getNumSegments(e),this._getCurveSegmentPoints(t,e))},"_getEdgePoints")},{key:"_getNumSegments",value:mt(function(e){return Math.min(Math.max(15,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:mt(function(e,t){if(4==e.length)return e;for(var r=Array(2*(t+1)),i=0;i<=t;i++)0==i?(r[0]=e[0],r[1]=e[1]):i==t?(r[2*i]=e[e.length-2],r[2*i+1]=e[e.length-1]):this._setCurvePoint(e,i/t,r,2*i);return r},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:mt(function(e,t,r,i){if(!(e.length<=2)){for(var n=Array(e.length-2),a=0;a{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function i(){}mt(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i},function(e,t,r){var i,n=r(2),a=r(8),s=r(9);function o(e,t,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(i in mt(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),i=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function i(e){this.vGraphObject=e}mt(i,"LGraphObject"),e.exports=i},function(e,t,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(e,t,r,i){n.call(this,i=null==r&&null==i?t:i),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(i in mt(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];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(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},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 c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(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(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.prototype.getEdgeListToNode=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.target==t){if(e.source!=i)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.source!=i&&e.target!=i)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},h.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;re&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>t)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-t)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-t),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.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 null==this.owner?null:this.owner.getParent()},e.exports=h},function(e,t,r){function i(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i},function(e,t,r){var i,n=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(e,t,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(i in mt(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var i=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,n.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var c,h=r(1);function i(e){c=r(5),this.layout=e,this.graphs=[],this.edges=[]}mt(i,"LGraphManager"),i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},i.prototype.add=function(e,t,r,i,n){if(null==r&&null==i&&null==n){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;rthis.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(yue()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(yue()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(e,t){e.exports=r},function(e,t,r){var i,n=r(0).FDLayoutConstants;function a(){}for(i in mt(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,t,r){var i,n=r(0).FDLayoutEdge;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).LGraph;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).LGraphManager;function a(e){n.call(this,e)}for(i in mt(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).FDLayoutNode,a=r(0).IMath;function s(e,t,r,i){n.call(this,e,t,r,i)}for(i in mt(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.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},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,i=this.getChild().getNodes(),n=0;ni&&(i=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},b.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(b.branchRadialLayout(t,null,0,359,0,i),l.calculateBounds(e)),n=new c;n.setDeviceOrgX(t.getMinX()),n.setDeviceOrgY(t.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+e.verticalPadding}},b.prototype.tileCompoundMembers=function(r,i){var n=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(e){var t=i[e];n.tiledMemberPack[e]=n.tileNodes(r[e],t.paddingLeft+t.paddingRight),t.rect.width=n.tiledMemberPack[e].width,t.rect.height=n.tiledMemberPack[e].height})},b.prototype.tileNodes=function(e,t){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.heighte.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},b.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;ir&&(t=i,r=e.rowWidth[i]);return t},b.prototype.canAddHorizontal=function(e,t,r){var i,n,a=this.getShortestRowIndex(e);return a<0||(n=e.rowWidth[a])+e.horizontalPadding+t<=e.width||(i=0,e.rowHeight[a]a&&t!=r){i.splice(-1,1),e.rows[r].push(n),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;os&&(s=i[o].height);0{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(vue()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(vue()):e.cytoscapeCoseBilkent=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(e,t){e.exports=r},function(e,t,r){var i=r(0).layoutBase.LayoutConstants,n=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:mt(function(){},"ready"),stop:mt(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function o(e,t){var r,i={};for(r in e)i[r]=e[r];for(r in t)i[r]=t[r];return i}function l(e){this.options=o(s,e),c(this.options)}mt(o,"extend"),mt(l,"_CoSELayout");var c=mt(function(e){null!=e.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=n.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?i.QUALITY=0:"proof"==e.quality?i.QUALITY=2:i.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=n.ANIMATE=i.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,e=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),t=(this.gm=e,this.options.eles.nodes()),r=this.options.eles.edges();this.root=e.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(t),c);for(var i=0;i{let r={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(r[e]=t[e])}),i.add({group:"nodes",data:r,position:{x:t.x??0,y:t.y??0}})})}function Tue(e,i){e.forEach(t=>{let r={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(r[e]=t[e])}),i.add({group:"edges",data:r})})}function kue(i){return new Promise(t=>{let e=Q("body").append("div").attr("id","cy").attr("style","display:none"),r=fue({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),xue(i.nodes,r),Tue(i.edges,r),r.nodes().forEach(function(t){t.layoutDimensions=()=>{var e=t.data();return{w:e.width,h:e.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(e=>{P.info("Cytoscape ready",e),t(r)})})}function wue(e){return e.nodes().map(e=>{let t=e.data(),r=e.position(),i={id:t.id,x:r.x,y:r.y};return Object.keys(t).forEach(e=>{"id"!==e&&(i[e]=t[e])}),i})}function Cue(e){return e.edges().map(e=>{let t=e.data(),r=e._private.rscratch,i={id:t.id,source:t.source,target:t.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(t).forEach(e=>{["id","source","target"].includes(e)||(i[e]=t[e])}),i})}var Sue,Eue=r(()=>{mue(),Sue=j(bue(),1),bk(),e(),fue.use(Sue.default),mt(xue,"addNodes"),mt(Tue,"addEdges"),mt(kue,"createCytoscapeInstance"),mt(wue,"extractPositionedNodes"),mt(Cue,"extractPositionedEdges")});async function _ue(e,t){P.debug("Starting cose-bilkent layout algorithm");try{Aue(e);var r=await kue(e),i=wue(r),n=Cue(r);return P.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(e){throw P.error("Error in cose-bilkent layout algorithm:",e),e}}function Aue(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(Array.isArray(e.edges))return!0;throw new Error("Edges array is required in layout data")}var Rue,Lue=r(()=>{e(),Eue(),mt(_ue,"executeCoseBilkentLayout"),mt(Aue,"validateLayoutData")}),Iue=r(()=>{Lue(),Rue=mt(async(n,e,{insertCluster:a,insertEdge:s,insertEdgeLabel:o,insertMarkers:t,insertNode:l,log:c,positionEdgeLabel:h},{})=>{let u={},d={},r=e.select("g"),p=(t(r,n.markers,n.type,n.diagramId),r.insert("g").attr("class","subgraphs")),g=r.insert("g").attr("class","edgePaths"),f=r.insert("g").attr("class","edgeLabels"),m=r.insert("g").attr("class","nodes"),i=(c.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(n.nodes.map(async e=>{var t,r,i;e.isGroup?(t={...e},d[e.id]=t,u[e.id]=t,await a(p,e)):(t={...e},u[e.id]=t,i=(r=await l(m,e,{config:n.config,dir:n.direction||"TB"})).node().getBBox(),t.width=i.width,t.height=i.height,t.domId=r,c.debug(`Node ${e.id} dimensions: ${i.width}x`+i.height))})),c.debug("Running cose-bilkent layout algorithm"),{...n,nodes:n.nodes.map(e=>{var t=u[e.id];return{...e,width:t.width,height:t.height}})}),y=await _ue(i,n.config);c.debug("Positioning nodes based on layout results"),y.nodes.forEach(e=>{var t=u[e.id];t?.domId&&(t.domId.attr("transform",`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,c.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),y.edges.forEach(t=>{var e=n.edges.find(e=>e.id===t.id);e&&(e.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),c.debug("Inserting and positioning edges"),await Promise.all(n.edges.map(async t=>{await o(f,t);var e,r=u[t.start??""],i=u[t.end??""];r&&i&&(e=(e=y.edges.find(e=>e.id===t.id))?(c.debug("APA01 positionedEdge",e),{...t}):{...t,points:[{x:r.x||0,y:r.y||0},{x:i.x||0,y:i.y||0}]},r=s(g,e,d,n.type,r,i,n.diagramId),h(e,r))})),c.debug("Cose-bilkent rendering completed")},"render")}),Nue={};Vat(Nue,{render:()=>Due});var Due,Mue,Oue,Pue,Bue,$ue,Fue,zue,que,jue,Wue,Uue,Gue,Vue,Yue,Hue,Xue,Kue,Zue,Que=r(()=>{Iue(),Due=Rue}),Jue=r(()=>{ON(),e(),Mue={},Oue=mt(e=>{for(var t of e)Mue[t.name]=t},"registerLayoutLoaders"),mt(()=>{Oue([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(WZ(),zZ)),"loader")},{name:"cose-bilkent",loader:mt(async()=>Promise.resolve().then(()=>(Que(),Nue)),"loader")}])},"registerDefaultLayoutLoaders")(),Pue=mt(async(e,t)=>{if(!(e.layoutAlgorithm in Mue))throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm);if(e.diagramId)for(var r of e.nodes){var i=r.domId||r.id;r.domId=e.diagramId+"-"+i}var n=Mue[e.layoutAlgorithm],a=await n.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:o,gradientStart:l,gradientStop:c}=o,h=t.attr("id");return t.append("defs").append("filter").attr("id",h+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",s?.includes("dark")?"#FFFFFF":"#000000"),t.append("defs").append("filter").attr("id",h+"-drop-shadow-small").attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",s?.includes("dark")?"#FFFFFF":"#000000"),o&&((h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)),a.render(e,t,_N,{algorithm:n.algorithm})},"render"),Bue=mt((e="",{fallback:t="dagre"}={})=>{if(e in Mue)return e;if(t in Mue)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")}),ede=r(()=>{Ch(),e(),$ue=mt((e,t,r,i)=>{e.attr("class",r);var{width:r,height:n,x:a,y:s}=Fue(e,t),i=(yh(e,n,r,i),zue(a,s,r,n,t));e.attr("viewBox",i),P.debug(`viewBox configured: ${i} with padding: `+t)},"setupViewPortForSVG"),Fue=mt((e,t)=>({width:(e=e.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*t,height:e.height+2*t,x:e.x,y:e.y}),"calculateDimensionsWithPadding"),zue=mt((e,t,r,i,n)=>e-n+` ${t-n} ${r} `+i,"createViewBox")}),tde=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),que=mt(function(e,t){return t.db.getClasses()},"getClasses"),jue=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing state diagram (v2)",t);var{securityLevel:n,flowchart:a,layout:s}=B(),o=(i.db.setDiagramId(t),P.debug("Before getData: "),i.db.getData()),n=(P.debug("Data: ",o),tI(t,n)),l=i.db.getDirection(),s=(o.type=i.type,o.layoutAlgorithm=Bue(s),"dagre"===o.layoutAlgorithm&&"elk"===s&&P.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."),o.direction=l,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["point","circle","cross"],o.diagramId=t,P.debug("REF1:",o),await Pue(o,n),o.config.flowchart?.diagramPadding??8);PC.insertTitle(n,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),$ue(n,s,"flowchart",a?.useMaxWidth||!1)},"draw"),Wue={getClasses:que,draw:jue}}),rde=r(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),B=[1,4],$=[1,3],F=[1,5],z=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],q=[2,2],j=[1,13],W=[1,14],U=[1,15],G=[1,16],V=[1,23],Y=[1,25],H=[1,26],X=[1,27],t=[1,50],r=[1,49],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],i=[1,45],n=[1,47],a=[1,43],s=[1,48],o=[1,44],l=[1,51],c=[1,46],h=[1,52],u=[1,53],te=[1,34],re=[1,35],ie=[1,36],ne=[1,37],ae=[1,38],se=[1,58],d=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],p=[1,62],g=[1,61],f=[1,63],oe=[8,9,11,75,77,78],le=[1,79],ce=[1,92],he=[1,97],ue=[1,96],de=[1,93],pe=[1,89],ge=[1,95],fe=[1,91],me=[1,98],ye=[1,94],ve=[1,99],be=[1,90],xe=[8,9,10,11,40,75,77,78],m=[8,9,10,11,40,46,75,77,78],y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Te=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ke=[44,60,89,102,105,106,109,111,114,115,116],we=[1,122],Ce=[1,123],Se=[1,125],Ee=[1,124],_e=[44,60,62,74,89,102,105,106,109,111,114,115,116],Ae=[1,134],Re=[1,148],Le=[1,149],Ie=[1,150],Ne=[1,151],De=[1,136],Me=[1,138],Oe=[1,142],Pe=[1,143],Be=[1,144],$e=[1,145],Fe=[1,146],ze=[1,147],qe=[1,152],je=[1,153],We=[1,132],Ue=[1,133],Ge=[1,140],Ve=[1,135],Ye=[1,139],He=[1,137],Xe=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Ke=[1,155],Ze=[1,157],v=[8,9,11],b=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],x=[1,177],T=[1,173],k=[1,174],w=[1,178],C=[1,175],S=[1,176],Qe=[77,116,119],E=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Je=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],_=[1,248],A=[1,246],R=[1,250],L=[1,244],I=[1,245],N=[1,247],D=[1,249],M=[1,251],tt=[1,269],rt=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:mt(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,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$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",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},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],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,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],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:case 36:case 37:return e.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:return 119;case 72:return this.popState(),77;case 73:return this.pushState("thickEdgeText"),75;case 74:return 119;case 75:return this.popState(),77;case 76:return this.pushState("dottedEdgeText"),75;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};B.lexer=$,mt(P,"Parser"),(Uue=new((P.prototype=B).Parser=P)).parser=Uue,Gue=Uue}),ide=r(()=>{rde(),(Vue=Object.assign({},Gue)).parse=e=>(e=e.replace(/}\s*\n/g,`} `),Gue.parse(e)),Yue=Vue}),nde=r(()=>{Hue=mt(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; height: 1em; overflow: visible; vertical-align: -0.125em; } .node .label-icon path { fill: currentColor; stroke: revert; stroke-width: revert; } `,"getIconStyles")}),ade=r(()=>{ai(),nde(),Xue=mt((e,t)=>{var r=(n=ot)(e,"r"),i=n(e,"g"),n=n(e,"b");return at(r,i,n,t)},"fade"),Kue=mt(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth??1}px; } .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .katex path { fill: #000; stroke: #000; stroke-width: 1px; } .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { text-align: center; } .node.clickable { cursor: pointer; } .root .anchor path { fill: ${e.lineColor} !important; stroke-width: 0; stroke: ${e.lineColor}; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePath .path { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth??2}px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${Xue(e.edgeLabelBackground,.5)}; // background-color: } .cluster rect { fill: ${e.clusterBkg}; stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } /* .cluster div { color: ${e.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } rect.text { fill: none; stroke-width: 0; } .icon-shape, .image-shape { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; padding: 2px; } .label rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } ${Hue()} `,"getStyles"),Zue=Kue}),sde={};Vat(sde,{diagram:()=>ode});var ode,lde,cde,hde,ude=r(()=>{Uu(),gI(),tde(),ide(),ade(),ode={parser:Yue,get db(){return new eI},renderer:Wue,styles:Zue,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Gh({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Gh({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),dde=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],i=[1,10],n=[1,11],a=[1,12],s=[1,13],o=[1,23],l=[1,24],P=[1,25],B=[1,26],$=[1,27],c=[1,19],F=[1,28],z=[1,29],h=[1,20],u=[1,18],d=[1,21],p=[1,22],g=[1,36],f=[1,37],m=[1,38],y=[1,39],v=[1,40],b=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],x=[1,45],T=[1,46],k=[1,55],w=[40,48,50,51,52,70,71],C=[1,66],S=[1,64],E=[1,61],_=[1,65],A=[1,67],R=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],q=[65,66,67,68,69],j=[1,84],W=[1,83],U=[1,81],G=[1,82],V=[6,10,42,47],L=[6,10,13,41,42,47,48,49],I=[1,92],N=[1,91],D=[1,90],M=[19,58],Y=[1,101],H=[1,100],O=[19,58,60,62],i={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.addEntity(a[o-4]),i.addEntity(a[o-2]),i.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:i.addEntity(a[o-8]),i.addEntity(a[o-4]),i.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),i.setClass([a[o-8]],a[o-6]),i.setClass([a[o-4]],a[o-2]);break;case 10:i.addEntity(a[o-6]),i.addEntity(a[o-2]),i.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),i.setClass([a[o-6]],a[o-4]);break;case 11:i.addEntity(a[o-6]),i.addEntity(a[o-4]),i.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),i.setClass([a[o-4]],a[o-2]);break;case 12:i.addEntity(a[o-3]),i.addAttributes(a[o-3],a[o-1]);break;case 13:i.addEntity(a[o-5]),i.addAttributes(a[o-5],a[o-1]),i.setClass([a[o-5]],a[o-3]);break;case 14:i.addEntity(a[o-2]);break;case 15:i.addEntity(a[o-4]),i.setClass([a[o-4]],a[o-2]);break;case 16:i.addEntity(a[o]);break;case 17:i.addEntity(a[o-2]),i.setClass([a[o-2]],a[o]);break;case 18:i.addEntity(a[o-6],a[o-4]),i.addAttributes(a[o-6],a[o-1]);break;case 19:i.addEntity(a[o-8],a[o-6]),i.addAttributes(a[o-8],a[o-1]),i.setClass([a[o-8]],a[o-3]);break;case 20:i.addEntity(a[o-5],a[o-3]);break;case 21:i.addEntity(a[o-7],a[o-5]),i.setClass([a[o-7]],a[o-2]);break;case 22:i.addEntity(a[o-3],a[o-1]);break;case 23:i.addEntity(a[o-5],a[o-3]),i.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=a[o-3],i.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 59:case 67:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],i.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],i.addCssStyles(a[o-2],a[o-1]);break;case 43:this.$=[a[o]];break;case 44:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 79:case 80:this.$=a[o].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=a[o];break;case 60:a[o].push(a[o-1]),this.$=a[o];break;case 61:this.$={type:a[o-1],name:a[o]};break;case 62:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 63:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 64:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 65:case 66:case 69:this.$=a[o];break;case 68:a[o-2].push(a[o]),this.$=a[o-2];break;case 70:this.$=a[o].replace(/"/g,"");break;case 71:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 72:this.$=i.Cardinality.ZERO_OR_ONE;break;case 73:this.$=i.Cardinality.ZERO_OR_MORE;break;case 74:this.$=i.Cardinality.ONE_OR_MORE;break;case 75:this.$=i.Cardinality.ONLY_ONE;break;case 76:this.$=i.Cardinality.MD_PARENT;break;case 77:this.$=i.Identification.NON_IDENTIFYING;break;case 78:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:P,36:B,37:$,40:c,43:F,44:z,48:h,50:u,51:d,52:p},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:30,11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:P,36:B,37:$,40:c,43:F,44:z,48:h,50:u,51:d,52:p},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:g,66:f,67:m,68:y,69:v}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(r,[2,27]),t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),t(r,[2,31]),t(b,[2,54]),t(b,[2,55]),t(b,[2,56]),t(b,[2,57]),t(b,[2,58]),t(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:44,40:x,41:T},{16:47,40:x,41:T},{16:48,40:x,41:T},t(r,[2,4]),{11:49,40:c,48:h,50:u,51:d,52:p},{16:50,40:x,41:T},{18:51,19:[1,52],53:53,54:54,58:k},{11:56,40:c,48:h,50:u,51:d,52:p},{64:57,70:[1,58],71:[1,59]},t(w,[2,72]),t(w,[2,73]),t(w,[2,74]),t(w,[2,75]),t(w,[2,76]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:C,38:60,41:S,42:E,45:62,46:63,48:_,49:A},t(R,[2,37]),t(R,[2,38]),{16:68,40:x,41:T,42:E},{13:C,38:69,41:S,42:E,45:62,46:63,48:_,49:A},{13:[1,70],15:[1,71]},t(r,[2,17],{63:35,12:72,17:[1,73],42:E,65:g,66:f,67:m,68:y,69:v}),{19:[1,74]},t(r,[2,14]),{18:75,19:[2,59],53:53,54:54,58:k},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:g,66:f,67:m,68:y,69:v},t(q,[2,77]),t(q,[2,78]),{6:j,10:W,39:80,42:U,47:G},{40:[1,85],41:[1,86]},t(V,[2,43],{46:87,13:C,41:S,48:_,49:A}),t(L,[2,45]),t(L,[2,50]),t(L,[2,51]),t(L,[2,52]),t(L,[2,53]),t(r,[2,41],{42:E}),{6:j,10:W,39:88,42:U,47:G},{14:89,40:I,50:N,72:D},{16:93,40:x,41:T},{11:94,40:c,48:h,50:u,51:d,52:p},{18:95,19:[1,96],53:53,54:54,58:k},t(r,[2,12]),{19:[2,60]},t(M,[2,61],{56:97,57:98,59:99,61:Y,62:H}),t([19,58,61,62],[2,66]),t(r,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(r,[2,36]),{13:C,41:S,45:104,46:63,48:_,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(R,[2,39]),t(R,[2,40]),t(L,[2,46]),t(r,[2,42]),t(r,[2,8]),t(r,[2,79]),t(r,[2,80]),t(r,[2,81]),{13:[1,105],42:E},{13:[1,107],15:[1,106]},{19:[1,108]},t(r,[2,15]),t(M,[2,62],{57:109,60:[1,110],62:H}),t(M,[2,63]),t(O,[2,67]),t(M,[2,70]),t(O,[2,69]),{18:111,19:[1,112],53:53,54:54,58:k},{16:113,40:x,41:T},t(V,[2,44],{46:87,13:C,41:S,48:_,49:A}),{14:114,40:I,50:N,72:D},{16:115,40:x,41:T},{14:116,40:I,50:N,72:D},t(r,[2,13]),t(M,[2,64]),{59:117,61:Y},{19:[1,118]},t(r,[2,20]),t(r,[2,23],{17:[1,119],42:E}),t(r,[2,11]),{13:[1,120],42:E},t(r,[2,10]),t(O,[2,68]),t(r,[2,18]),{18:121,19:[1,122],53:53,54:54,58:k},{14:123,40:I,50:N,72:D},{19:[1,124]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{e(),Uu(),Wu(),zC(),hde=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={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"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Bh,this.getAccTitle=$h,this.setAccDescription=Fh,this.getAccDescription=zh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getConfig=mt(()=>B().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{mt(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,P.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-`+this.entities.size,label:e,attributes:[],alias:t,shape:"erBox",look:B().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),P.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;0<=i;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=""),r.attributes.push(t[i]),P.debug("Added attribute ",t[i].name)}addRelationship(e,t,r,i){e=this.entities.get(e),r=this.entities.get(r),e&&r&&(e={entityA:e.id,roleA:t,entityB:r.id,relSpec:i},this.relationships.push(e),P.debug("Added new relationship :",e))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}addCssStyles(e,t){for(var r of e){var i,n=this.entities.get(r);if(!t||!n)return;for(i of t)n.cssStyles.push(i)}}addClass(e,t){e.forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),t&&t.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setClass(e,t){for(var r of e){var i=this.entities.get(r);if(i)for(var n of t)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Ph()}getData(){let e=[],t=[],r=B(),i=0;for(var n of this.entities.keys())(n=this.entities.get(n))&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(" ")),n.colorIndex=i++,e.push(n));let a=0;for(var s of this.relationships)s={id:FC(s.entityA,s.entityB,{prefix:"id",counter:a++}),type:"normal",curve:"basis",start:s.entityA,end:s.entityB,label:s.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:s.relSpec.cardB.toLowerCase(),arrowTypeEnd:s.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==s.relSpec.relType?"solid":"dashed",look:r.look,labelType:"markdown"},t.push(s);return{nodes:e,edges:t,other:{},config:r,direction:"TB"}}}}),gde={};Vat(gde,{draw:()=>fde});var fde,mde,yde,vde,bde,xde,Tde=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),bk(),fde=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:s}=B(),o=i.db.getData(),l=tI(t,n);o.type=i.type,o.layoutAlgorithm=Bue(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=i.db.getDirection();var c=(c=o.config).look,c=(o.markers="neo"===c?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await Pue(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),l.selectAll('[id*="-background"]'));0{ai(),mde=mt((e,t)=>{var r=(n=ot)(e,"r"),i=n(e,"g"),n=n(e,"b");return at(r,i,n,t)},"fade"),yde=new Set(["redux-color","redux-dark-color"]),vde=mt(t=>{var{theme:e,look:r,bkgColorArray:i,borderColorArray:n}=t;if(!yde.has(e))return"";let a=0{var{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return` ${vde(e)} .entityBox { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } .relationshipLabelBox { fill: ${e.tertiaryColor}; opacity: 0.7; background-color: ${e.tertiaryColor}; rect { opacity: 0.5; } } .labelBkg { background-color: ${yde.has(r)&&i?i:mde(e.tertiaryColor,.5)}; } .edgeLabel { background-color: ${yde.has(r)&&i?i:e.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${yde.has(r)&&i?i:e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.textColor}; } .edgeLabel .label { fill: ${e.nodeBorder}; font-size: 14px; } .label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .edge-pattern-dashed { stroke-dasharray: 8,8; } .node rect, .node circle, .node ellipse, .node polygon { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${"neo"===t?n:"1px"}; } .relationshipLine { stroke: ${e.lineColor}; stroke-width: ${"neo"===t?n:"1px"}; fill: none; } .marker { fill: none !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [data-look=neo].labelBkg { background-color: ${mde(e.tertiaryColor,.5)}; } `},"getStyles"),xde=bde}),wde={};Vat(wde,{diagram:()=>Cde});var Cde,Sde=r(()=>{dde(),pde(),Tde(),kde(),Cde={parser:cde,get db(){return new hde},renderer:gde,styles:xde}});function Ede(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function _de(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Ade(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function Rde(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Lde(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}function Ide(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Nde(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Dde(e){return Ide(e)&&"string"==typeof e.fullText}function Mde(e){return"string"==typeof e?e:"u"t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new $ke(()=>({index:0}),e=>e.index({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){var t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex{Ede(e)&&(e.$container=i,e.$containerProperty=r,e.$containerIndex=t,n.deep)&&Bde(e,n)}):Ede(e)&&(e.$container=i,e.$containerProperty=r,n.deep)&&Bde(e,n))}function $de(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function Fde(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function zde(e){if(e=qde(e).$document)return e;throw new Error("AST node has no document.")}function qde(e){for(;e.$container;)e=e.$container;return e}function jde(e){return _de(e)?e.ref?[e.ref]:[]:Ade(e)?e.items.map(e=>e.ref):[]}function Wde(n,e){if(!n)throw new Error("Node must be an AstNode.");let a=e?.range;return new $ke(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexWde(e,t));throw new Error("Root node must be an AstNode.")}function Gde(e,t){if(e)return t?.range&&!Vde(e,t.range)?new qke(e,()=>[]):new qke(e,e=>Wde(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function Vde(e,t){return!t||!!(e=e.$cstNode?.range)&&t0e(e,t)}function Yde(a){return new $ke(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexIde(e)?e.content:[],{includeRoot:!0})}function Kpe(e){return Xpe(e).filter(Nde)}function Zpe(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function Qpe(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function Jpe(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function e0e(e,t){var r;return e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?Gwe.After:(r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,e=e.end.lineGwe.After}function r0e(e,t,r=Vwe){var i;if(e)return 0!e.hidden)-1;0<=e;e--){var i=t.content[e];if(n0e(i,r))return i}}}function n0e(e,t){return Nde(e)&&t.includes(e.tokenType.name)}function a0e(e,t){return Nde(e)?e:Ide(e)&&(e=o0e(e,t,!1))?a0e(e,t):void 0}function s0e(e,t){return Nde(e)?e:Ide(e)&&(e=o0e(e,t,!0))?s0e(e,t):void 0}function o0e(e,t,r){let i=0,n=e.content.length-1,a;for(;i<=n;){var s=Math.floor((i+n)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,i=s+1):n=s-1}return a}function l0e(r,i=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0t.test(e))}function S0e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E0e(e,t){return e=_0e(e),!!(t=t.match(e))&&0",s)-s+1);break;default:i(2)}break;case"[":(e=/\[(?:\\.|.)*?\]/g).lastIndex=s,i((e=e.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(e=/\{\d+,?\d*\}/g).lastIndex=s,(e=e.exec(a))?r(e[0].length):i(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":t+="(?:",s+=3,t+=o()+"|$)";break;case"=":t+="(?=",s+=3,t+=o()+")";break;case"!":e=s,s+=3,o(),t+=a.substr(e,s-e);break;case"<":switch(a[s+3]){case"=":case"!":e=s,s+=4,o(),t+=a.substr(e,s-e);break;default:r(a.indexOf(">",s)-s+1),t+=o()+"|$)"}}else r(1),t+=o()+"|$)";break;case")":return++s,t;default:i(1)}return t}return mt(o,"process2"),yt(o,"process"),new RegExp(o(),e.flags)}function A0e(e){return e.rules.find(e=>Ape(e)&&e.entry)}function R0e(e){return e.rules.filter(e=>$pe(e)&&e.hidden)}function L0e(e,t){var r,i=new Set,n=A0e(e);if(!n)return new Set(e.rules);for(r of[n].concat(R0e(e)))I0e(r,i,t);var a,s=new Set;for(a of e.rules)(i.has(a.name)||$pe(a)&&a.hidden)&&s.add(a);return s}function I0e(e,t,r){t.add(e.name),Ude(e).forEach(e=>{(Npe(e)||r&&Fpe(e))&&(e=e.rule.ref)&&!t.has(e.name)&&I0e(e,t,r)})}function N0e(e){let t=new Set;return Ude(e).forEach(e=>{hpe(e)&&(Ape(e.type.ref)&&t.add(e.type.ref),mpe(e.type.ref))&&Ape(e.type.ref.$container)&&t.add(e.type.ref.$container)}),t}function D0e(e){return e.terminal||(e.type.ref?j0e(e.type.ref)?.terminal:void 0)}function M0e(e){return e.hidden&&!C0e(ige(e))}function O0e(e,t){return e&&t?B0e(e,t,e.astNode,!0):[]}function P0e(e,t,r){return e&&t&&0!==(t=B0e(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function B0e(e,t,r,i){return!i&&(i=$de(e.grammarSource,ape))&&i.feature===t?[e]:Ide(e)&&e.astNode===r?e.content.flatMap(e=>B0e(e,t,r,!1)):[]}function $0e(e,t){return e?z0e(e,t,e?.astNode):[]}function F0e(e,t,r){return e&&0!==(t=z0e(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function z0e(e,t,r){if(e.astNode!==r)return[];if(Tpe(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var i,n,a=Xpe(e).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?Tpe(i.grammarSource)&&i.grammarSource.value===t&&s.push(i):a.prune()),!n.done;);return s}function q0e(e){for(var t=e.astNode;t===e.container?.astNode;){var r=$de(e.grammarSource,ape);if(r)return r;e=e.container}}function j0e(e){let t=e;return mpe(t)&&(tpe(t.$container)?t=t.$container.$container:Qde(t.$container)?t=t.$container:g0e(t.$container)),W0e(e,t,new Map)}function W0e(i,e,n){function t(e,t){let r;return $de(e,ape)||(r=W0e(t,t,n)),n.set(i,r),r}if(mt(t,"go"),yt(t,"go"),n.has(i))return n.get(i);n.set(i,void 0);for(var r of Ude(e)){if(ape(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(Npe(r)&&Ape(r.rule.ref))return t(r,r.rule.ref);if(Dpe(r)&&r.typeRef?.ref)return t(r,r.typeRef.ref)}}function U0e(t){var e=t.$container;if(fpe(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var i=r[e];if(tpe(i))return i;if(i=Ude(r[e]).find(tpe))return i}}if(Zde(e))return U0e(e)}function G0e(e,t){return"?"===e||"*"===e||fpe(t)&&!!t.guardCondition}function V0e(e){return"*"===e||"+"===e}function Y0e(e){return"+="===e}function H0e(e){return X0e(e,new Set)}function X0e(e,t){if(t.has(e))return!0;t.add(e);for(var r of Ude(e))if(Npe(r)){if(!r.rule.ref||Ape(r.rule.ref)&&!X0e(r.rule.ref,t)||ype(r.rule.ref))return!1}else{if(ape(r))return!1;if(tpe(r))return!1}return!!e.definition}function K0e(e){return Z0e(e.type,new Set)}function Z0e(e,t){return!!t.has(e)||(t.add(e),!npe(e)&&!Rpe(e)&&(Wpe(e)?e.types.every(e=>Z0e(e,t)):!!Dpe(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!zpe(e=e.typeRef.ref)&&Z0e(e.type,t))))}function Q0e(e){if(!$pe(e))return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)?e.name:void 0)}function J0e(e){if(Qde(e))return Ape(e)&&H0e(e)?e.name:Q0e(e)??e.name;if(xpe(e)||zpe(e)||Ipe(e))return e.name;if(tpe(e)){var t=ege(e);if(t)return t}else if(mpe(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function ege(e){return e.inferredType?e.inferredType.name:e.type?.ref?J0e(e.type.ref):void 0}function tge(e){return $pe(e)?e.type?.name??"string":Ape(e)&&H0e(e)?e.name:Q0e(e)??e.name}function rge(e){return $pe(e)?e.type?.name??"string":Q0e(e)??e.name}function ige(e){var e=nge(e.definition,t={s:!1,i:!1,u:!1}),t=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(e,t)}function nge(e,t){if(Ope(e))return age(e);if(Bpe(e))return sge(e);if(ope(e))return cge(e);if(Fpe(e)){var r=e.rule.ref;if(r)return uge(nge(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error("Missing rule reference.")}if(wpe(e))return lge(e);if(Gpe(e))return oge(e);var i;if(Lpe(e))return r=e.regex.lastIndexOf("/"),i=e.regex.substring(1,r),r=e.regex.substring(r+1),t&&(t.i=r.includes("i"),t.s=r.includes("s"),t.u=r.includes("u")),uge(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});if(Ype(e))return uge(oCe,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, `+e?.$cstNode?.text)}function age(e){return uge(e.elements.map(e=>nge(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function sge(e){return uge(e.elements.map(e=>nge(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function oge(e){return uge(oCe+"*?"+nge(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function lge(e){return uge(`(?!${nge(e.terminal)})${oCe}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function cge(e){return e.right?uge(`[${hge(e.left)}-${hge(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):uge(hge(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function hge(e){return S0e(e.value)}function uge(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?""+e+t.cardinality:e}function dge(e){var t,r=[];for(t of e.Grammar.rules)$pe(t)&&M0e(t)&&w0e(ige(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:Vwe}}function pge(e){var t=lCe.call(e,hCe),r=e[hCe];try{var i=!(e[hCe]=void 0)}catch{}var n=cCe.call(e);return i&&(t?e[hCe]=r:delete e[hCe]),n}function gge(e){return dCe.call(e)}function fge(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(gCe&&gCe in Object(e)?uCe:pCe)(e)}function mge(e){return null!=e&&"object"==typeof e}function yge(e){return"symbol"==typeof e||mCe(e)&&"[object Symbol]"==fCe(e)}function vge(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r>>0,t>>>=0;for(var a=Array(n);++iKme(e,t)):!(e instanceof Q_e&&N_e(t,e))&&e instanceof Z_e&&(e instanceof Q_e&&t.push(e),g_e(e.definition,e=>Kme(e,t))))}function Zme(e){return e instanceof s7e}function Qme(e){if(e instanceof Q_e)return"SUBRULE";if(e instanceof t7e)return"OPTION";if(e instanceof s7e)return"OR";if(e instanceof r7e)return"AT_LEAST_ONE";if(e instanceof i7e)return"AT_LEAST_ONE_SEP";if(e instanceof a7e)return"MANY_SEP";if(e instanceof n7e)return"MANY";if(e instanceof o7e)return"CONSUME";throw Error("non exhaustive match")}function Jme(e,t,r){return[new t7e({definition:[new o7e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function eye(e){if(e instanceof Q_e)return eye(e.referencedRule);if(e instanceof o7e)return iye(e);if(Xme(e))return tye(e);if(Zme(e))return rye(e);throw Error("non exhaustive match")}function tye(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=Kme(a),t=t.concat(eye(a)),i+=1,n=r.length>i;return K_e(t)}function rye(e){return e=T_e(e.definition,e=>eye(e)),K_e(bSe(e))}function iye(e){return[e.terminalType]}function nye(e){let t={};return u_e(e,e=>{e=new l7e(e).startWalking(),z6e(t,e)}),t}function aye(e,t){return e.name+t+"_~IN~_"}function sye(e){var t,e=e.toString();return c7e.hasOwnProperty(e)?c7e[e]:(t=h7e.pattern(e),c7e[e]=t)}function oye(){c7e={}}function lye(e,t=!1){try{var r=sye(e);return cye(r.value,{},r.flags.ignoreCase)}catch(r){r.message===u7e?t&&jme(d7e+` Unable to optimize: < ${e.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`):(t=t?` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",qme(d7e+` Failed parsing: < ${e.toString()} > Using the @chevrotain/regexp-to-ast library Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+t))}return[]}function cye(t,n,a){switch(t.type){case"Disjunction":for(let e=0;e{if("number"==typeof t)hye(t,n,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)hye(e,n,a);else{for(let e=r.from;e<=r.to&&e=x7e){var t=r.from>=x7e?r.from:x7e,e=r.to,t=jye(t),i=jye(e);for(let e=t;e<=i;e++)n[e]=e}}}});break;case"Group":cye(s.value,n,a);break;default:throw Error("Non Exhaustive Match")}if(i=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===pye(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return L_e(n)}function hye(e,t,r){var i=jye(e);t[i]=i,!0===r&&uye(e,t)}function uye(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=jye(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=jye(r.charCodeAt(0))]=e)}function dye(e,r){return v_e(e.value,e=>{if("number"==typeof e)return N_e(r,e);{let t=e;return void 0!==v_e(r,e=>t.from<=e&&e<=t.to)}})}function pye(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(bCe(e.value)?g_e(e.value,pye):pye(e.value))}function gye(t,e){var r,i;return e instanceof RegExp?(r=sye(e),(i=new p7e(t)).visit(r),i.found):void 0!==v_e(e,e=>N_e(t,e.charCodeAt(0)))}function fye(e,n){var t=(n=r_e(n,{useSticky:m7e,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` `],tracer:yt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{Wye()});let r,i=(t("Reject Lexer.NA",()=>{r=G_e(e,e=>e[g7e]===_7e.NA)}),!1),a;t("Transform Patterns",()=>{i=!1,a=T_e(r,e=>{var t,e=e[g7e];if(B_e(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||N_e(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(n.useSticky?Nye:Iye)(e):t[1]:t;if(BCe(e))return i=!0,{exec:e};if("object"==typeof e)return i=!0,e;if("string"==typeof e)return 1===e.length?e:(t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),e=new RegExp(t),(n.useSticky?Nye:Iye)(e));throw Error("non exhaustive match")})});let s,o,l,c,h;t("misc mapping",()=>{s=T_e(r,e=>e.tokenTypeIdx),o=T_e(r,e=>{if((e=e.GROUP)!==_7e.SKIPPED){if(A_e(e))return e;if($_e(e))return!1;throw Error("non exhaustive match")}}),l=T_e(r,e=>{if(e=e.LONGER_ALT)return bCe(e)?T_e(e,e=>M_e(r,e)):[M_e(r,e)]}),c=T_e(r,e=>e.PUSH_MODE),h=T_e(r,e=>__e(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=zye(n.lineTerminatorCharacters);u=T_e(r,e=>!1),"onlyOffset"!==n.positionTracking&&(u=T_e(r,e=>__e(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===$ye(e,t)&&gye(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=T_e(r,Pye),p=T_e(a,Bye),g=U_e(r,(e,t)=>(t=t.GROUP,A_e(t)&&t!==_7e.SKIPPED&&(e[t]=[]),e),{}),f=T_e(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:o[t],push:c[t],pop:h[t],tokenTypeIdx:s[t],tokenType:r[t]}))}),!0),y=[];return n.safeMode||t("First Char Optimization",()=>{y=U_e(r,(r,e,i)=>{if("string"==typeof e.PATTERN){var t=jye(e.PATTERN.charCodeAt(0));qye(r,t,f[i])}else if(bCe(e.START_CHARS_HINT)){let t;u_e(e.START_CHARS_HINT,e=>{e=jye("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,qye(r,e,f[i]))})}else B_e(e.PATTERN)?e.PATTERN.unicode?(m=!1,n.ensureOptimizations&&qme(d7e+` Unable to analyze < ${e.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(t=lye(e.PATTERN,n.ensureOptimizations),P_e(t)&&(m=!1),u_e(t,e=>{qye(r,e,f[i])})):(n.ensureOptimizations&&qme(d7e+` TokenType: <${e.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:m}}function mye(e,t){let r=[],i=vye(e);r=r.concat(i.errors);var n=(e=bye(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(yye(n))).concat(Sye(n))).concat(Eye(n,t))).concat(_ye(n))}function yye(e){let t=[],r=m_e(e,e=>B_e(e[g7e]));return t=(t=(t=(t=(t=t.concat(xye(r))).concat(kye(r))).concat(wye(r))).concat(Cye(r))).concat(Tye(r))}function vye(e){var t=m_e(e,e=>!__e(e,g7e));return{errors:T_e(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:S7e.MISSING_PATTERN,tokenTypes:[e]})),valid:s_e(e,t)}}function bye(e){var t=m_e(e,e=>(e=e[g7e],!(B_e(e)||BCe(e)||__e(e,"exec")||A_e(e))));return{errors:T_e(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:S7e.INVALID_PATTERN,tokenTypes:[e]})),valid:s_e(e,t)}}function xye(e){class i extends rCe{static{mt(this,"EndAnchorFinder")}static{yt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=m_e(e,e=>{e=e.PATTERN;try{var t=sye(e),r=new i;return r.visit(t),r.found}catch{return y7e.test(e.source)}}),T_e(e,e=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:S7e.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Tye(e){return e=m_e(e,e=>e.PATTERN.test("")),T_e(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:S7e.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function kye(e){class i extends rCe{static{mt(this,"StartAnchorFinder")}static{yt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=m_e(e,e=>{e=e.PATTERN;try{var t=sye(e),r=new i;return r.visit(t),r.found}catch{return v7e.test(e.source)}}),T_e(e,e=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:S7e.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function wye(e){return e=m_e(e,e=>(e=e[g7e])instanceof RegExp&&(e.multiline||e.global)),T_e(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:S7e.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Cye(e){let i=[],t=T_e(e,r=>U_e(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||N_e(i,t)||t.PATTERN===_7e.NA||(i.push(t),e.push(t)),e),[]));t=xEe(t);var r=m_e(t,e=>1{var t=T_e(e,e=>e.name);return{message:`The same RegExp pattern ->${b_e(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:S7e.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Sye(e){return e=m_e(e,e=>!!__e(e,"GROUP")&&(e=e.GROUP)!==_7e.SKIPPED&&e!==_7e.NA&&!A_e(e)),T_e(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:S7e.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function Eye(e,t){return e=m_e(e,e=>void 0!==e.PUSH_MODE&&!N_e(t,e.PUSH_MODE)),T_e(e,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:S7e.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function _ye(e){let a=[],t=U_e(e,(e,t,r)=>{var i=t.PATTERN;return i!==_7e.NA&&(A_e(i)?e.push({str:i,idx:r,tokenType:t}):B_e(i)&&Rye(i)&&e.push({str:i.source,idx:r,tokenType:t})),e},[]);return u_e(e,(i,n)=>{u_e(t,({str:e,idx:t,tokenType:r})=>{n${r.name}<- can never be matched. Because it appears AFTER the Token Type ->${i.name}<-in the lexer's definition. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:t,type:S7e.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function Aye(e,t){var r;if(B_e(t))return!Lye(t)&&null!==(r=t.exec(e))&&0===r.index;if(BCe(t))return t(e,0,[],{});if(__e(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Rye(t){return void 0===v_e([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function Lye(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition `,type:S7e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),__e(e,"modes")||n.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:S7e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),__e(e,"modes")&&__e(e,f7e)&&!__e(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${f7e}: <${e.defaultMode}>which does not exist `,type:S7e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),__e(e,"modes")&&u_e(e.modes,(r,i)=>{u_e(r,(t,e)=>{$_e(t)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${e}> `,type:S7e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):__e(t,"LONGER_ALT")&&(e=bCe(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],u_e(e,e=>{$_e(e)||N_e(r,e)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${e.name}> on token <${t.name}> outside of mode <${i}> `,type:S7e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function Mye(e,t,r){let i=[],n=!1,a=xEe(bSe(L_e(e.modes))),s=G_e(a,e=>e[g7e]===_7e.NA),o=zye(r);return t&&u_e(s,e=>{var t=$ye(e,o);!1!==t?(t={message:Fye(e,t),type:t.issue,tokenType:e},i.push(t)):__e(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(n=!0):gye(o,e.PATTERN)&&(n=!0)}),t&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS for details.`,type:S7e.NO_LINE_BREAKS_FLAGS}),i}function Oye(r){let i={},e=$6e(r);return u_e(e,e=>{var t=r[e];if(!bCe(t))throw Error("non exhaustive match");i[e]=[]}),i}function Pye(e){if(e=e.PATTERN,B_e(e))return!1;if(BCe(e))return!0;if(__e(e,"exec"))return!0;if(A_e(e))return!1;throw Error("non exhaustive match")}function Bye(e){return!(!A_e(e)||1!==e.length)&&e.charCodeAt(0)}function $ye(e,t){if(__e(e,"LINE_BREAKS"))return!1;if(B_e(e.PATTERN)){try{gye(t,e.PATTERN)}catch(e){return{issue:S7e.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(A_e(e.PATTERN))return!1;if(Pye(e))return{issue:S7e.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Fye(e,t){if(t.issue===S7e.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${e.name}> Token Type Root cause: ${t.errMsg}. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===S7e.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${e.name}> Token Type For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function zye(e){return T_e(e,e=>A_e(e)?e.charCodeAt(0):e)}function qye(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function jye(e){return e{e.isParent=0e.CATEGORIES)));var n=s_e(r,t);t=t.concat(n),P_e(n)?i=!1:r=n}return t}function Hye(e){u_e(e,e=>{Qye(e)||((w7e[k7e]=e).tokenTypeIdx=k7e++),Jye(e)&&!bCe(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Jye(e)||(e.CATEGORIES=[]),e2e(e)||(e.categoryMatches=[]),t2e(e)||(e.categoryMatchesMap={})})}function Xye(e){u_e(e,r=>{r.categoryMatches=[],u_e(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(w7e[t].tokenTypeIdx)})})}function Kye(e){u_e(e,e=>{Zye([],e)})}function Zye(r,i){u_e(r,e=>{i.categoryMatchesMap[e.tokenTypeIdx]=!0}),u_e(i.CATEGORIES,e=>{var t=r.concat(i);N_e(t,e)||Zye(t,e)})}function Qye(e){return __e(e,"tokenTypeIdx")}function Jye(e){return __e(e,"CATEGORIES")}function e2e(e){return __e(e,"categoryMatches")}function t2e(e){return __e(e,"categoryMatchesMap")}function r2e(e){return __e(e,"tokenTypeIdx")}function i2e(e){return n2e(e)?e.LABEL:e.name}function n2e(e){return A_e(e.LABEL)&&""!==e.LABEL}function a2e(e){return s2e(e)}function s2e(e){var t=e.pattern,r={};if(r.name=e.name,$_e(t)||(r.PATTERN=t),__e(e,A7e))throw`The parent property is no longer supported. See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return __e(e,R7e)&&(r.CATEGORIES=e[R7e]),Vye([r]),__e(e,L7e)&&(r.LABEL=e[L7e]),__e(e,I7e)&&(r.GROUP=e[I7e]),__e(e,D7e)&&(r.POP_MODE=e[D7e]),__e(e,N7e)&&(r.PUSH_MODE=e[N7e]),__e(e,M7e)&&(r.LONGER_ALT=e[M7e]),__e(e,O7e)&&(r.LINE_BREAKS=e[O7e]),__e(e,P7e)&&(r.START_CHARS_HINT=e[P7e]),r}function o2e(e,t,r,i,n,a,s,o){return{image:t,startOffset:r,endOffset:i,startLine:n,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function l2e(e,t){return Uye(e,t)}function c2e(e,t){return(e=new q7e(e,t)).resolveRefs(),e.errors}function h2e(t,r,i=[]){i=bEe(i);let n=[],a=0;function s(e){return e.concat(l_e(t,a+1))}function o(e){return e=h2e(s(e),r,i),n.concat(e)}for(mt(s,"remainingPathWith"),yt(s,"remainingPathWith"),mt(o,"getAlternativesForProd"),yt(o,"getAlternativesForProd");i.length{!1===P_e(e.definition)&&(n=o(e.definition))}),n;if(!(e instanceof o7e))throw Error("non exhaustive match");i.push(e.terminalType)}}a++}return n.push({partialPath:i,suffixDef:l_e(t,a)}),n}function u2e(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=t.length,c=l-i-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!P_e(u);)if((v=u.pop())===s)o&&o_e(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!P_e(d)){var m=d[0];if(m===n)v={idx:p,def:l_e(d),ruleStack:c_e(g),occurrenceStack:c_e(f)},u.push(v);else if(m instanceof o7e)if(pg_e(e,e=>1===e.length));if(e)return function(e){var r=T_e(e,e=>e.GATE);for(let t=0;tbSe(e)),t=U_e(e,(t,e,r)=>(u_e(e,e=>{__e(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),u_e(e.categoryMatches,e=>{__e(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function v2e(n,a,r){let e=g_e(n,e=>1===e.length),s=n.length;if(!e||r)return function(){e:for(let e=0;e(t[e.tokenTypeIdx]=!0,u_e(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function b2e(t){var r=new Array(t);for(let e=0;eh2e([e],1)),n=b2e(t.length),a=T_e(t,e=>{let t={};return u_e(e,e=>{e=x2e(e.partialPath),u_e(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=i;r++){var o=s;s=b2e(o.length);for(let t=0;t{e=x2e(e.partialPath),u_e(e,e=>{a[t][e]=!0})})}}}return n}function w2e(e,t,r,i){return e=new X7e(e,Y7e.ALTERNATION,i),t.accept(e),k2e(e.result,r)}function C2e(e,t,r,i){var n=new X7e(e,r),n=(t.accept(n),n.result),t=new H7e(t,e,r).startWalking();return k2e([new e7e({definition:n}),new e7e({definition:t})],i)}function S2e(t,r){e:for(let e=0;ee===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function _2e(e){return g_e(e,e=>g_e(e,e=>g_e(e,e=>P_e(e.categoryMatches))))}function A2e(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),T_e(e,e=>Object.assign({type:y8e.CUSTOM_LOOKAHEAD_VALIDATION},e))}function R2e(t,e,r,i){var n=k_e(t,e=>L2e(e,r)),e=W2e(t,e,r),a=k_e(t,e=>F2e(e,r)),s=k_e(t,e=>D2e(e,t,i,r));return n.concat(e,a,s)}function L2e(i,n){var e=new K7e,e=(i.accept(e),e.allProductions),e=C_e(e,I2e),e=j_e(e,e=>1{var t=b_e(e),e=n.buildDuplicateFoundError(i,e),r=Qme(t),e={message:e,type:y8e.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:t.idx};return(r=N2e(t))&&(e.parameter=r),e})}function I2e(e){return`${Qme(e)}_#_${e.idx}_#_`+N2e(e)}function N2e(e){return e instanceof o7e?e.terminalType.name:e instanceof Q_e?e.nonTerminalName:""}function D2e(r,e,t,i){var n=[];return 1t.name===r.name?e+1:e,0)&&(e=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),n.push({message:e,type:y8e.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function M2e(e,t,r){var i=[];return N_e(t,e)||i.push({message:`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:y8e.INVALID_RULE_OVERRIDE,ruleName:e}),i}function O2e(r,e,i,n=[]){var t,a=[],e=P2e(e.definition);return P_e(e)?[]:(t=r.name,N_e(e,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:y8e.LEFT_RECURSION,ruleName:t}),t=s_e(e,n.concat([r])),e=k_e(t,e=>{var t=bEe(n);return t.push(e),O2e(r,e,i,t)}),a.concat(e))}function P2e(e){let t=[];if(P_e(e))return t;if((r=b_e(e))instanceof Q_e)t.push(r.referencedRule);else if(r instanceof e7e||r instanceof t7e||r instanceof r7e||r instanceof i7e||r instanceof a7e||r instanceof n7e)t=t.concat(P2e(r.definition));else if(r instanceof s7e)t=bSe(T_e(r.definition,e=>P2e(e.definition)));else if(!(r instanceof o7e))throw Error("non exhaustive match");var r=Kme(r),i=1{var e=c_e(r.definition);return k_e(e,(e,t)=>(e=u2e([e],[],Uye,1),P_e(e)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:t}),type:y8e.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:t+1}]:[]))})}function $2e(i,n,a){var e=new Z7e,e=(i.accept(e),e.alternations),e=G_e(e,e=>!0===e.ignoreAmbiguities);return k_e(e,e=>{var t=q2e(r=w2e(e.idx,i,e.maxLookahead||n,e),e,i,a),r=j2e(r,e,i,a);return t.concat(r)})}function F2e(t,r){var e=new Z7e,e=(t.accept(e),e.alternations);return k_e(e,e=>255{var e=new Q7e,e=(i.accept(e),e.allProductions);u_e(e,e=>{var t=p2e(e),r=e.maxLookahead||n,t=C2e(e.idx,i,t,r)[0];P_e(bSe(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:e}),s.push({message:r,type:y8e.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function q2e(a,s,r,i){let o=[],e=U_e(a,(e,t,n)=>(!0!==s.definition[n].ignoreAmbiguities&&u_e(t,r=>{let i=[n];u_e(a,(e,t)=>{n!==t&&S2e(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&i.push(t)}),1{var t=T_e(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:y8e.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function j2e(e,n,a,s){let o=U_e(e,(e,t,r)=>(t=T_e(t,e=>({idx:r,path:e})),e.concat(t)),[]);return xEe(k_e(o,e=>{if(!0===n.definition[e.idx].ignoreAmbiguities)return[];let i=e.idx,t=e.path,r=m_e(o,e=>!0!==n.definition[e.idx].ignoreAmbiguities&&e.idx{var t=[e.idx+1,i+1],r=0===n.idx?"":n.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:n,ambiguityIndices:t,prefixPath:e.path}),type:y8e.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function W2e(e,t,r){let i=[],n=T_e(t,e=>e.name);return u_e(e,e=>{var t=e.name;N_e(n,t)&&(e=r.buildNamespaceConflictError(e),i.push({message:e,type:y8e.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),i}function U2e(e){let t=r_e(e,{errMsgProvider:F7e}),r={};return u_e(e.rules,e=>{r[e.name]=e}),c2e(r,t.errMsgProvider)}function G2e(e){return R2e((e=r_e(e,{errMsgProvider:z7e})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function V2e(e){return N_e(J7e,e.name)}function Y2e(e,t,r,i,n,a,s){let o=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[o],c=(void 0===l&&(i=this.getCurrRuleFullName(),i=this.getGAstProductions()[i],l=new a(i,n).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=B7e,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}function H2e(e,t,r){return r|t|e}function X2e(e){return l8e.reset(),e.accept(l8e),e=l8e.dslMethods,l8e.reset(),e}function K2e(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsete.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: `+e.join(` `).replace(/\n/g,` `))},"validateVisitor")});return r.prototype=e,(r.prototype.constructor=r)._RULE_NAMES=t,r}function ive(e,t,r){var i=yt(function(){},"derivedConstructor");eve(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return u_e(t,e=>{n[e]=tve}),i.prototype=n,i.prototype.constructor=i}function nve(e,t){return ave(e,t)}function ave(t,e){return e=m_e(e,e=>!1===BCe(t[e])),e=T_e(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:c8e.MISSING_METHOD,methodName:e})),xEe(e)}function sve(e,t,r,i=!1){cve(r);var n=o_e(this.recordingProdStack),a=BCe(t)?t:t.DEF,e=new e({definition:[],idx:r});return i&&(e.separator=t.SEP),__e(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),n.definition.push(e),this.recordingProdStack.pop(),h8e}function ove(e,t){cve(t);let r=o_e(this.recordingProdStack),i=!1===bCe(e),n=0==i?e:e.DEF,a=new s7e({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});return __e(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=Y_e(n,e=>BCe(e.GATE)),a.hasPredicates=t,r.definition.push(a),u_e(n,e=>{var t=new e7e({definition:[]});a.definition.push(t),__e(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:__e(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),h8e}function lve(e){return 0===e?"":""+e}function cve(e){if(e<0||u8e Idx value must be a none negative value smaller than `+(u8e+1))).KNOWN_RECORDER_ERROR=!0,e}function hve(n,e){e.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(e=>{var t;"constructor"!==e&&((t=Object.getOwnPropertyDescriptor(i,e))&&(t.get||t.set)?Object.defineProperty(n.prototype,e,t):n.prototype[e]=r.prototype[e])})})}function uve(e=void 0){return function(){return e}}function dve(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++rlxe(t,r,e)));return xxe(t,r,i,e,...n)}function gxe(e,t,r){var i=_xe(e,t,r,{type:URe});return bxe(e,i),vxe(e,t,r,xxe(e,t,i,r,fxe(e,t,r)))}function fxe(t,r,e){return 1===(e=WRe(qRe(e.definition,e=>lxe(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:kxe(t,e)}function mxe(e,t,r,i,n){var a=i.left,i=i.right,s=_xe(e,t,r,{type:QRe}),o=(bxe(e,s),_xe(e,t,r,{type:JRe}));return a.loopback=s,o.loopback=s,Exe(i,e.decisionMap[axe(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(Exe(s,a),Exe(s,o)):(Exe(s,o),Exe(s,n.left),Exe(n.right,a)),{left:a,right:o}}function yxe(e,t,r,i,n){var a=i.left,i=i.right,s=_xe(e,t,r,{type:ZRe}),o=(bxe(e,s),_xe(e,t,r,{type:JRe})),l=_xe(e,t,r,{type:KRe});return s.loopback=l,o.loopback=l,Exe(s,a),Exe(s,o),Exe(i,l),void 0!==n?(Exe(l,o),Exe(l,n.left),Exe(n.right,a)):Exe(l,s),{left:e.decisionMap[axe(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function vxe(e,t,r,i){var n=i.left;return Exe(n,i.right),e.decisionMap[axe(t,"Option",r.idx)]=n,i}function bxe(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function xxe(e,t,r,i,...n){var a,s=_xe(e,t,i,{type:XRe,start:r});r.end=s;for(a of n)void 0!==a?(Exe(r,a.left),Exe(a.right,s)):Exe(r,s);return n={left:r,right:s},e.decisionMap[axe(t,Txe(i),i.idx)]=r,n}function Txe(e){if(e instanceof s7e)return"Alternation";if(e instanceof t7e)return"Option";if(e instanceof n7e)return"Repetition";if(e instanceof a7e)return"RepetitionWithSeparator";if(e instanceof r7e)return"RepetitionMandatory";if(e instanceof i7e)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function kxe(t,r){var i=r.length;for(let e=0;ee.stateNumber.toString()).join("_")}function Ixe(e,t,r){for(var i=-1,n=e.length;++i{let t=e.toString(),r=a[t];return void 0===r&&(r={atnStartState:i,decision:n,states:{}},a[t]=r),r}}function t4e(e,t=!0){var r,i=new Set;for(r of e){var n,a,s=new Set;for(n of r){if(void 0===n){if(t)break;return!1}for(a of[n.tokenTypeIdx].concat(n.categoryMatches))if(i.has(a)){if(!s.has(a))return!1}else i.add(a),s.add(a)}}return!0}function r4e(t){var r=t.decisionStates.length,i=Array(r);for(let e=0;ei2e(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${l4e(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. `+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`}function l4e(e){if(e instanceof Q_e)return"SUBRULE";if(e instanceof t7e)return"OPTION";if(e instanceof s7e)return"OR";if(e instanceof r7e)return"AT_LEAST_ONE";if(e instanceof i7e)return"AT_LEAST_ONE_SEP";if(e instanceof a7e)return"MANY_SEP";if(e instanceof n7e)return"MANY";if(e instanceof o7e)return"CONSUME";throw Error("non exhaustive match")}function c4e(e,t,r){return t=dLe(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:wLe(t.filter(e=>e instanceof tLe).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function h4e(e,t){return e.edges[t.tokenTypeIdx]}function u4e(e,t,r){var i,n=new aLe,a=[];for(i of e.elements)if(!1!==r.is(i.alt))if(i.state.type===HRe)a.push(i);else{var s=i.state.transitions.length;for(let e=0;er.has(e));for(var n of i){var a={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(n,L4e(a,n.definition))}var s;for(s of Pde(t.rules).filter(ype).filter(e=>r.has(e)))e.parser.rule(s,R4e(e,s))}function R4e(r,e){let t=e.call.rule.ref;if(!t)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if($pe(t))throw new Error("Cannot use terminal rule in infix expression");let i=e.operators.precedences.flatMap(e=>e.operators),n={$type:"Group",elements:[]},a={$container:n,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},s={$container:n,$type:"Group",elements:[],cardinality:"*"},o=(n.elements.push(a,s),{$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:i}}),l={...a,$container:s},c=(s.elements.push(o,l),i.map(e=>r.tokens[e.value]).map((e,t)=>({ALT:yt(()=>r.parser.consume(t,e,o),"ALT")}))),h;return e=>{h=h??j4e(r,t),r.parser.subrule(0,h,!1,a,e),r.parser.many(0,{DEF:yt(()=>{r.parser.alternatives(0,c),r.parser.subrule(1,h,!1,l,e)},"DEF")})}}function L4e(t,r,e=!1){let i;if(Tpe(r))i=z4e(t,r);else if(tpe(r))i=I4e(t,r);else if(ape(r))i=L4e(t,r.terminal);else if(hpe(r))i=F4e(t,r);else if(Npe(r))i=N4e(t,r);else if(rpe(r))i=O4e(t,r);else if(Upe(r))i=P4e(t,r);else if(fpe(r))i=B4e(t,r);else{if(!dpe(r))throw new Hwe(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;i=yt(()=>t.parser.consume(e,B7e,r),"method")}}return q4e(t,e?void 0:$4e(r),i,r.cardinality)}function I4e(e,t){let r=J0e(t);return()=>e.parser.action(r,t)}function N4e(a,s){let o=s.rule.ref;if(Qde(o)){let t=a.subrule++,r=Ape(o)&&o.fragment,i=0({}),n;return e=>{n=n??j4e(a,o),a.parser.subrule(t,n,r,s,i(e))}}if($pe(o)){let e=a.consume++,t=U4e(a,o.name);return()=>a.parser.consume(e,t,s)}if(!o)throw new Hwe(s.$cstNode,"Undefined rule: "+s.rule.$refText);g0e(o)}function D4e(s,e){if(e.some(e=>e.calledByName)){let n=e.map(e=>({parameterName:e.parameter?.ref?.name,predicate:M4e(e.value)}));return e=>{var t,r,i={};for({parameterName:t,predicate:r}of n)t&&(i[t]=r(e));return i}}{let a=e.map(e=>M4e(e.value));return t=>{var r,i,n={};for(let e=0;et(e)||r(e)}if(cpe(i)){let t=M4e(i.left),r=M4e(i.right);return e=>t(e)&&r(e)}if(Cpe(i)){let t=M4e(i.value);return e=>!t(e)}if(_pe(i)){let t=i.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(spe(i)){let e=!!i.true;return()=>e}g0e()}function O4e(r,i){if(1===i.elements.length)return L4e(r,i.elements[0]);{let e=[];for(var n of i.elements){var a={ALT:L4e(r,n,!0)};(n=$4e(n))&&(a.GATE=M4e(n)),e.push(a)}let t=r.or++;return i=>r.parser.alternatives(t,e.map(e=>{let t={ALT:yt(()=>e.ALT(i),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(i)),t}))}}function P4e(s,e){if(1===e.elements.length)return L4e(s,e.elements[0]);let t=[];for(var r of e.elements){var i={ALT:L4e(s,r,!0)};(r=$4e(r))&&(i.GATE=M4e(r)),t.push(i)}let o=s.or++,l=yt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),n=yt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:yt(()=>!0,"ALT")},i=s.parser,n=(e.ALT=()=>{var e;t.ALT(a),i.isRecording()||(e=l(o,i),i.unorderedGroups.get(e)||i.unorderedGroups.set(e,[]),"u"n(a):e.GATE=()=>!i.unorderedGroups.get(l(o,i))?.[r],e})),"alternatives"),a=q4e(s,$4e(e),n,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function B4e(t,e){let r=e.elements.map(e=>L4e(t,e));return t=>r.forEach(e=>e(t))}function $4e(e){if(fpe(e))return e.guardCondition}function F4e(n,a,s=a.terminal){if(s){if(Npe(s)&&Ape(s.rule.ref)){let t=s.rule.ref,r=n.subrule++,i;return e=>{i=i??j4e(n,t),n.parser.subrule(r,i,!1,a,e)}}if(Npe(s)&&$pe(s.rule.ref)){let e=n.consume++,t=U4e(n,s.rule.ref.name);return()=>n.parser.consume(e,t,a)}if(Tpe(s)){let e=n.consume++,t=U4e(n,s.value);return()=>n.parser.consume(e,t,a)}throw new Error("Could not build cross reference parser")}if(!a.type.ref)throw new Error("Could not resolve reference to type: "+a.type.$refText);if(s=j0e(a.type.ref)?.terminal)return F4e(n,a,s);throw new Error("Could not find name assignment for type: "+J0e(a.type.ref))}function z4e(e,t){let r=e.consume++,i=e.tokens[t.value];if(i)return()=>e.parser.consume(r,i,t);throw new Error("Could not find token for keyword: "+t.value)}function q4e(i,e,n,t){let a=e&&M4e(e);if(!t){if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:yt(()=>n(e),"ALT"),GATE:yt(()=>a(e),"GATE")},{ALT:uve(),GATE:yt(()=>!a(e),"GATE")}])}return n}if("*"===t){let t=i.many++;return e=>i.parser.many(t,{DEF:yt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}if("+"===t){let r=i.many++;if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:yt(()=>i.parser.atLeastOne(r,{DEF:yt(()=>n(e),"DEF")}),"ALT"),GATE:yt(()=>a(e),"GATE")},{ALT:uve(),GATE:yt(()=>!a(e),"GATE")}])}return e=>i.parser.atLeastOne(r,{DEF:yt(()=>n(e),"DEF")})}if("?"===t){let t=i.optional++;return e=>i.parser.optional(t,{DEF:yt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}g0e()}function j4e(e,t){if(t=W4e(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function W4e(i,n){if(Qde(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let e=n,t=e.$container,r=n.$type;for(;!Ape(t);)(fpe(t)||rpe(t)||Upe(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,i.ruleNames.set(n,r),r}}function U4e(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}function G4e(e){var t=e.Grammar,r=e.parser.Lexer;return _4e(t,e=new XLe(e),r.definition),e.finalize(),e}function V4e(e){return(e=Y4e(e)).finalize(),e}function Y4e(e){var t=e.Grammar,r=e.parser.Lexer;return _4e(t,new VLe(e),r.definition)}function H4e(){return new Promise(e=>{"u"r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function iTe(e){var t=rTe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function nTe(e){return"string"==typeof e.name}function aTe(e){return"string"==typeof e.$comment}function sTe(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}function oTe(e){return{code:e}}function lTe(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=P0e(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=F0e(e.node.$cstNode,e.keyword,e.index)),(t=t??e.node.$cstNode)?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function cTe(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function hTe(e){switch(e){case"error":return oTe(z9e.LexingError);case"warning":return oTe(z9e.LexingWarning);case"info":return oTe(z9e.LexingInfo);case"hint":return oTe(z9e.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function uTe(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function dTe(e){return e&&"modes"in e&&"defaultMode"in e}function pTe(e){return!uTe(e)&&!dTe(e)}function gTe(e,t,r){let i,n;return i="string"==typeof e?(n=t,r):(n=e.range.start,t),n=n||v5e.create(0,0),r=mTe(e),t=ATe(i),TTe({index:0,tokens:yTe({lines:r,position:n,options:t}),position:n})}function fTe(e,t){var r,i,t=ATe(t);return 0!==(e=mTe(e)).length&&(r=e[e.length-1],i=t.start,t=t.end,!!i?.exec(e[0]))&&!!t?.exec(r)}function mTe(e){return("string"==typeof e?e:e.text).split(iCe)}function yTe(a){let s=[],o=a.position.line,l=a.position.character;for(let n=0;n=r.length?0new cIe(e),"CommentProvider"),DocumentationProvider:yt(e=>new lIe(e),"DocumentationProvider")},parser:{AsyncParser:yt(e=>new hIe(e),"AsyncParser"),GrammarConfig:yt(e=>dge(e),"GrammarConfig"),LangiumParser:yt(e=>V4e(e),"LangiumParser"),CompletionParser:yt(e=>G4e(e),"CompletionParser"),ValueConverter:yt(()=>new e9e,"ValueConverter"),TokenBuilder:yt(()=>new JLe,"TokenBuilder"),Lexer:yt(e=>new J9e(e),"Lexer"),ParserErrorMessageProvider:yt(()=>new HLe,"ParserErrorMessageProvider"),LexerErrorMessageProvider:yt(()=>new Z9e,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:yt(()=>new W9e,"AstNodeLocator"),AstNodeDescriptionProvider:yt(e=>new q9e(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:yt(e=>new j9e(e),"ReferenceDescriptionProvider")},references:{Linker:yt(e=>new v9e(e),"Linker"),NameProvider:yt(()=>new b9e,"NameProvider"),ScopeProvider:yt(e=>new D9e(e),"ScopeProvider"),ScopeComputation:yt(e=>new w9e(e),"ScopeComputation"),References:yt(e=>new x9e(e),"References")},serializer:{Hydrator:yt(e=>new gIe(e),"Hydrator"),JsonSerializer:yt(e=>new M9e(e),"JsonSerializer")},validation:{DocumentValidator:yt(e=>new F9e(e),"DocumentValidator"),ValidationRegistry:yt(e=>new B9e(e),"ValidationRegistry")},shared:yt(()=>e.shared,"shared")}}function MTe(t){return{ServiceRegistry:yt(e=>new O9e(e),"ServiceRegistry"),workspace:{LangiumDocuments:yt(e=>new m9e(e),"LangiumDocuments"),LangiumDocumentFactory:yt(e=>new f9e(e),"LangiumDocumentFactory"),DocumentBuilder:yt(e=>new H9e(e),"DocumentBuilder"),IndexManager:yt(e=>new X9e(e),"IndexManager"),WorkspaceManager:yt(e=>new K9e(e),"WorkspaceManager"),FileSystemProvider:yt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:yt(()=>new pIe,"WorkspaceLock"),ConfigurationProvider:yt(e=>new G9e(e),"ConfigurationProvider")},profilers:{}}}function OTe(e,t,r,i,n,a,s,o,l){return BTe([e,t,r,i,n,a,s,o,l].reduce(FTe,{}))}function PTe(e){if(e&&e[mIe])for(var t of Object.values(e))PTe(t);return e}function BTe(r,i){let n=new Proxy({},{deleteProperty:yt(()=>!1,"deleteProperty"),set:yt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:yt((e,t)=>t===mIe||$Te(e,t,r,i||n),"get"),getOwnPropertyDescriptor:yt((e,t)=>($Te(e,t,r,i||n),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:yt((e,t)=>t in r,"has"),ownKeys:yt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return n}function $Te(e,t,r,i){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===yIe)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){r=r[t],e[t]=yIe;try{e[t]="function"==typeof r?r(i):BTe(r,i)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function FTe(e,t){if(t)for(var[r,i]of Object.entries(t)){var n;null!=i&&("object"==typeof i?(n=e[r],e[r]=FTe("object"==typeof n&&null!==n?n:{},i)):e[r]=i)}return e}function zTe(){var e=OTe(MTe(wIe),SIe),t=OTe(DTe({shared:e}),CIe);return e.ServiceRegistry.register(t),t}function qTe(e){var t=zTe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,h9e.parse(`memory:/${e.name??"grammar"}.langium`)),e}function jTe(e){return WNe.isInstance(e,jIe.$type)}function WTe(e){return WNe.isInstance(e,UIe.$type)}function UTe(e){return WNe.isInstance(e,HIe.$type)}function GTe(e){return"rmo"===e||"readmodel"===e||"ui"===e||"cmd"===e||"command"===e||"evt"===e||"event"===e||"pcr"===e||"processor"===e}function VTe(e){return WNe.isInstance(e,lNe.$type)}function YTe(e){return WNe.isInstance(e,fNe.$type)}function HTe(e){return WNe.isInstance(e,yNe.$type)}function XTe(e){return WNe.isInstance(e,wNe.$type)}function KTe(e){return WNe.isInstance(e,ENe.$type)}function ZTe(e){return WNe.isInstance(e,_Ne.$type)}function QTe(e){return WNe.isInstance(e,ANe.$type)}function JTe(e){return WNe.isInstance(e,RNe.$type)}function e5e(e){return WNe.isInstance(e,BNe.$type)}function t5e(e){return WNe.isInstance(e,qNe.$type)}var r5e,i5e,n5e,a5e,s5e,o5e,yt,l5e,c5e,h5e,u5e,d5e,p5e,g5e,f5e,m5e,y5e,v5e,b5e,x5e,T5e,k5e,w5e,C5e,S5e,E5e,_5e,A5e,R5e,L5e,I5e,N5e,D5e,M5e,O5e,P5e,B5e,$5e,F5e,z5e,q5e,j5e,W5e,U5e,G5e,V5e,Y5e,H5e,X5e,K5e,Z5e,Q5e,J5e,e3e,t3e,r3e,i3e,n3e,a3e,s3e,o3e,l3e,c3e,h3e,u3e,d3e,p3e,g3e,f3e,m3e,y3e,v3e,b3e,x3e,T3e,k3e,w3e,C3e,S3e,E3e,_3e,A3e,R3e,L3e,I3e,N3e,D3e,M3e,O3e,P3e,B3e,$3e,F3e,z3e,q3e,j3e,W3e,vt,U3e,G3e,V3e,Y3e,H3e,X3e,K3e,Z3e,Q3e,J3e,eke,tke,rke,ike,nke,ake,ske,oke,lke,cke,hke,uke,dke,pke,gke,fke,mke,yke,vke,bke,xke,Tke,kke,wke,Cke,Ske,Eke,_ke,Ake,Rke,Lke,Ike,Nke,Dke,Mke,Oke,Pke,Bke,$ke,Fke,zke,qke,jke,Wke,Uke,Gke,Vke,Yke,Hke,Xke,Kke,Zke,Qke,Jke,ewe,twe,rwe,iwe,nwe,awe,swe,owe,lwe,cwe,hwe,uwe,dwe,pwe,gwe,fwe,mwe,ywe,vwe,bwe,xwe,Twe,kwe,wwe,Cwe,Swe,Ewe,_we,Awe,Rwe,Lwe,Iwe,Nwe,Dwe,Mwe,Owe,Pwe,Bwe,$we,Fwe,zwe,qwe,jwe,Wwe,Uwe,Gwe,Vwe,Ywe,Hwe,Xwe,Kwe,Zwe,Qwe,Jwe,eCe,tCe,rCe,iCe,nCe,aCe,sCe,oCe,lCe,cCe,hCe,uCe,dCe,pCe,gCe,fCe,mCe,yCe,vCe,bCe,xCe,TCe,kCe,wCe,CCe,SCe,ECe,_Ce,ACe,RCe,LCe,ICe,NCe,DCe,MCe,OCe,PCe,BCe,$Ce,FCe,zCe,qCe,jCe,WCe,UCe,GCe,VCe,YCe,HCe,XCe,KCe,ZCe,QCe,JCe,e6e,t6e,r6e,i6e,n6e,a6e,s6e,o6e,l6e,c6e,h6e,u6e,d6e,p6e,g6e,f6e,m6e,y6e,v6e,b6e,x6e,T6e,k6e,w6e,C6e,S6e,E6e,_6e,A6e,R6e,L6e,I6e,N6e,D6e,M6e,O6e,P6e,B6e,$6e,F6e,z6e,q6e,j6e,W6e,U6e,G6e,V6e,Y6e,H6e,X6e,K6e,Z6e,Q6e,J6e,eSe,tSe,rSe,iSe,nSe,aSe,sSe,oSe,lSe,cSe,hSe,uSe,dSe,pSe,gSe,fSe,mSe,ySe,vSe,bSe,xSe,TSe,kSe,wSe,CSe,SSe,ESe,_Se,ASe,RSe,LSe,ISe,NSe,DSe,MSe,OSe,PSe,BSe,$Se,FSe,zSe,qSe,jSe,WSe,USe,GSe,VSe,YSe,HSe,XSe,KSe,ZSe,QSe,JSe,eEe,tEe,rEe,iEe,nEe,aEe,sEe,oEe,lEe,cEe,hEe,uEe,dEe,pEe,gEe,fEe,mEe,yEe,vEe,bEe,xEe,TEe,kEe,wEe,CEe,SEe,EEe,_Ee,AEe,REe,LEe,IEe,NEe,DEe,MEe,OEe,PEe,BEe,$Ee,FEe,zEe,qEe,jEe,WEe,UEe,GEe,VEe,YEe,HEe,XEe,KEe,ZEe,QEe,JEe,e_e,t_e,r_e,i_e,n_e,a_e,s_e,o_e,l_e,c_e,h_e,u_e,d_e,p_e,g_e,f_e,m_e,y_e,v_e,b_e,x_e,T_e,k_e,w_e,C_e,S_e,E_e,__e,A_e,R_e,L_e,I_e,N_e,D_e,M_e,O_e,P_e,B_e,$_e,F_e,z_e,q_e,j_e,W_e,U_e,G_e,V_e,Y_e,H_e,X_e,K_e,Z_e,Q_e,J_e,e7e,t7e,r7e,i7e,n7e,a7e,s7e,o7e,l7e,c7e,h7e,u7e,d7e,p7e,g7e,f7e,m7e,y7e,v7e,b7e,x7e,T7e,k7e,w7e,C7e,S7e,E7e,_7e,A7e,R7e,L7e,I7e,N7e,D7e,M7e,O7e,P7e,B7e,$7e,F7e,z7e,q7e,j7e,W7e,U7e,G7e,V7e,Y7e,H7e,X7e,K7e,Z7e,Q7e,J7e,e8e,t8e,r8e,i8e,n8e,a8e,s8e,o8e,l8e,c8e,h8e,u8e,d8e,p8e,g8e,f8e,m8e,y8e,v8e,b8e,x8e,T8e,k8e,w8e,F,C8e,S8e,E8e,_8e,A8e,R8e,L8e,I8e,N8e,D8e,M8e,O8e,P8e,B8e,$8e,F8e,z8e,q8e,j8e,W8e,U8e,G8e,V8e,Y8e,H8e,X8e,K8e,Z8e,Q8e,J8e,eAe,tAe,rAe,iAe,nAe,aAe,sAe,oAe,lAe,cAe,hAe,uAe,dAe,pAe,gAe,fAe,mAe,yAe,vAe,bAe,xAe,TAe,kAe,wAe,CAe,SAe,EAe,_Ae,AAe,RAe,LAe,IAe,NAe,DAe,MAe,OAe,PAe,BAe,$Ae,FAe,zAe,qAe,jAe,WAe,UAe,GAe,VAe,YAe,HAe,XAe,KAe,ZAe,QAe,JAe,eRe,tRe,rRe,iRe,nRe,aRe,sRe,oRe,lRe,cRe,hRe,uRe,dRe,pRe,gRe,fRe,mRe,yRe,vRe,bRe,xRe,TRe,kRe,wRe,CRe,SRe,ERe,_Re,ARe,RRe,LRe,IRe,NRe,DRe,MRe,ORe,PRe,BRe,$Re,FRe,zRe,qRe,jRe,WRe,URe,GRe,VRe,YRe,HRe,XRe,KRe,ZRe,QRe,JRe,eLe,tLe,rLe,iLe,nLe,aLe,sLe,oLe,lLe,cLe,hLe,uLe,dLe,pLe,gLe,fLe,mLe,yLe,vLe,bLe,xLe,TLe,kLe,wLe,CLe,SLe,ELe,_Le,ALe,RLe,LLe,ILe,NLe,DLe,MLe,OLe,PLe,BLe,$Le,FLe,zLe,qLe,jLe,WLe,ULe,GLe,VLe,YLe,HLe,XLe,KLe,ZLe,QLe,JLe,e9e,t9e,r9e,i9e,n9e,a9e,s9e,o9e,l9e,c9e,h9e,u9e,d9e,p9e,g9e,f9e,m9e,y9e,v9e,b9e,x9e,T9e,k9e,w9e,C9e,S9e,E9e,_9e,A9e,R9e,L9e,I9e,N9e,D9e,M9e,O9e,P9e,B9e,$9e,F9e,z9e,q9e,j9e,W9e,U9e,G9e,V9e,Y9e,H9e,X9e,K9e,Z9e,Q9e,J9e,eIe,tIe,rIe,iIe,nIe,aIe,sIe,oIe,lIe,cIe,hIe,uIe,dIe,pIe,gIe,fIe,mIe,yIe,vIe,bIe,xIe,TIe,z,kIe,wIe,CIe,SIe,EIe,_Ie,AIe,RIe,LIe,IIe,NIe,DIe,MIe,OIe,PIe,BIe,$Ie,FIe,zIe,qIe,jIe,WIe,UIe,GIe,VIe,YIe,HIe,XIe,KIe,ZIe,QIe,JIe,eNe,tNe,rNe,iNe,nNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,bNe,xNe,TNe,kNe,wNe,CNe,SNe,ENe,_Ne,ANe,RNe,LNe,INe,NNe,DNe,MNe,ONe,PNe,BNe,$Ne,FNe,zNe,qNe,jNe,WNe,UNe,GNe,VNe,YNe,HNe,XNe,KNe,ZNe,QNe,JNe,eDe,tDe,rDe,iDe,nDe,aDe,sDe,oDe,lDe,cDe,hDe,uDe,dDe,pDe,gDe,fDe,mDe,yDe,vDe,bDe,xDe,TDe,kDe,wDe,CDe,SDe,EDe,_De,ADe,RDe,LDe,IDe,NDe,DDe,MDe,ODe=r(()=>{function e(e){return e.reduce((e,t)=>e+t,0)}function t(e){return e.reduce((e,t)=>e*t,0)}function r(e){return e.reduce((e,t)=>Math.min(e,t))}function i(e){return e.reduce((e,t)=>Math.max(e,t))}r5e=Object.create,i5e=Object.defineProperty,n5e=Object.getOwnPropertyDescriptor,a5e=Object.getOwnPropertyNames,s5e=Object.getPrototypeOf,o5e=Object.prototype.hasOwnProperty,yt=mt((e,t)=>i5e(e,"name",{value:t,configurable:!0}),"__name"),Mke=mt((e,t)=>mt(function(){return t=e?(0,e[a5e(e)[0]])(e=0):t},"__init"),"__esm"),Oke=mt((e,t)=>mt(function(){return t||(0,e[a5e(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),l5e=mt((e,t)=>{for(var r in t)i5e(e,r,{get:t[r],enumerable:!0})},"__export"),c5e=mt((t,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of a5e(r))o5e.call(t,e)||e===i||i5e(t,e,{get:mt(()=>r[e],"get"),enumerable:!(n=n5e(r,e))||n.enumerable});return t},"__copyProps"),h5e=mt((e,t,r)=>(c5e(e,t,"default"),r&&c5e(r,t,"default")),"__reExport"),u5e=mt((e,t,r)=>(r=null!=e?r5e(s5e(e)):{},c5e(!t&&e&&e.__esModule?r:i5e(r,"default",{value:e,enumerable:!0}),e)),"__toESM"),d5e=mt(e=>c5e(i5e({},"__esModule",{value:!0}),e),"__toCommonJS"),l5e(p5e={},{AnnotatedTextEdit:mt(()=>P5e,"AnnotatedTextEdit"),ChangeAnnotation:mt(()=>M5e,"ChangeAnnotation"),ChangeAnnotationIdentifier:mt(()=>O5e,"ChangeAnnotationIdentifier"),CodeAction:mt(()=>b3e,"CodeAction"),CodeActionContext:mt(()=>v3e,"CodeActionContext"),CodeActionKind:mt(()=>m3e,"CodeActionKind"),CodeActionTriggerKind:mt(()=>y3e,"CodeActionTriggerKind"),CodeDescription:mt(()=>L5e,"CodeDescription"),CodeLens:mt(()=>x3e,"CodeLens"),Color:mt(()=>k5e,"Color"),ColorInformation:mt(()=>w5e,"ColorInformation"),ColorPresentation:mt(()=>C5e,"ColorPresentation"),Command:mt(()=>N5e,"Command"),CompletionItem:mt(()=>i3e,"CompletionItem"),CompletionItemKind:mt(()=>Z5e,"CompletionItemKind"),CompletionItemLabelDetails:mt(()=>r3e,"CompletionItemLabelDetails"),CompletionItemTag:mt(()=>J5e,"CompletionItemTag"),CompletionList:mt(()=>n3e,"CompletionList"),CreateFile:mt(()=>$5e,"CreateFile"),DeleteFile:mt(()=>z5e,"DeleteFile"),Diagnostic:mt(()=>I5e,"Diagnostic"),DiagnosticRelatedInformation:mt(()=>_5e,"DiagnosticRelatedInformation"),DiagnosticSeverity:mt(()=>A5e,"DiagnosticSeverity"),DiagnosticTag:mt(()=>R5e,"DiagnosticTag"),DocumentHighlight:mt(()=>h3e,"DocumentHighlight"),DocumentHighlightKind:mt(()=>c3e,"DocumentHighlightKind"),DocumentLink:mt(()=>k3e,"DocumentLink"),DocumentSymbol:mt(()=>f3e,"DocumentSymbol"),DocumentUri:mt(()=>g5e,"DocumentUri"),EOL:mt(()=>q3e,"EOL"),FoldingRange:mt(()=>E5e,"FoldingRange"),FoldingRangeKind:mt(()=>S5e,"FoldingRangeKind"),FormattingOptions:mt(()=>T3e,"FormattingOptions"),Hover:mt(()=>s3e,"Hover"),InlayHint:mt(()=>D3e,"InlayHint"),InlayHintKind:mt(()=>I3e,"InlayHintKind"),InlayHintLabelPart:mt(()=>N3e,"InlayHintLabelPart"),InlineCompletionContext:mt(()=>F3e,"InlineCompletionContext"),InlineCompletionItem:mt(()=>O3e,"InlineCompletionItem"),InlineCompletionList:mt(()=>P3e,"InlineCompletionList"),InlineCompletionTriggerKind:mt(()=>B3e,"InlineCompletionTriggerKind"),InlineValueContext:mt(()=>L3e,"InlineValueContext"),InlineValueEvaluatableExpression:mt(()=>R3e,"InlineValueEvaluatableExpression"),InlineValueText:mt(()=>_3e,"InlineValueText"),InlineValueVariableLookup:mt(()=>A3e,"InlineValueVariableLookup"),InsertReplaceEdit:mt(()=>e3e,"InsertReplaceEdit"),InsertTextFormat:mt(()=>Q5e,"InsertTextFormat"),InsertTextMode:mt(()=>t3e,"InsertTextMode"),Location:mt(()=>x5e,"Location"),LocationLink:mt(()=>T5e,"LocationLink"),MarkedString:mt(()=>a3e,"MarkedString"),MarkupContent:mt(()=>K5e,"MarkupContent"),MarkupKind:mt(()=>X5e,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:mt(()=>Y5e,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:mt(()=>o3e,"ParameterInformation"),Position:mt(()=>v5e,"Position"),Range:mt(()=>b5e,"Range"),RenameFile:mt(()=>F5e,"RenameFile"),SelectedCompletionInfo:mt(()=>$3e,"SelectedCompletionInfo"),SelectionRange:mt(()=>w3e,"SelectionRange"),SemanticTokenModifiers:mt(()=>S3e,"SemanticTokenModifiers"),SemanticTokenTypes:mt(()=>C3e,"SemanticTokenTypes"),SemanticTokens:mt(()=>E3e,"SemanticTokens"),SignatureInformation:mt(()=>l3e,"SignatureInformation"),StringValue:mt(()=>M3e,"StringValue"),SymbolInformation:mt(()=>p3e,"SymbolInformation"),SymbolKind:mt(()=>u3e,"SymbolKind"),SymbolTag:mt(()=>d3e,"SymbolTag"),TextDocument:mt(()=>j3e,"TextDocument"),TextDocumentEdit:mt(()=>B5e,"TextDocumentEdit"),TextDocumentIdentifier:mt(()=>G5e,"TextDocumentIdentifier"),TextDocumentItem:mt(()=>H5e,"TextDocumentItem"),TextEdit:mt(()=>D5e,"TextEdit"),URI:mt(()=>f5e,"URI"),VersionedTextDocumentIdentifier:mt(()=>V5e,"VersionedTextDocumentIdentifier"),WorkspaceChange:mt(()=>U5e,"WorkspaceChange"),WorkspaceEdit:mt(()=>q5e,"WorkspaceEdit"),WorkspaceFolder:mt(()=>z3e,"WorkspaceFolder"),WorkspaceSymbol:mt(()=>g3e,"WorkspaceSymbol"),integer:mt(()=>m5e,"integer"),uinteger:mt(()=>y5e,"uinteger")}),U3e=Mke({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){b=g5e=g5e||{},mt(ft,"is"),yt(ft,"is"),b.is=ft,b=f5e=f5e||{},mt(gt,"is"),yt(gt,"is"),b.is=gt,(v=m5e=m5e||{}).MIN_VALUE=-2147483648,v.MAX_VALUE=2147483647,mt(pt,"is"),yt(pt,"is"),v.is=pt,(y=y5e=y5e||{}).MIN_VALUE=0,y.MAX_VALUE=2147483647,mt(dt,"is"),yt(dt,"is"),y.is=dt,b=v5e=v5e||{},mt(ht,"create"),yt(ht,"create"),b.create=ht,mt(ut,"is"),yt(ut,"is"),b.is=ut,b=b5e=b5e||{},mt(lt,"create"),yt(lt,"create"),b.create=lt,mt(ct,"is"),yt(ct,"is"),b.is=ct,b=x5e=x5e||{},mt(st,"create"),yt(st,"create"),b.create=st,mt(ot,"is"),yt(ot,"is"),b.is=ot,b=T5e=T5e||{},mt(nt,"create"),yt(nt,"create"),b.create=nt,mt(at,"is"),yt(at,"is"),b.is=at,b=k5e=k5e||{},mt(rt,"create"),yt(rt,"create"),b.create=rt,mt(it,"is"),yt(it,"is"),b.is=it,b=w5e=w5e||{},mt(et,"create"),yt(et,"create"),b.create=et,mt(tt,"is"),yt(tt,"is"),b.is=tt,b=C5e=C5e||{},mt(Qe,"create"),yt(Qe,"create"),b.create=Qe,mt(Je,"is"),yt(Je,"is"),b.is=Je,(b=S5e=S5e||{}).Comment="comment",b.Imports="imports",b.Region="region",b=E5e=E5e||{},mt(Ke,"create"),yt(Ke,"create"),b.create=Ke,mt(Ze,"is"),yt(Ze,"is"),b.is=Ze,b=_5e=_5e||{},mt(He,"create"),yt(He,"create"),b.create=He,mt(Xe,"is"),yt(Xe,"is"),b.is=Xe,(b=A5e=A5e||{}).Error=1,b.Warning=2,b.Information=3,b.Hint=4,(b=R5e=R5e||{}).Unnecessary=1,b.Deprecated=2,b=L5e=L5e||{},mt(Ye,"is"),yt(Ye,"is"),b.is=Ye,b=I5e=I5e||{},mt(Ge,"create"),yt(Ge,"create"),b.create=Ge,mt(Ve,"is"),yt(Ve,"is"),b.is=Ve,b=N5e=N5e||{},mt(We,"create"),yt(We,"create"),b.create=We,mt(Ue,"is"),yt(Ue,"is"),b.is=Ue,b=D5e=D5e||{},mt(Fe,"replace"),yt(Fe,"replace"),b.replace=Fe,mt(ze,"insert"),yt(ze,"insert"),b.insert=ze,mt(qe,"del"),yt(qe,"del"),b.del=qe,mt(je,"is"),yt(je,"is"),b.is=je,b=M5e=M5e||{},mt(Be,"create"),yt(Be,"create"),b.create=Be,mt($e,"is"),yt($e,"is"),b.is=$e,b=O5e=O5e||{},mt(Pe,"is"),yt(Pe,"is"),b.is=Pe,b=P5e=P5e||{},mt(Ne,"replace"),yt(Ne,"replace"),b.replace=Ne,mt(De,"insert"),yt(De,"insert"),b.insert=De,mt(Me,"del"),yt(Me,"del"),b.del=Me,mt(Oe,"is"),yt(Oe,"is"),b.is=Oe,b=B5e=B5e||{},mt(Le,"create"),yt(Le,"create"),b.create=Le,mt(Ie,"is"),yt(Ie,"is"),b.is=Ie,b=$5e=$5e||{},mt(Ae,"create"),yt(Ae,"create"),b.create=Ae,mt(Re,"is"),yt(Re,"is"),b.is=Re,b=F5e=F5e||{},mt(Ee,"create"),yt(Ee,"create"),b.create=Ee,mt(_e,"is"),yt(_e,"is"),b.is=_e,b=z5e=z5e||{},mt(Ce,"create"),yt(Ce,"create"),b.create=Ce,mt(Se,"is"),yt(Se,"is"),b.is=Se,b=q5e=q5e||{},mt(we,"is"),yt(we,"is"),b.is=we,j5e=class{static{mt(this,"TextEditChangeImpl")}static{yt(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,n;if(i=void 0===r?D5e.insert(e,t):O5e.is(r)?(n=r,P5e.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),P5e.insert(e,t,n)),this.edits.push(i),void 0!==n)return n}replace(e,t,r){let i,n;if(i=void 0===r?D5e.replace(e,t):O5e.is(r)?(n=r,P5e.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),P5e.replace(e,t,n)),this.edits.push(i),void 0!==n)return n}delete(e,t){let r,i;if(r=void 0===t?D5e.del(e):O5e.is(t)?(i=t,P5e.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),P5e.del(e,i)),this.edits.push(r),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},W5e=class{static{mt(this,"ChangeAnnotations")}static{yt(this,"ChangeAnnotations")}constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(O5e.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},U5e=class{static{mt(this,"WorkspaceChange")}static{yt(this,"WorkspaceChange")}constructor(r){this._textEditChanges=Object.create(null),void 0!==r?(this._workspaceEdit=r).documentChanges?(this._changeAnnotations=new W5e(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(e=>{var t;B5e.is(e)&&(t=new j5e(e.edits,this._changeAnnotations),this._textEditChanges[e.textDocument.uri]=t)})):r.changes&&Object.keys(r.changes).forEach(e=>{var t=new j5e(r.changes[e]);this._textEditChanges[e]=t}):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(r){if(Y5e.is(r)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let e={uri:r.uri,version:r.version},t=this._textEditChanges[e.uri];return t||(this._workspaceEdit.documentChanges.push({textDocument:e,edits:i=[]}),t=new j5e(i,this._changeAnnotations),this._textEditChanges[e.uri]=t),t}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let e=this._textEditChanges[r];var i;return e||(this._workspaceEdit.changes[r]=i=[],e=new j5e(i),this._textEditChanges[r]=e),e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new W5e,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i;M5e.is(t)||O5e.is(t)?i=t:r=t;let n,a;if(n=void 0===i?$5e.create(e,r):(a=O5e.is(i)?i:this._changeAnnotations.manage(i),$5e.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}renameFile(e,t,r,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n;M5e.is(r)||O5e.is(r)?n=r:i=r;let a,s;if(a=void 0===n?F5e.create(e,t,i):(s=O5e.is(n)?n:this._changeAnnotations.manage(n),F5e.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(a),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i;M5e.is(t)||O5e.is(t)?i=t:r=t;let n,a;if(n=void 0===i?z5e.create(e,r):(a=O5e.is(i)?i:this._changeAnnotations.manage(i),z5e.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}},b=G5e=G5e||{},mt(Te,"create"),yt(Te,"create"),b.create=Te,mt(ke,"is"),yt(ke,"is"),b.is=ke,b=V5e=V5e||{},mt(be,"create"),yt(be,"create"),b.create=be,mt(xe,"is"),yt(xe,"is"),b.is=xe,b=Y5e=Y5e||{},mt(ye,"create"),yt(ye,"create"),b.create=ye,mt(ve,"is"),yt(ve,"is"),b.is=ve,b=H5e=H5e||{},mt(fe,"create"),yt(fe,"create"),b.create=fe,mt(me,"is"),yt(me,"is"),b.is=me,(m=X5e=X5e||{}).PlainText="plaintext",m.Markdown="markdown",mt(ge,"is"),yt(ge,"is"),m.is=ge,b=K5e=K5e||{},mt(pe,"is"),yt(pe,"is"),b.is=pe,(b=Z5e=Z5e||{}).Text=1,b.Method=2,b.Function=3,b.Constructor=4,b.Field=5,b.Variable=6,b.Class=7,b.Interface=8,b.Module=9,b.Property=10,b.Unit=11,b.Value=12,b.Enum=13,b.Keyword=14,b.Snippet=15,b.Color=16,b.File=17,b.Reference=18,b.Folder=19,b.EnumMember=20,b.Constant=21,b.Struct=22,b.Event=23,b.Operator=24,b.TypeParameter=25,(b=Q5e=Q5e||{}).PlainText=1,b.Snippet=2,(J5e=J5e||{}).Deprecated=1,b=e3e=e3e||{},mt(ue,"create"),yt(ue,"create"),b.create=ue,mt(de,"is"),yt(de,"is"),b.is=de,(b=t3e=t3e||{}).asIs=1,b.adjustIndentation=2,b=r3e=r3e||{},mt(he,"is"),yt(he,"is"),b.is=he,b=i3e=i3e||{},mt(ce,"create"),yt(ce,"create"),b.create=ce,b=n3e=n3e||{},mt(le,"create"),yt(le,"create"),b.create=le,b=a3e=a3e||{},mt(se,"fromPlainText"),yt(se,"fromPlainText"),b.fromPlainText=se,mt(oe,"is"),yt(oe,"is"),b.is=oe,b=s3e=s3e||{},mt(ae,"is"),yt(ae,"is"),b.is=ae,b=o3e=o3e||{},mt(ne,"create"),yt(ne,"create"),b.create=ne,b=l3e=l3e||{},mt(ie,"create"),yt(ie,"create"),b.create=ie,(b=c3e=c3e||{}).Text=1,b.Read=2,b.Write=3,b=h3e=h3e||{},mt(re,"create"),yt(re,"create"),b.create=re,(b=u3e=u3e||{}).File=1,b.Module=2,b.Namespace=3,b.Package=4,b.Class=5,b.Method=6,b.Property=7,b.Field=8,b.Constructor=9,b.Enum=10,b.Interface=11,b.Function=12,b.Variable=13,b.Constant=14,b.String=15,b.Number=16,b.Boolean=17,b.Array=18,b.Object=19,b.Key=20,b.Null=21,b.EnumMember=22,b.Struct=23,b.Event=24,b.Operator=25,b.TypeParameter=26,(d3e=d3e||{}).Deprecated=1,b=p3e=p3e||{},mt(te,"create"),yt(te,"create"),b.create=te,b=g3e=g3e||{},mt(ee,"create"),yt(ee,"create"),b.create=ee,b=f3e=f3e||{},mt(Q,"create"),yt(Q,"create"),b.create=Q,mt(J,"is"),yt(J,"is"),b.is=J,(b=m3e=m3e||{}).Empty="",b.QuickFix="quickfix",b.Refactor="refactor",b.RefactorExtract="refactor.extract",b.RefactorInline="refactor.inline",b.RefactorRewrite="refactor.rewrite",b.Source="source",b.SourceOrganizeImports="source.organizeImports",b.SourceFixAll="source.fixAll",(b=y3e=y3e||{}).Invoked=1,b.Automatic=2,b=v3e=v3e||{},mt(K,"create"),yt(K,"create"),b.create=K,mt(Z,"is"),yt(Z,"is"),b.is=Z,b=b3e=b3e||{},mt(H,"create"),yt(H,"create"),b.create=H,mt(X,"is"),yt(X,"is"),b.is=X,b=x3e=x3e||{},mt(V,"create"),yt(V,"create"),b.create=V,mt(Y,"is"),yt(Y,"is"),b.is=Y,b=T3e=T3e||{},mt(U,"create"),yt(U,"create"),b.create=U,mt(G,"is"),yt(G,"is"),b.is=G,b=k3e=k3e||{},mt(j,"create"),yt(j,"create"),b.create=j,mt(W,"is"),yt(W,"is"),b.is=W,f=w3e=w3e||{},mt(z,"create"),yt(z,"create"),f.create=z,mt(q,"is"),yt(q,"is"),f.is=q,(b=C3e=C3e||{}).namespace="namespace",b.type="type",b.class="class",b.enum="enum",b.interface="interface",b.struct="struct",b.typeParameter="typeParameter",b.parameter="parameter",b.variable="variable",b.property="property",b.enumMember="enumMember",b.event="event",b.function="function",b.method="method",b.macro="macro",b.keyword="keyword",b.modifier="modifier",b.comment="comment",b.string="string",b.number="number",b.regexp="regexp",b.operator="operator",b.decorator="decorator",(b=S3e=S3e||{}).declaration="declaration",b.definition="definition",b.readonly="readonly",b.static="static",b.deprecated="deprecated",b.abstract="abstract",b.async="async",b.modification="modification",b.documentation="documentation",b.defaultLibrary="defaultLibrary",b=E3e=E3e||{},mt(F,"is"),yt(F,"is"),b.is=F,b=_3e=_3e||{},mt(B,"create"),yt(B,"create"),b.create=B,mt($,"is"),yt($,"is"),b.is=$,b=A3e=A3e||{},mt(O,"create"),yt(O,"create"),b.create=O,mt(P,"is"),yt(P,"is"),b.is=P,b=R3e=R3e||{},mt(D,"create"),yt(D,"create"),b.create=D,mt(M,"is"),yt(M,"is"),b.is=M,b=L3e=L3e||{},mt(I,"create"),yt(I,"create"),b.create=I,mt(N,"is"),yt(N,"is"),b.is=N,(b=I3e=I3e||{}).Type=1,b.Parameter=2,mt(L,"is"),yt(L,"is"),b.is=L,b=N3e=N3e||{},mt(A,"create"),yt(A,"create"),b.create=A,mt(R,"is"),yt(R,"is"),b.is=R,b=D3e=D3e||{},mt(E,"create"),yt(E,"create"),b.create=E,mt(_,"is"),yt(_,"is"),b.is=_,b=M3e=M3e||{},mt(S,"createSnippet"),yt(S,"createSnippet"),b.createSnippet=S,b=O3e=O3e||{},mt(C,"create"),yt(C,"create"),b.create=C,b=P3e=P3e||{},mt(w,"create"),yt(w,"create"),b.create=w,(b=B3e=B3e||{}).Invoked=0,b.Automatic=1,b=$3e=$3e||{},mt(k,"create"),yt(k,"create"),b.create=k,b=F3e=F3e||{},mt(T,"create"),yt(T,"create"),b.create=T,b=z3e=z3e||{},mt(x,"is"),yt(x,"is"),b.is=x,q3e=[` `,`\r `,"\r"],b=j3e=j3e||{},mt(i,"create"),yt(i,"create"),b.create=i,mt(d,"is"),yt(d,"is"),b.is=d,mt(p,"applyEdits"),yt(p,"applyEdits"),b.applyEdits=p,mt(g,"mergeSort2"),yt(g,"mergeSort"),W3e=class{static{mt(this,"FullTextDocument")}static{yt(this,"FullTextDocument")}constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],r=this._content,i=!0;for(let e=0;ee?i=n:r=n+1}var a=r-1;return v5e.create(a,e-t[a])}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],r=e.line+1{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),n=r.length;for(let e=i.length-1;0<=e;e--){var a=i[e],s=t.offsetAt(a.range.start),o=t.offsetAt(a.range.end);if(!(o<=n))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),n=s}return r}function g(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);g(s,n),g(o,n);let e=0,t=0,r=0;for(;evt.string(e.kind)?$5e.is(e)||F5e.is(e)||z5e.is(e):B5e.is(e)))}function Ce(e,t,r){return e={kind:"delete",uri:e},void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Se(e){return e&&"delete"===e.kind&&vt.string(e.uri)&&(void 0===e.options||(void 0===e.options.recursive||vt.boolean(e.options.recursive))&&(void 0===e.options.ignoreIfNotExists||vt.boolean(e.options.ignoreIfNotExists)))&&(void 0===e.annotationId||O5e.is(e.annotationId))}function Ee(e,t,r,i){return e={kind:"rename",oldUri:e,newUri:t},void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(e.options=r),void 0!==i&&(e.annotationId=i),e}function _e(e){return e&&"rename"===e.kind&&vt.string(e.oldUri)&&vt.string(e.newUri)&&(void 0===e.options||(void 0===e.options.overwrite||vt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||vt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||O5e.is(e.annotationId))}function Ae(e,t,r){return e={kind:"create",uri:e},void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(e.options=t),void 0!==r&&(e.annotationId=r),e}function Re(e){return e&&"create"===e.kind&&vt.string(e.uri)&&(void 0===e.options||(void 0===e.options.overwrite||vt.boolean(e.options.overwrite))&&(void 0===e.options.ignoreIfExists||vt.boolean(e.options.ignoreIfExists)))&&(void 0===e.annotationId||O5e.is(e.annotationId))}function Le(e,t){return{textDocument:e,edits:t}}function Ie(e){return vt.defined(e)&&Y5e.is(e.textDocument)&&Array.isArray(e.edits)}function Ne(e,t,r){return{range:e,newText:t,annotationId:r}}function De(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function Me(e,t){return{range:e,newText:"",annotationId:t}}function Oe(e){return D5e.is(e)&&(M5e.is(e.annotationId)||O5e.is(e.annotationId))}function Pe(e){return vt.string(e)}function Be(e,t,r){return e={label:e},void 0!==t&&(e.needsConfirmation=t),void 0!==r&&(e.description=r),e}function $e(e){return vt.objectLiteral(e)&&vt.string(e.label)&&(vt.boolean(e.needsConfirmation)||void 0===e.needsConfirmation)&&(vt.string(e.description)||void 0===e.description)}function Fe(e,t){return{range:e,newText:t}}function ze(e,t){return{range:{start:e,end:e},newText:t}}function qe(e){return{range:e,newText:""}}function je(e){return vt.objectLiteral(e)&&vt.string(e.newText)&&b5e.is(e.range)}function We(e,t,...r){return e={title:e,command:t},vt.defined(r)&&0r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),yt(t,"boolean"),e.boolean=t,mt(r,"string"),yt(r,"string"),e.string=r,mt(i,"number"),yt(i,"number"),e.number=i,mt(n,"error"),yt(n,"error"),e.error=n,mt(a,"func"),yt(a,"func"),e.func=a,mt(s,"array"),yt(s,"array"),e.array=s,mt(o,"stringArray"),yt(o,"stringArray"),e.stringArray=o}}),Y3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=G3e();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var n=class{static{mt(this,"CallbackList")}static{yt(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:yt(()=>this.remove(e,t),"dispose")})}remove(i,n=null){if(this._callbacks){let r=!1;for(let e=0,t=this._callbacks.length;e{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:yt(()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(t.Emitter=r)._noop=function(){}}}),H3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,i=G3e(),n=V3e(),a=Y3e();function s(e){return e&&(e===r.None||e===r.Cancelled||n.boolean(e.isCancellationRequested)&&!!e.onCancellationRequested)}(r=t||(e.CancellationToken=t={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),mt(s,"is"),yt(s,"is"),r.is=s;var o=Object.freeze(function(e,t){let r=(0,i.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=class{static{mt(this,"MutableToken")}static{yt(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{mt(this,"CancellationTokenSource3")}static{yt(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=c}}),X3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var i,n=V3e(),t=((t=i||(e.ErrorCodes=i={})).ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3,class c extends Error{static{mt(this,"_ResponseError")}static{yt(this,"ResponseError")}constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,c.prototype)}toJson(){var e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}),r=(e.ResponseError=t,class h{static{mt(this,"_ParameterStructures")}static{yt(this,"ParameterStructures")}constructor(e){this.kind=e}static is(e){return e===h.auto||e===h.byName||e===h.byPosition}toString(){return this.kind}}),t=((e.ParameterStructures=r).auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName"),class{static{mt(this,"AbstractMessageSignature")}static{yt(this,"AbstractMessageSignature")}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}}),a=(e.AbstractMessageSignature=t,class extends t{static{mt(this,"RequestType0")}static{yt(this,"RequestType0")}constructor(e){super(e,0)}}),a=(e.RequestType0=a,class extends t{static{mt(this,"RequestType")}static{yt(this,"RequestType")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.RequestType=a,class extends t{static{mt(this,"RequestType1")}static{yt(this,"RequestType1")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.RequestType1=a,class extends t{static{mt(this,"RequestType2")}static{yt(this,"RequestType2")}constructor(e){super(e,2)}}),a=(e.RequestType2=a,class extends t{static{mt(this,"RequestType3")}static{yt(this,"RequestType3")}constructor(e){super(e,3)}}),a=(e.RequestType3=a,class extends t{static{mt(this,"RequestType4")}static{yt(this,"RequestType4")}constructor(e){super(e,4)}}),a=(e.RequestType4=a,class extends t{static{mt(this,"RequestType5")}static{yt(this,"RequestType5")}constructor(e){super(e,5)}}),a=(e.RequestType5=a,class extends t{static{mt(this,"RequestType6")}static{yt(this,"RequestType6")}constructor(e){super(e,6)}}),a=(e.RequestType6=a,class extends t{static{mt(this,"RequestType7")}static{yt(this,"RequestType7")}constructor(e){super(e,7)}}),a=(e.RequestType7=a,class extends t{static{mt(this,"RequestType8")}static{yt(this,"RequestType8")}constructor(e){super(e,8)}}),a=(e.RequestType8=a,class extends t{static{mt(this,"RequestType9")}static{yt(this,"RequestType9")}constructor(e){super(e,9)}}),a=(e.RequestType9=a,class extends t{static{mt(this,"NotificationType")}static{yt(this,"NotificationType")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.NotificationType=a,class extends t{static{mt(this,"NotificationType0")}static{yt(this,"NotificationType0")}constructor(e){super(e,0)}}),a=(e.NotificationType0=a,class extends t{static{mt(this,"NotificationType1")}static{yt(this,"NotificationType1")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.NotificationType1=a,class extends t{static{mt(this,"NotificationType2")}static{yt(this,"NotificationType2")}constructor(e){super(e,2)}}),a=(e.NotificationType2=a,class extends t{static{mt(this,"NotificationType3")}static{yt(this,"NotificationType3")}constructor(e){super(e,3)}}),a=(e.NotificationType3=a,class extends t{static{mt(this,"NotificationType4")}static{yt(this,"NotificationType4")}constructor(e){super(e,4)}}),a=(e.NotificationType4=a,class extends t{static{mt(this,"NotificationType5")}static{yt(this,"NotificationType5")}constructor(e){super(e,5)}}),a=(e.NotificationType5=a,class extends t{static{mt(this,"NotificationType6")}static{yt(this,"NotificationType6")}constructor(e){super(e,6)}}),a=(e.NotificationType6=a,class extends t{static{mt(this,"NotificationType7")}static{yt(this,"NotificationType7")}constructor(e){super(e,7)}}),a=(e.NotificationType7=a,class extends t{static{mt(this,"NotificationType8")}static{yt(this,"NotificationType8")}constructor(e){super(e,8)}}),a=(e.NotificationType8=a,class extends t{static{mt(this,"NotificationType9")}static{yt(this,"NotificationType9")}constructor(e){super(e,9)}});function s(e){return e&&n.string(e.method)&&(n.string(e.id)||n.number(e.id))}function o(e){return e&&n.string(e.method)&&void 0===e.id}function l(e){return e&&(void 0!==e.result||!!e.error)&&(n.string(e.id)||n.number(e.id)||null===e.id)}e.NotificationType9=a,t=e.Message={},mt(s,"isRequest"),yt(s,"isRequest"),t.isRequest=s,mt(o,"isNotification"),yt(o,"isNotification"),t.isNotification=o,mt(l,"isResponse"),yt(l,"isResponse"),t.isResponse=l}}),K3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(r=n||(e.Touch=n={})).None=0,r.First=1,r.AsOld=r.First,r.Last=2,r.AsNew=r.Last;var t,n,r=class{static{mt(this,"LinkedMap")}static{yt(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){if(e=this._map.get(e))return t!==n.None&&this.touch(e,t),e.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;default:n.Last,this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(this._head||this._tail){var e;if(this._head&&this._tail)return e=this._head,this._map.delete(e.key),this.removeItem(e),this._size--,e.value;throw new Error("Invalid list")}}forEach(e,t){let r=this._state,i=this._head;for(;i;){if((t?e.bind(t):e)(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:yt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:r.key,done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}values(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:yt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:r.value,done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}entries(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:yt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:[r.key,r.value],done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(r){if(!(r>=this.size))if(0===r)this.clear();else{let e=this._head,t=this.size;for(;e&&t>r;)this._map.delete(e.key),e=e.next,t--;this._head=e,this._size=t,e&&(e.previous=void 0),this._state++}}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{var t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");(t.previous=r).next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");var r,i;t!==n.First&&t!==n.Last||(t===n.First?e!==this._head&&(i=e.next,r=e.previous,e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r).next=i,e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++):t===n.Last&&e!==this._tail&&(r=e.next,i=e.previous,e===this._head?(r.previous=void 0,this._head=r):(r.previous=i).next=r,e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++))}toJSON(){let r=[];return this.forEach((e,t)=>{r.push([t,e])}),r}fromJSON(e){this.clear();for(var[t,r]of e)this.set(t,r)}},r=(e.LinkedMap=r,class extends r{static{mt(this,"LRUCache")}static{yt(this,"LRUCache")}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}});e.LRUCache=r}}),Z3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){function t(e){return{dispose:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,e=e.Disposable={},mt(t,"create"),yt(t,"create"),e.create=t}}),Q3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var r,t=H3e(),i=((i=r={}).Continue=0,i.Cancelled=1,class{static{mt(this,"SharedArraySenderStrategy")}static{yt(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){var t;null!==e.id&&(t=new SharedArrayBuffer(4),new Int32Array(t,0,1)[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t)}async sendCancellation(e,t){void 0!==(t=this.buffers.get(t))&&(t=new Int32Array(t,0,1),Atomics.store(t,0,r.Cancelled))}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}),n=(e.SharedArraySenderStrategy=i,class{static{mt(this,"SharedArrayBufferCancellationToken")}static{yt(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}),a=class{static{mt(this,"SharedArrayBufferCancellationTokenSource")}static{yt(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new n(e)}cancel(){}dispose(){}},i=class{static{mt(this,"SharedArrayReceiverStrategy")}static{yt(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){return void 0===(e=e.$cancellationData)?new t.CancellationTokenSource:new a(e)}};e.SharedArrayReceiverStrategy=i}}),J3e=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=G3e(),r=class{static{mt(this,"Semaphore")}static{yt(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(r){return new Promise((e,t)=>{this._waiting.push({thunk:r,resolve:e,reject:t}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0!==this._waiting.length&&this._active!==this._capacity){let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{var e=t.thunk();e instanceof Promise?e.then(e=>{this._active--,t.resolve(e),this.runNext()},e=>{this._active--,t.reject(e),this.runNext()}):(this._active--,t.resolve(e),this.runNext())}catch(e){this._active--,t.reject(e),this.runNext()}}}};e.Semaphore=r}}),eke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var l=G3e(),t=V3e(),r=Y3e(),i=J3e();function n(e){return e&&t.func(e.listen)&&t.func(e.dispose)&&t.func(e.onError)&&t.func(e.onClose)&&t.func(e.onPartialMessage)}s=e.MessageReader={},mt(n,"is"),yt(n,"is"),s.is=n;var a,s=class{static{mt(this,"AbstractMessageReader")}static{yt(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error("Reader received error. Reason: "+(t.string(e.message)?e.message:"unknown"))}};function o(e){let t,r,i=new Map,n,a=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,i.set(r.name,r)),void 0!==e.contentDecoders)for(var s of e.contentDecoders)i.set(s.name,s);if(void 0!==e.contentTypeDecoder&&(n=e.contentTypeDecoder,a.set(n.name,n)),void 0!==e.contentTypeDecoders)for(var o of e.contentTypeDecoders)a.set(o.name,o)}return void 0===n&&(n=(0,l.default)().applicationJson.decoder,a.set(n.name,n)),{charset:t,contentDecoder:r,contentDecoders:i,contentTypeDecoder:n,contentTypeDecoders:a}}e.AbstractMessageReader=s,c=a={},mt(o,"fromOptions"),yt(o,"fromOptions"),c.fromOptions=o;var c=class extends s{static{mt(this,"ReadableStreamMessageReader")}static{yt(this,"ReadableStreamMessageReader")}constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,l.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){return this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e,e=this.readable.onData(e=>{this.onData(e)}),this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),e}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){var r=this.buffer.tryReadHeaders(!0);if(!r)return;var i=r.get("content-length");if(!i)return void this.fireError(new Error(`Header must provide a Content-Length property. `+JSON.stringify(Object.fromEntries(r))));var n=parseInt(i);if(isNaN(n))return void this.fireError(new Error("Content-Length value must be a number. Got "+i));this.nextMessageLength=n}let t=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{var e=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(t):t,e=await this.options.contentTypeDecoder.decode(e,this.options);this.callback(e)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,l.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=c}}),tke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=G3e(),r=V3e(),i=J3e(),n=Y3e();function a(e){return e&&r.func(e.dispose)&&r.func(e.onClose)&&r.func(e.onError)&&r.func(e.write)}o=e.MessageWriter={},mt(a,"is"),yt(a,"is"),o.is=a;var s,o=class{static{mt(this,"AbstractMessageWriter")}static{yt(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error("Writer received error. Reason: "+(r.string(e.message)?e.message:"unknown"))}};function l(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}e.AbstractMessageWriter=o,c=s={},mt(l,"fromOptions"),yt(l,"fromOptions"),c.fromOptions=l;var c=class extends o{static{mt(this,"WriteableStreamMessageWriter")}static{yt(this,"WriteableStreamMessageWriter")}constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(r){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(r,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(e=>{var t=[];return t.push("Content-Length: ",e.byteLength.toString(),`\r `),t.push(`\r `),this.doWrite(r,t,e)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=c}}),rke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=class{static{mt(this,"AbstractMessageBuffer")}static{yt(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){e="string"==typeof e?this.fromString(e,this._encoding):e,this._chunks.push(e),this._totalLength+=e.byteLength}tryReadHeaders(n=!1){if(0!==this._chunks.length){let e=0,t=0,r=0,i=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");var t,r;if(this._chunks[0].byteLength===e)return t=this._chunks[0],this._chunks.shift(),this._totalLength-=e,this.asNative(t);if(this._chunks[0].byteLength>e)return t=this._chunks[0],r=this.asNative(t,e),this._chunks[0]=t.slice(e),this._totalLength-=e,r;let i=this.allocNative(e),n=0;for(;0e?(a=s.slice(0,e),i.set(a,n),n+=e,this._chunks[0]=s.slice(e),this._totalLength-=e,e-=e):(i.set(s,n),n+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength)}return i}};e.AbstractMessageBuffer=t}}),ike=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(ue){Object.defineProperty(ue,"__esModule",{value:!0}),ue.createMessageConnection=ue.ConnectionOptions=ue.MessageStrategy=ue.CancellationStrategy=ue.CancellationSenderStrategy=ue.CancellationReceiverStrategy=ue.RequestCancellationReceiverStrategy=ue.IdCancellationReceiverStrategy=ue.ConnectionStrategy=ue.ConnectionError=ue.ConnectionErrors=ue.LogTraceNotification=ue.SetTraceNotification=ue.TraceFormat=ue.TraceValues=ue.Trace=ue.NullLogger=ue.ProgressType=ue.ProgressToken=void 0;var de,pe,ge,Re=G3e(),fe=V3e(),me=X3e(),Le=K3e(),ye=Y3e(),ve=H3e();function e(e){return"string"==typeof e||"number"==typeof e}(de={}).type=new me.NotificationType("$/cancelRequest"),i=pe||(ue.ProgressToken=pe={}),mt(e,"is"),yt(e,"is"),i.is=e,(ge={}).type=new me.NotificationType("$/progress");var Ie,be,t,xe,r,Te,ke,we,i=class{static{mt(this,"ProgressType")}static{yt(this,"ProgressType")}constructor(){}};function n(e){return fe.func(e)}function a(e){if(!fe.string(e))return t.Off;switch(e=e.toLowerCase()){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}function s(e){switch(e){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}function o(e){return fe.string(e)&&"json"===(e=e.toLowerCase())?r.JSON:r.Text}ue.ProgressType=i,i=Ie={},mt(n,"is"),yt(n,"is"),i.is=n,ue.NullLogger=Object.freeze({error:yt(()=>{},"error"),warn:yt(()=>{},"warn"),info:yt(()=>{},"info"),log:yt(()=>{},"log")}),(i=be||(ue.Trace=be={}))[i.Off=0]="Off",i[i.Messages=1]="Messages",i[i.Compact=2]="Compact",i[i.Verbose=3]="Verbose",ue.TraceValues={Off:"off",Messages:"messages",Compact:"compact",Verbose:"verbose"},t=be||(ue.Trace=be={}),mt(a,"fromString"),yt(a,"fromString"),t.fromString=a,mt(s,"toString4"),yt(s,"toString"),t.toString=s,(i=xe||(ue.TraceFormat=xe={})).Text="text",i.JSON="json",r=xe||(ue.TraceFormat=xe={}),mt(o,"fromString"),yt(o,"fromString"),r.fromString=o,(Te||(ue.SetTraceNotification=Te={})).type=new me.NotificationType("$/setTrace"),(ke||(ue.LogTraceNotification=ke={})).type=new me.NotificationType("$/logTrace"),(i=we||(ue.ConnectionErrors=we={}))[i.Closed=1]="Closed",i[i.Disposed=2]="Disposed",i[i.AlreadyListening=3]="AlreadyListening";var l,Ce,c,h,u,Se,Ee,_e,Ae=class T extends Error{static{mt(this,"_ConnectionError")}static{yt(this,"ConnectionError")}constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,T.prototype)}};function d(e){return e&&fe.func(e.cancelUndispatched)}function p(e){return e&&(void 0===e.kind||"id"===e.kind)&&fe.func(e.createCancellationTokenSource)&&(void 0===e.dispose||fe.func(e.dispose))}function g(e){return e&&"request"===e.kind&&fe.func(e.createCancellationTokenSource)&&(void 0===e.dispose||fe.func(e.dispose))}function f(e){return Ce.is(e)||c.is(e)}function m(e){return e&&fe.func(e.sendCancellation)&&fe.func(e.cleanup)}function y(e){return e&&h.is(e.receiver)&&u.is(e.sender)}function v(e){return e&&fe.func(e.handleMessage)}function b(e){return e&&(Se.is(e.cancellationStrategy)||l.is(e.connectionStrategy)||Ee.is(e.messageStrategy))}function x(r,p,P,o){let g=void 0!==P?P:ue.NullLogger,B=0,$=0,F=0,f="2.0",u,d=new Map,a,s=new Map,i=new Map,z,l=new Le.LinkedMap,m=new Map,y=new Set,v=new Map,c=be.Off,h=xe.Text,b,n=_e.New,q=new ye.Emitter,j=new ye.Emitter,W=new ye.Emitter,U=new ye.Emitter,G=new ye.Emitter,x=o&&o.cancellationStrategy?o.cancellationStrategy:Se.Message;function T(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function V(e){return null===e?"res-unknown-"+(++F).toString():"res-"+e.toString()}function Y(){return"not-"+(++$).toString()}function H(e,t){me.Message.isRequest(t)?e.set(T(t.id),t):me.Message.isResponse(t)?e.set(V(t.id),t):e.set(Y(),t)}function X(e){}function e(){return n===_e.Listening}function k(){return n===_e.Closed}function w(){return n===_e.Disposed}function t(){n!==_e.New&&n!==_e.Listening||(n=_e.Closed,j.fire(void 0))}function K(e){q.fire([e,void 0,void 0])}function Z(e){q.fire(e)}function C(){z||0===l.size||(z=(0,Re.default)().timer.setImmediate(()=>{z=void 0,Q()}))}function S(e){(me.Message.isRequest(e)?ee:me.Message.isNotification(e)?re:me.Message.isResponse(e)?te:ie)(e)}function Q(){if(0!==l.size){var e=l.shift();try{var t=o?.messageStrategy;Ee.is(t)?t.handleMessage(e,S):S(e)}finally{C()}}}mt(T,"createRequestQueueKey"),yt(T,"createRequestQueueKey"),mt(V,"createResponseQueueKey"),yt(V,"createResponseQueueKey"),mt(Y,"createNotificationQueueKey"),yt(Y,"createNotificationQueueKey"),mt(H,"addMessageToQueue"),yt(H,"addMessageToQueue"),mt(X,"cancelUndispatched"),yt(X,"cancelUndispatched"),mt(e,"isListening"),yt(e,"isListening"),mt(k,"isClosed"),yt(k,"isClosed"),mt(w,"isDisposed"),yt(w,"isDisposed"),mt(t,"closeHandler"),yt(t,"closeHandler"),mt(K,"readErrorHandler"),yt(K,"readErrorHandler"),mt(Z,"writeErrorHandler"),yt(Z,"writeErrorHandler"),r.onClose(t),r.onError(K),p.onClose(t),p.onError(Z),mt(C,"triggerMessageQueue"),yt(C,"triggerMessageQueue"),mt(S,"handleMessage"),yt(S,"handleMessage"),mt(Q,"processMessageQueue"),yt(Q,"processMessageQueue");let J=yt(e=>{try{if(me.Message.isNotification(e)&&e.method===de.type.method){var t=e.params.id,r=T(t),i=l.get(r);if(me.Message.isRequest(i)){var n=o?.connectionStrategy,a=n&&n.cancelUndispatched?n.cancelUndispatched(i,X):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return l.delete(r),v.delete(t),a.id=i.id,_(a,e.method,Date.now()),void p.write(a).catch(()=>g.error("Sending response for canceled message failed."))}var s=v.get(t);if(void 0!==s)return s.cancel(),void A(e);y.add(t)}H(l,e)}finally{C()}},"callback");function ee(s){if(!w()){mt(l,"reply"),yt(l,"reply"),mt(c,"replyError"),yt(c,"replyError"),mt(h,"replySuccess"),yt(h,"replySuccess"),se(s);let e=d.get(s.method),i,n,a=(e&&(i=e.type,n=e.handler),Date.now());if(n||u){let t=s.id??String(Date.now()),r=Ce.is(x.receiver)?x.receiver.createCancellationTokenSource(t):x.receiver.createCancellationTokenSource(s);null!==s.id&&y.has(s.id)&&r.cancel(),null!==s.id&&v.set(t,r);try{let e;if(n)if(void 0===s.params){if(void 0!==i&&0!==i.numberOfParams)return void c(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${s.method} defines ${i.numberOfParams} params but received none.`),s.method,a);e=n(r.token)}else if(Array.isArray(s.params)){if(void 0!==i&&i.parameterStructures===me.ParameterStructures.byName)return void c(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${s.method} defines parameters by name but received parameters by position`),s.method,a);e=n(...s.params,r.token)}else{if(void 0!==i&&i.parameterStructures===me.ParameterStructures.byPosition)return void c(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${s.method} defines parameters by position but received parameters by name`),s.method,a);e=n(s.params,r.token)}else u&&(e=u(s.method,s.params,r.token));var o=e;e?o.then?o.then(e=>{v.delete(t),l(e,s.method,a)},e=>{v.delete(t),e instanceof me.ResponseError?c(e,s.method,a):e&&fe.string(e.message)?c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}):(v.delete(t),l(e,s.method,a)):(v.delete(t),h(e,s.method,a))}catch(e){v.delete(t),e instanceof me.ResponseError?l(e,s.method,a):e&&fe.string(e.message)?c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):c(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}}else c(new me.ResponseError(me.ErrorCodes.MethodNotFound,"Unhandled method "+s.method),s.method,a);function l(e,t,r){var i={jsonrpc:f,id:s.id};e instanceof me.ResponseError?i.error=e.toJson():i.result=void 0===e?null:e,_(i,t,r),p.write(i).catch(()=>g.error("Sending response failed."))}function c(e,t,r){_(e={jsonrpc:f,id:s.id,error:e.toJson()},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}function h(e,t,r){void 0===e&&(e=null),_(e={jsonrpc:f,id:s.id,result:e},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}}}function te(e){if(!w())if(null===e.id)e.error?g.error(`Received response message without id: Error is: `+JSON.stringify(e.error,void 0,4)):g.error("Received response message without id. No further error information provided.");else{var t=e.id,r=m.get(t);if(oe(e,r),void 0!==r){m.delete(t);try{if(e.error){var i=e.error;r.reject(new me.ResponseError(i.code,i.message,i.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?g.error(`Response handler '${r.method}' failed with message: `+e.message):g.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}function re(r){if(!w()){let e,t;var i,n;if(r.method===de.type.method)i=r.params.id,y.delete(i),A(r);else if((i=s.get(r.method))&&(t=i.handler,e=i.type),t||a)try{A(r),t?void 0===r.params?(void 0!==e&&0!==e.numberOfParams&&e.parameterStructures!==me.ParameterStructures.byName&&g.error(`Notification ${r.method} defines ${e.numberOfParams} params but received none.`),t()):Array.isArray(r.params)?(n=r.params,r.method===ge.type.method&&2===n.length&&pe.is(n[0])?t({token:n[0],value:n[1]}):(void 0!==e&&(e.parameterStructures===me.ParameterStructures.byName&&g.error(`Notification ${r.method} defines parameters by name but received parameters by position`),e.numberOfParams!==r.params.length)&&g.error(`Notification ${r.method} defines ${e.numberOfParams} params but received ${n.length} arguments`),t(...n))):(void 0!==e&&e.parameterStructures===me.ParameterStructures.byPosition&&g.error(`Notification ${r.method} defines parameters by position but received parameters by name`),t(r.params)):a&&a(r.method,r.params)}catch(e){e.message?g.error(`Notification handler '${r.method}' failed with message: `+e.message):g.error(`Notification handler '${r.method}' failed unexpectedly.`)}else W.fire(r)}}function ie(e){e?(g.error(`Received message which is neither a response nor a notification message: `+JSON.stringify(e,null,4)),(fe.string(e.id)||fe.number(e.id))&&(e=e.id,e=m.get(e))&&e.reject(new Error("The received response has neither a result nor an error property."))):g.error("Received empty message.")}function E(e){if(null!=e)switch(c){case be.Verbose:return JSON.stringify(e,null,4);case be.Compact:return JSON.stringify(e);default:return}}function ne(t){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||!t.params||(e=`Params: ${E(t.params)} `),b.log(`Sending request '${t.method} - (${t.id})'.`,e)}else R("send-request",t)}function ae(t){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||(e=t.params?`Params: ${E(t.params)} `:`No parameters provided. `),b.log(`Sending notification '${t.method}'.`,e)}else R("send-notification",t)}function _(t,r,i){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||(t.error&&t.error.data?e=`Error data: ${E(t.error.data)} `:t.result?e=`Result: ${E(t.result)} `:void 0===t.error&&(e=`No result returned. `)),b.log(`Sending response '${r} - (${t.id})'. Processing request took ${Date.now()-i}ms`,e)}else R("send-response",t)}function se(t){if(c!==be.Off&&b)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||!t.params||(e=`Params: ${E(t.params)} `),b.log(`Received request '${t.method} - (${t.id})'.`,e)}else R("receive-request",t)}function A(t){if(c!==be.Off&&b&&t.method!==ke.type.method)if(h===xe.Text){let e;c!==be.Verbose&&c!==be.Compact||(e=t.params?`Params: ${E(t.params)} `:`No parameters provided. `),b.log(`Received notification '${t.method}'.`,e)}else R("receive-notification",t)}function oe(r,i){if(c!==be.Off&&b)if(h===xe.Text){let e,t;c!==be.Verbose&&c!==be.Compact||(r.error&&r.error.data?e=`Error data: ${E(r.error.data)} `:r.result?e=`Result: ${E(r.result)} `:void 0===r.error&&(e=`No result returned. `)),i?(t=r.error?` Request failed: ${r.error.message} (${r.error.code}).`:"",b.log(`Received response '${i.method} - (${r.id})' in ${Date.now()-i.timerStart}ms.`+t,e)):b.log(`Received response ${r.id} without active response promise.`,e)}else R("receive-response",r)}function R(e,t){b&&c!==be.Off&&(e={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()},b.log(e))}function L(){if(k())throw new Ae(we.Closed,"Connection is closed.");if(w())throw new Ae(we.Disposed,"Connection is disposed.")}function le(){if(e())throw new Ae(we.AlreadyListening,"Connection is already listening")}function ce(){if(!e())throw new Error("Call listen() first.")}function I(e){return void 0===e?null:e}function N(e){if(null!==e)return e}function D(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e,t){switch(e){case me.ParameterStructures.auto:return D(t)?N(t):[I(t)];case me.ParameterStructures.byName:if(D(t))return N(t);throw new Error("Received parameters by name but param is not an object literal.");case me.ParameterStructures.byPosition:return[I(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function he(e,t){let r,i=e.numberOfParams;switch(i){case 0:r=void 0;break;case 1:r=M(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{L();let a,s;if(fe.string(i)){a=i;let e=n[0],t=0,r=me.ParameterStructures.auto;me.ParameterStructures.is(e)&&(t=1,r=e);var o=n.length,l=o-t;switch(l){case 0:s=void 0;break;case 1:s=M(r,n[t]);break;default:if(r===me.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=n.slice(t,o).map(e=>I(e))}}else a=i.method,s=he(i,n);return ae(i={jsonrpc:f,method:a,params:s}),p.write(i).catch(e=>{throw g.error("Sending notification failed."),e})},"sendNotification"),onNotification:yt((e,t)=>{L();let r;return fe.func(e)?a=e:t&&(fe.string(e)?(r=e,s.set(e,{type:void 0,handler:t})):(r=e.method,s.set(e.method,{type:e,handler:t}))),{dispose:yt(()=>{void 0!==r?s.delete(r):a=void 0},"dispose")}},"onNotification"),onProgress:yt((e,t,r)=>{if(i.has(t))throw new Error(`Progress handler for token ${t} already registered`);return i.set(t,r),{dispose:yt(()=>{i.delete(t)},"dispose")}},"onProgress"),sendProgress:yt((e,t,r)=>O.sendNotification(ge.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:U.event,sendRequest:yt((a,...s)=>{L(),ce();let o,l,c;if(fe.string(a)){o=a;let e=s[0],t=s[s.length-1],r=0,i=me.ParameterStructures.auto,n=(me.ParameterStructures.is(e)&&(r=1,i=e),s.length);ve.CancellationToken.is(t)&&(--n,c=t);var h=n-r;switch(h){case 0:l=void 0;break;case 1:l=M(i,s[r]);break;default:if(i===me.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);l=s.slice(r,n).map(e=>I(e))}}else{var e=s,a=(o=a.method,l=he(a,e),a.numberOfParams);c=ve.CancellationToken.is(e[a])?e[a]:void 0}let n=B++,u,d=(c&&(u=c.onCancellationRequested(()=>{var e=x.sender.sendCancellation(O,n);return void 0===e?(g.log("Received no promise from cancellation strategy when cancelling id "+n),Promise.resolve()):e.catch(()=>{g.log(`Sending cancellation messages for id ${n} failed`)})})),{jsonrpc:f,id:n,method:o,params:l});return ne(d),"function"==typeof x.sender.enableCancellation&&x.sender.enableCancellation(d),new Promise(async(t,r)=>{var e=yt(e=>{t(e),x.sender.cleanup(n),u?.dispose()},"resolveWithCleanup"),i=yt(e=>{r(e),x.sender.cleanup(n),u?.dispose()},"rejectWithCleanup"),e={method:o,timerStart:Date.now(),resolve:e,reject:i};try{await p.write(d),m.set(n,e)}catch(i){throw g.error("Sending request failed."),e.reject(new me.ResponseError(me.ErrorCodes.MessageWriteError,i.message||"Unknown reason")),i}})},"sendRequest"),onRequest:yt((e,t)=>{L();let r=null;return Ie.is(e)?(r=void 0,u=e):fe.string(e)?(r=null,void 0!==t&&(r=e,d.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,d.set(e.method,{type:e,handler:t})),{dispose:yt(()=>{null!==r&&(void 0!==r?d.delete(r):u=void 0)},"dispose")}},"onRequest"),hasPendingResponse:yt(()=>0{let i=!1,n=xe.Text;void 0!==r&&(fe.boolean(r)?i=r:(i=r.sendNotification||!1,n=r.traceFormat||xe.Text)),c=e,h=n,b=c===be.Off?void 0:t,!i||k()||w()||await O.sendNotification(Te.type,{value:be.toString(e)})},"trace"),onError:q.event,onClose:j.event,onUnhandledNotification:W.event,onDispose:G.event,end:yt(()=>{p.end()},"end"),dispose:yt(()=>{if(!w()){n=_e.Disposed,G.fire(void 0);var e,t=new me.ResponseError(me.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(e of m.values())e.reject(t);m=new Map,v=new Map,y=new Set,l=new Le.LinkedMap,fe.func(p.dispose)&&p.dispose(),fe.func(r.dispose)&&r.dispose()}},"dispose"),listen:yt(()=>{L(),le(),n=_e.Listening,r.listen(J)},"listen"),inspect:yt(()=>{(0,Re.default)().console.log("inspect")},"inspect")};return O.onNotification(ke.type,e=>{var t;c!==be.Off&&b&&(t=c===be.Verbose||c===be.Compact,b.log(e.message,t?e.verbose:void 0))}),O.onNotification(ge.type,e=>{var t=i.get(e.token);t?t(e.value):U.fire(e)}),O}ue.ConnectionError=Ae,i=l||(ue.ConnectionStrategy=l={}),mt(d,"is"),yt(d,"is"),i.is=d,i=Ce||(ue.IdCancellationReceiverStrategy=Ce={}),mt(p,"is"),yt(p,"is"),i.is=p,i=c||(ue.RequestCancellationReceiverStrategy=c={}),mt(g,"is"),yt(g,"is"),i.is=g,(i=h||(ue.CancellationReceiverStrategy=h={})).Message=Object.freeze({createCancellationTokenSource(e){return new ve.CancellationTokenSource}}),mt(f,"is"),yt(f,"is"),i.is=f,(i=u||(ue.CancellationSenderStrategy=u={})).Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(de.type,{id:t})},cleanup(e){}}),mt(m,"is"),yt(m,"is"),i.is=m,(i=Se||(ue.CancellationStrategy=Se={})).Message=Object.freeze({receiver:h.Message,sender:u.Message}),mt(y,"is"),yt(y,"is"),i.is=y,i=Ee||(ue.MessageStrategy=Ee={}),mt(v,"is"),yt(v,"is"),i.is=v,i=ue.ConnectionOptions={},mt(b,"is"),yt(b,"is"),i.is=b,i=_e={New:1,1:"New",Listening:2,2:"Listening",Closed:3,3:"Closed",Disposed:4,4:"Disposed"},mt(x,"createMessageConnection"),yt(x,"createMessageConnection"),ue.createMessageConnection=x}}),nke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=X3e(),r=(Object.defineProperty(e,"Message",{enumerable:!0,get:yt(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:yt(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:yt(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:yt(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:yt(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:yt(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:yt(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:yt(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:yt(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:yt(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:yt(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:yt(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:yt(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:yt(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:yt(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:yt(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:yt(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:yt(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:yt(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:yt(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:yt(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:yt(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:yt(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:yt(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:yt(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:yt(function(){return t.ParameterStructures},"get")}),K3e()),i=(Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:yt(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:yt(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:yt(function(){return r.Touch},"get")}),Z3e()),n=(Object.defineProperty(e,"Disposable",{enumerable:!0,get:yt(function(){return i.Disposable},"get")}),Y3e()),a=(Object.defineProperty(e,"Event",{enumerable:!0,get:yt(function(){return n.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:yt(function(){return n.Emitter},"get")}),H3e()),s=(Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:yt(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:yt(function(){return a.CancellationToken},"get")}),Q3e()),o=(Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:yt(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:yt(function(){return s.SharedArrayReceiverStrategy},"get")}),eke()),l=(Object.defineProperty(e,"MessageReader",{enumerable:!0,get:yt(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:yt(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:yt(function(){return o.ReadableStreamMessageReader},"get")}),tke()),c=(Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:yt(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:yt(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:yt(function(){return l.WriteableStreamMessageWriter},"get")}),rke()),h=(Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:yt(function(){return c.AbstractMessageBuffer},"get")}),ike()),u=(Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:yt(function(){return h.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:yt(function(){return h.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:yt(function(){return h.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:yt(function(){return h.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:yt(function(){return h.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:yt(function(){return h.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:yt(function(){return h.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:yt(function(){return h.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:yt(function(){return h.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:yt(function(){return h.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:yt(function(){return h.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:yt(function(){return h.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:yt(function(){return h.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:yt(function(){return h.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:yt(function(){return h.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:yt(function(){return h.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:yt(function(){return h.MessageStrategy},"get")}),G3e());e.RAL=u.default}}),ake=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t,r=nke(),i=class h extends r.AbstractMessageBuffer{static{mt(this,"_MessageBuffer")}static{yt(this,"MessageBuffer")}constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return h.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return("ascii"===t?this.asciiDecoder:new TextDecoder(t)).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},n=(i.emptyBuffer=new Uint8Array(0),class{static{mt(this,"ReadableStreamWrapper")}static{yt(this,"ReadableStreamWrapper")}constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}),a=class{static{mt(this,"WritableStreamWrapper")}static{yt(this,"WritableStreamWrapper")}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e&&void 0!==t&&"utf-8"!==t)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: "+t);return this.socket.send(e),Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:yt(e=>new i(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:yt((e,t)=>{if("utf-8"!==t.charset)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: "+t.charset);return Promise.resolve(s.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:yt((e,t)=>{if(e instanceof Uint8Array)return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)));throw new Error("In a Browser environments only Uint8Arrays are supported.")},"decode")})}),stream:Object.freeze({asReadableStream:yt(e=>new n(e),"asReadableStream"),asWritableStream:yt(e=>new a(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:yt(()=>clearTimeout(i),"dispose")}},setImmediate(e,...t){let r=setTimeout(e,0,...t);return{dispose:yt(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:yt(()=>clearInterval(i),"dispose")}}})});function l(){return o}function c(){r.RAL.install(o)}mt(l,"RIL"),yt(l,"RIL"),t=l,mt(c,"install"),yt(c,"install"),t.install=c,e.default=l}}),ske=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:yt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,ake().default.install(),nke()),t=(t(nke(),e),class extends n.AbstractMessageReader{static{mt(this,"BrowserMessageReader")}static{yt(this,"BrowserMessageReader")}constructor(e){super(),this._onData=new n.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}),t=(e.BrowserMessageReader=t,class extends n.AbstractMessageWriter{static{mt(this,"BrowserMessageWriter")}static{yt(this,"BrowserMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(e){return this.handleError(e,t),Promise.reject(e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}});function r(e,t,r,i){return void 0===r&&(r=n.NullLogger),n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}e.BrowserMessageWriter=t,mt(r,"createMessageConnection"),yt(r,"createMessageConnection"),e.createMessageConnection=r}}),oke=Oke({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=ske()}}),lke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=ske(),r=(e.MessageDirection={clientToServer:"clientToServer",serverToClient:"serverToClient",both:"both"},class{static{mt(this,"RegistrationType")}static{yt(this,"RegistrationType")}constructor(e){this.method=e}}),r=(e.RegistrationType=r,class extends t.RequestType0{static{mt(this,"ProtocolRequestType0")}static{yt(this,"ProtocolRequestType0")}constructor(e){super(e)}}),r=(e.ProtocolRequestType0=r,class extends t.RequestType{static{mt(this,"ProtocolRequestType")}static{yt(this,"ProtocolRequestType")}constructor(e){super(e,t.ParameterStructures.byName)}}),r=(e.ProtocolRequestType=r,class extends t.NotificationType0{static{mt(this,"ProtocolNotificationType0")}static{yt(this,"ProtocolNotificationType0")}constructor(e){super(e)}}),r=(e.ProtocolNotificationType0=r,class extends t.NotificationType{static{mt(this,"ProtocolNotificationType")}static{yt(this,"ProtocolNotificationType")}constructor(e){super(e,t.ParameterStructures.byName)}});e.ProtocolNotificationType=r}}),cke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function i(e){return"number"==typeof e||e instanceof Number}function n(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function c(e){return null!==e&&"object"==typeof e}Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),yt(t,"boolean"),e.boolean=t,mt(r,"string"),yt(r,"string"),e.string=r,mt(i,"number"),yt(i,"number"),e.number=i,mt(n,"error"),yt(n,"error"),e.error=n,mt(a,"func"),yt(a,"func"),e.func=a,mt(s,"array"),yt(s,"array"),e.array=s,mt(o,"stringArray"),yt(o,"stringArray"),e.stringArray=o,mt(l,"typedArray"),yt(l,"typedArray"),e.typedArray=l,mt(c,"objectLiteral"),yt(c,"objectLiteral"),e.objectLiteral=c}}),hke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=lke();(e=e.ImplementationRequest={method:"textDocument/implementation"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),uke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=lke();(e=e.TypeDefinitionRequest={method:"textDocument/typeDefinition"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),dke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r=lke();(t=e.WorkspaceFoldersRequest={method:"workspace/workspaceFolders"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method),(t=e.DidChangeWorkspaceFoldersNotification={method:"workspace/didChangeWorkspaceFolders"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}}),pke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=lke();(e=e.ConfigurationRequest={method:"workspace/configuration"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}}),gke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r=lke();(t=e.DocumentColorRequest={method:"textDocument/documentColor"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.ColorPresentationRequest={method:"textDocument/colorPresentation"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}}),fke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r=lke();(t=e.FoldingRangeRequest={method:"textDocument/foldingRange"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.FoldingRangeRefreshRequest={method:"workspace/foldingRange/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}}),mke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=lke();(e=e.DeclarationRequest={method:"textDocument/declaration"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),yke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=lke();(e=e.SelectionRangeRequest={method:"textDocument/selectionRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),vke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r=ske(),i=lke();function n(e){return e===t.type}(t=e.WorkDoneProgress={}).type=new r.ProgressType,mt(n,"is"),yt(n,"is"),t.is=n,(r=e.WorkDoneProgressCreateRequest={method:"window/workDoneProgress/create"}).messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType(r.method),(r=e.WorkDoneProgressCancelNotification={method:"window/workDoneProgress/cancel"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolNotificationType(r.method)}}),bke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r=lke();(t=e.CallHierarchyPrepareRequest={method:"textDocument/prepareCallHierarchy"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.CallHierarchyIncomingCallsRequest={method:"callHierarchy/incomingCalls"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.CallHierarchyOutgoingCallsRequest={method:"callHierarchy/outgoingCalls"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}}),xke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,i=lke();(e.TokenFormat={}).Relative="relative",(r=t||(e.SemanticTokensRegistrationType=t={})).method="textDocument/semanticTokens",r.type=new i.RegistrationType(r.method),(r=e.SemanticTokensRequest={method:"textDocument/semanticTokens/full"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensDeltaRequest={method:"textDocument/semanticTokens/full/delta"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensRangeRequest={method:"textDocument/semanticTokens/range"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensRefreshRequest={method:"workspace/semanticTokens/refresh"}).messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType0(r.method)}}),Tke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=lke();(e=e.ShowDocumentRequest={method:"window/showDocument"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}}),kke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=lke();(e=e.LinkedEditingRangeRequest={method:"textDocument/linkedEditingRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),wke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r=lke();e.FileOperationPatternKind={file:"file",folder:"folder"},(t=e.WillCreateFilesRequest={method:"workspace/willCreateFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.DidCreateFilesNotification={method:"workspace/didCreateFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.WillRenameFilesRequest={method:"workspace/willRenameFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.DidRenameFilesNotification={method:"workspace/didRenameFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.DidDeleteFilesNotification={method:"workspace/didDeleteFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.WillDeleteFilesRequest={method:"workspace/willDeleteFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}}),Cke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=lke();e.UniquenessLevel={document:"document",project:"project",group:"group",scheme:"scheme",global:"global"},e.MonikerKind={$import:"import",$export:"export",local:"local"},(e=e.MonikerRequest={method:"textDocument/moniker"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}}),Ske=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r=lke();(t=e.TypeHierarchyPrepareRequest={method:"textDocument/prepareTypeHierarchy"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.TypeHierarchySupertypesRequest={method:"typeHierarchy/supertypes"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.TypeHierarchySubtypesRequest={method:"typeHierarchy/subtypes"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}}),Eke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r=lke();(t=e.InlineValueRequest={method:"textDocument/inlineValue"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlineValueRefreshRequest={method:"workspace/inlineValue/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}}),_ke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r=lke();(t=e.InlayHintRequest={method:"textDocument/inlayHint"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlayHintResolveRequest={method:"inlayHint/resolve"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlayHintRefreshRequest={method:"workspace/inlayHint/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}}),Ake=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r=ske(),i=cke(),n=lke();function a(e){return e&&i.boolean(e.retriggerRequest)}t=e.DiagnosticServerCancellationData={},mt(a,"is"),yt(a,"is"),t.is=a,e.DocumentDiagnosticReportKind={Full:"full",Unchanged:"unchanged"},(t=e.DocumentDiagnosticRequest={method:"textDocument/diagnostic"}).messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType,(t=e.WorkspaceDiagnosticRequest={method:"workspace/diagnostic"}).messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType,(t=e.DiagnosticRefreshRequest={method:"workspace/diagnostic/refresh"}).messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}}),Rke=Oke({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0,U3e();var t,i,r,n,a,s=d5e(p5e),o=cke(),l=lke();function c(e){return 1===e||2===e}function h(e,t){return e={executionOrder:e},!0!==t&&!1!==t||(e.success=t),e}function u(e){return o.objectLiteral(e)&&s.uinteger.is(e.executionOrder)&&(void 0===e.success||o.boolean(e.success))}function d(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}function p(e,t){return{kind:e,document:t}}function g(e){return o.objectLiteral(e)&&t.is(e.kind)&&s.DocumentUri.is(e.document)&&(void 0===e.metadata||o.objectLiteral(e.metadata))}function f(e,t){var r=new Set;return e.document!==t.document&&r.add("document"),e.kind!==t.kind&&r.add("kind"),e.executionSummary!==t.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||m(e.metadata,t.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||i.equals(e.executionSummary,t.executionSummary)||r.add("executionSummary"),r}function m(t,r){if(t!==r){if(null==t||null==r||typeof t!=typeof r||"object"!=typeof t)return!1;var e=Array.isArray(t),i=Array.isArray(r);if(e!==i)return!1;if(e&&i){if(t.length!==r.length)return!1;for(let e=0;eBke,"AbstractAstReflection"),AbstractCstNode:mt(()=>$Le,"AbstractCstNode"),AbstractLangiumParser:mt(()=>GLe,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:mt(()=>YLe,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:mt(()=>uIe,"AbstractThreadedAsyncParser"),AstUtils:mt(()=>Wke,"AstUtils"),BiMap:mt(()=>k9e,"BiMap"),Cancellation:mt(()=>r9e,"Cancellation"),CompositeCstNodeImpl:mt(()=>zLe,"CompositeCstNodeImpl"),ContextCache:mt(()=>L9e,"ContextCache"),CstNodeBuilder:mt(()=>BLe,"CstNodeBuilder"),CstUtils:mt(()=>Pke,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:mt(()=>Q9e,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:mt(()=>zke,"DONE_RESULT"),DatatypeSymbol:mt(()=>WLe,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:mt(()=>q9e,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:mt(()=>W9e,"DefaultAstNodeLocator"),DefaultAsyncParser:mt(()=>hIe,"DefaultAsyncParser"),DefaultCommentProvider:mt(()=>cIe,"DefaultCommentProvider"),DefaultConfigurationProvider:mt(()=>G9e,"DefaultConfigurationProvider"),DefaultDocumentBuilder:mt(()=>H9e,"DefaultDocumentBuilder"),DefaultDocumentValidator:mt(()=>F9e,"DefaultDocumentValidator"),DefaultHydrator:mt(()=>gIe,"DefaultHydrator"),DefaultIndexManager:mt(()=>X9e,"DefaultIndexManager"),DefaultJsonSerializer:mt(()=>M9e,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:mt(()=>f9e,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:mt(()=>m9e,"DefaultLangiumDocuments"),DefaultLangiumProfiler:mt(()=>EIe,"DefaultLangiumProfiler"),DefaultLexer:mt(()=>J9e,"DefaultLexer"),DefaultLexerErrorMessageProvider:mt(()=>Z9e,"DefaultLexerErrorMessageProvider"),DefaultLinker:mt(()=>v9e,"DefaultLinker"),DefaultNameProvider:mt(()=>b9e,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:mt(()=>j9e,"DefaultReferenceDescriptionProvider"),DefaultReferences:mt(()=>x9e,"DefaultReferences"),DefaultScopeComputation:mt(()=>w9e,"DefaultScopeComputation"),DefaultScopeProvider:mt(()=>D9e,"DefaultScopeProvider"),DefaultServiceRegistry:mt(()=>O9e,"DefaultServiceRegistry"),DefaultTokenBuilder:mt(()=>JLe,"DefaultTokenBuilder"),DefaultValueConverter:mt(()=>e9e,"DefaultValueConverter"),DefaultWorkspaceLock:mt(()=>pIe,"DefaultWorkspaceLock"),DefaultWorkspaceManager:mt(()=>K9e,"DefaultWorkspaceManager"),Deferred:mt(()=>s9e,"Deferred"),Disposable:mt(()=>Y9e,"Disposable"),DisposableCache:mt(()=>A9e,"DisposableCache"),DocumentCache:mt(()=>I9e,"DocumentCache"),DocumentState:mt(()=>g9e,"DocumentState"),DocumentValidator:mt(()=>z9e,"DocumentValidator"),EMPTY_SCOPE:mt(()=>_9e,"EMPTY_SCOPE"),EMPTY_STREAM:mt(()=>Fke,"EMPTY_STREAM"),EmptyFileSystem:mt(()=>wIe,"EmptyFileSystem"),EmptyFileSystemProvider:mt(()=>kIe,"EmptyFileSystemProvider"),ErrorWithLocation:mt(()=>Hwe,"ErrorWithLocation"),GrammarAST:mt(()=>Uke,"GrammarAST"),GrammarUtils:mt(()=>Ywe,"GrammarUtils"),IndentationAwareLexer:mt(()=>TIe,"IndentationAwareLexer"),IndentationAwareTokenBuilder:mt(()=>xIe,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:mt(()=>lIe,"JSDocDocumentationProvider"),LangiumCompletionParser:mt(()=>XLe,"LangiumCompletionParser"),LangiumParser:mt(()=>VLe,"LangiumParser"),LangiumParserErrorMessageProvider:mt(()=>HLe,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:mt(()=>FLe,"LeafCstNodeImpl"),LexingMode:mt(()=>bIe,"LexingMode"),MapScope:mt(()=>S9e,"MapScope"),Module:mt(()=>fIe,"Module"),MultiMap:mt(()=>T9e,"MultiMap"),MultiMapScope:mt(()=>E9e,"MultiMapScope"),OperationCancelled:mt(()=>a9e,"OperationCancelled"),ParserWorker:mt(()=>dIe,"ParserWorker"),ProfilingTask:mt(()=>_Ie,"ProfilingTask"),Reduction:mt(()=>jke,"Reduction"),RefResolving:mt(()=>y9e,"RefResolving"),RegExpUtils:mt(()=>Xwe,"RegExpUtils"),RootCstNodeImpl:mt(()=>jLe,"RootCstNodeImpl"),SimpleCache:mt(()=>R9e,"SimpleCache"),StreamImpl:mt(()=>$ke,"StreamImpl"),StreamScope:mt(()=>C9e,"StreamScope"),TextDocument:mt(()=>l9e,"TextDocument"),TreeStreamImpl:mt(()=>qke,"TreeStreamImpl"),URI:mt(()=>h9e,"URI"),UriTrie:mt(()=>p9e,"UriTrie"),UriUtils:mt(()=>d9e,"UriUtils"),VALIDATE_EACH_NODE:mt(()=>$9e,"VALIDATE_EACH_NODE"),ValidationCategory:mt(()=>P9e,"ValidationCategory"),ValidationRegistry:mt(()=>B9e,"ValidationRegistry"),ValueConverter:mt(()=>t9e,"ValueConverter"),WorkspaceCache:mt(()=>N9e,"WorkspaceCache"),assertCondition:mt(()=>f0e,"assertCondition"),assertUnreachable:mt(()=>g0e,"assertUnreachable"),createCompletionParser:mt(()=>G4e,"createCompletionParser"),createDefaultCoreModule:mt(()=>DTe,"createDefaultCoreModule"),createDefaultSharedCoreModule:mt(()=>MTe,"createDefaultSharedCoreModule"),createGrammarConfig:mt(()=>dge,"createGrammarConfig"),createLangiumParser:mt(()=>V4e,"createLangiumParser"),createParser:mt(()=>_4e,"createParser"),delayNextTick:mt(()=>H4e,"delayNextTick"),diagnosticData:mt(()=>oTe,"diagnosticData"),eagerLoad:mt(()=>PTe,"eagerLoad"),getDiagnosticRange:mt(()=>lTe,"getDiagnosticRange"),indentationBuilderDefaultOptions:mt(()=>vIe,"indentationBuilderDefaultOptions"),inject:mt(()=>OTe,"inject"),interruptAndCheck:mt(()=>Q4e,"interruptAndCheck"),isAstNode:mt(()=>Ede,"isAstNode"),isAstNodeDescription:mt(()=>Rde,"isAstNodeDescription"),isAstNodeWithComment:mt(()=>aTe,"isAstNodeWithComment"),isCompositeCstNode:mt(()=>Ide,"isCompositeCstNode"),isIMultiModeLexerDefinition:mt(()=>dTe,"isIMultiModeLexerDefinition"),isJSDoc:mt(()=>fTe,"isJSDoc"),isLeafCstNode:mt(()=>Nde,"isLeafCstNode"),isLinkingError:mt(()=>Lde,"isLinkingError"),isMultiReference:mt(()=>Ade,"isMultiReference"),isNamed:mt(()=>nTe,"isNamed"),isOperationCancelled:mt(()=>Z4e,"isOperationCancelled"),isReference:mt(()=>_de,"isReference"),isRootCstNode:mt(()=>Dde,"isRootCstNode"),isTokenTypeArray:mt(()=>uTe,"isTokenTypeArray"),isTokenTypeDictionary:mt(()=>pTe,"isTokenTypeDictionary"),loadGrammarFromJson:mt(()=>qTe,"loadGrammarFromJson"),parseJSDoc:mt(()=>gTe,"parseJSDoc"),prepareLangiumParser:mt(()=>Y4e,"prepareLangiumParser"),setInterruptionPeriod:mt(()=>K4e,"setInterruptionPeriod"),startCancelableOperation:mt(()=>X4e,"startCancelableOperation"),stream:mt(()=>Pde,"stream"),toDiagnosticData:mt(()=>hTe,"toDiagnosticData"),toDiagnosticSeverity:mt(()=>cTe,"toDiagnosticSeverity")}),l5e(Pke={},{DefaultNameRegexp:mt(()=>Vwe,"DefaultNameRegexp"),RangeComparison:mt(()=>Gwe,"RangeComparison"),compareRange:mt(()=>e0e,"compareRange"),findCommentNode:mt(()=>i0e,"findCommentNode"),findDeclarationNodeAtOffset:mt(()=>r0e,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:mt(()=>a0e,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:mt(()=>s0e,"findLeafNodeBeforeOffset"),flattenCst:mt(()=>Kpe,"flattenCst"),getDatatypeNode:mt(()=>Hpe,"getDatatypeNode"),getInteriorNodes:mt(()=>u0e,"getInteriorNodes"),getNextNode:mt(()=>c0e,"getNextNode"),getPreviousNode:mt(()=>l0e,"getPreviousNode"),getStartlineNode:mt(()=>h0e,"getStartlineNode"),inRange:mt(()=>t0e,"inRange"),isChildNode:mt(()=>Zpe,"isChildNode"),isCommentNode:mt(()=>n0e,"isCommentNode"),streamCst:mt(()=>Xpe,"streamCst"),toDocumentSegment:mt(()=>Jpe,"toDocumentSegment"),tokenToRange:mt(()=>Qpe,"tokenToRange")}),mt(Ede,"isAstNode"),yt(Ede,"isAstNode"),mt(_de,"isReference"),yt(_de,"isReference"),mt(Ade,"isMultiReference"),yt(Ade,"isMultiReference"),mt(Rde,"isAstNodeDescription"),yt(Rde,"isAstNodeDescription"),mt(Lde,"isLinkingError"),yt(Lde,"isLinkingError"),Bke=class{static{mt(this,"AbstractAstReflection")}static{yt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);if(t=t.properties[e.property]?.referenceType)return t;throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`)}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Ede(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){var r,i;return e===t||(void 0!==(i=(r=(r=this.subtypes[e])||(this.subtypes[e]={}))[t])?i:(e=!!(i=this.types[e])&&i.superTypes.some(e=>this.isSubtype(e,t)),r[t]=e))}getAllSubTypes(e){var t=this.allSubtypes[e];if(t)return t;var r,i=[];for(r of this.getAllTypes())this.isSubtype(r,e)&&i.push(r);return this.allSubtypes[e]=i}},mt(Ide,"isCompositeCstNode"),yt(Ide,"isCompositeCstNode"),mt(Nde,"isLeafCstNode"),yt(Nde,"isLeafCstNode"),mt(Dde,"isRootCstNode"),yt(Dde,"isRootCstNode"),$ke=class N{static{mt(this,"_StreamImpl")}static{yt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:yt(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){for(var e,t=[],r=this.iterator();void 0!==(e=r.next()).value&&t.push(e.value),!e.done;);return t}toSet(){return new Set(this)}toMap(t,r){var e=this.map(e=>[t?t(e):e,r?r(e):e]);return new Map(e)}toString(){return this.join()}concat(e){return new N(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(!(t=this.nextFn(e.first)).done)return t}while(!t.done);e.firstDone=!0}do{if(!(t=e.iterator.next()).done)return t}while(!t.done);return zke})}join(e=","){let t=this.iterator(),r="",i,n=!1;for(;(i=t.next()).done||(n&&(r+=e),r+=Mde(i.value)),n=!0,!i.done;);return r}indexOf(e,t=0){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(i>=t&&n.value===e)return i;n=r.next(),i++}return-1}every(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){let t=this.iterator(),r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(r){return new N(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?zke:{done:!1,value:r(t)}})}filter(r){return new N(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return zke})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){let r=this.iterator(),i=t,n=r.next();for(;!n.done;)i=void 0===i?n.value:e(i,n.value),n=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){var i=e.next();return i.done?r:void 0===(e=this.recursiveReduce(e,t,r))?i.value:t(e,i.value)}find(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){let t=this.iterator(),r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(i){return new N(()=>({this:this.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=this.nextFn(e.this);if(!t){if(!Ode(r=i(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return zke})}flat(e){if((e=void 0===e?1:e)<=0)return this;let i=1({this:i.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=i.nextFn(e.this);if(!t){if(!Ode(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return zke})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new N(()=>{var t=this.startFn();for(let e=0;e({size:0,state:this.startFn()}),e=>(e.size++,t({set:new Set,internalState:this.startFn()}),e=>{var t;do{if(!(t=this.nextFn(e.internalState)).done){var r=i?i(t.value):t.value;if(!e.set.has(r))return e.set.add(r),t}}while(!t.done);return zke})}exclude(e,t){let r=new Set;for(var i of e)i=t?t(i):i,r.add(i);return this.filter(e=>(e=t?t(e):e,!r.has(e)))}},mt(Mde,"toString"),yt(Mde,"toString"),mt(Ode,"isIterable"),yt(Ode,"isIterable"),Fke=new $ke(()=>{},()=>zke),zke=Object.freeze({done:!0,value:void 0}),mt(Pde,"stream"),yt(Pde,"stream"),qke=class extends $ke{static{mt(this,"TreeStreamImpl")}static{yt(this,"TreeStreamImpl")}constructor(e,r,t){super(()=>({iterators:t?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);0this.nextFn(e.state),"next"),prune:yt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},E=jke=jke||{},mt(e,"sum"),yt(e,"sum"),E.sum=e,mt(t,"product"),yt(t,"product"),E.product=t,mt(r,"min2"),yt(r,"min"),E.min=r,mt(i,"max"),yt(i,"max"),E.max=i,l5e(Wke={},{assignMandatoryProperties:mt(()=>Hde,"assignMandatoryProperties"),copyAstNode:mt(()=>Kde,"copyAstNode"),findRootNode:mt(()=>qde,"findRootNode"),getContainerOfType:mt(()=>$de,"getContainerOfType"),getDocument:mt(()=>zde,"getDocument"),getReferenceNodes:mt(()=>jde,"getReferenceNodes"),hasContainerOfType:mt(()=>Fde,"hasContainerOfType"),linkContentToContainer:mt(()=>Bde,"linkContentToContainer"),streamAllContents:mt(()=>Ude,"streamAllContents"),streamAst:mt(()=>Gde,"streamAst"),streamContents:mt(()=>Wde,"streamContents"),streamReferences:mt(()=>Yde,"streamReferences")}),mt(Bde,"linkContentToContainer"),yt(Bde,"linkContentToContainer"),mt($de,"getContainerOfType"),yt($de,"getContainerOfType"),mt(Fde,"hasContainerOfType"),yt(Fde,"hasContainerOfType"),mt(zde,"getDocument"),yt(zde,"getDocument"),mt(qde,"findRootNode"),yt(qde,"findRootNode"),mt(jde,"getReferenceNodes"),yt(jde,"getReferenceNodes"),mt(Wde,"streamContents"),yt(Wde,"streamContents"),mt(Ude,"streamAllContents"),yt(Ude,"streamAllContents"),mt(Gde,"streamAst"),yt(Gde,"streamAst"),mt(Vde,"isAstNodeInRange"),yt(Vde,"isAstNodeInRange"),mt(Yde,"streamReferences"),yt(Yde,"streamReferences"),mt(Hde,"assignMandatoryProperties"),yt(Hde,"assignMandatoryProperties"),mt(Xde,"copyDefaultValue"),yt(Xde,"copyDefaultValue"),mt(Kde,"copyAstNode"),yt(Kde,"copyAstNode"),l5e(Uke={},{AbstractElement:mt(()=>Vke,"AbstractElement"),AbstractParserRule:mt(()=>Yke,"AbstractParserRule"),AbstractRule:mt(()=>Hke,"AbstractRule"),AbstractType:mt(()=>Xke,"AbstractType"),Action:mt(()=>Kke,"Action"),Alternatives:mt(()=>Zke,"Alternatives"),ArrayLiteral:mt(()=>Qke,"ArrayLiteral"),ArrayType:mt(()=>Jke,"ArrayType"),Assignment:mt(()=>ewe,"Assignment"),BooleanLiteral:mt(()=>twe,"BooleanLiteral"),CharacterRange:mt(()=>rwe,"CharacterRange"),Condition:mt(()=>iwe,"Condition"),Conjunction:mt(()=>nwe,"Conjunction"),CrossReference:mt(()=>awe,"CrossReference"),Disjunction:mt(()=>swe,"Disjunction"),EndOfFile:mt(()=>owe,"EndOfFile"),Grammar:mt(()=>lwe,"Grammar"),GrammarImport:mt(()=>cwe,"GrammarImport"),Group:mt(()=>hwe,"Group"),InferredType:mt(()=>uwe,"InferredType"),InfixRule:mt(()=>dwe,"InfixRule"),InfixRuleOperatorList:mt(()=>pwe,"InfixRuleOperatorList"),InfixRuleOperators:mt(()=>gwe,"InfixRuleOperators"),Interface:mt(()=>fwe,"Interface"),Keyword:mt(()=>mwe,"Keyword"),LangiumGrammarAstReflection:mt(()=>Wwe,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:mt(()=>Gke,"LangiumGrammarTerminals"),NamedArgument:mt(()=>ywe,"NamedArgument"),NegatedToken:mt(()=>vwe,"NegatedToken"),Negation:mt(()=>bwe,"Negation"),NumberLiteral:mt(()=>xwe,"NumberLiteral"),Parameter:mt(()=>Twe,"Parameter"),ParameterReference:mt(()=>kwe,"ParameterReference"),ParserRule:mt(()=>wwe,"ParserRule"),ReferenceType:mt(()=>Cwe,"ReferenceType"),RegexToken:mt(()=>Swe,"RegexToken"),ReturnType:mt(()=>Ewe,"ReturnType"),RuleCall:mt(()=>_we,"RuleCall"),SimpleType:mt(()=>Awe,"SimpleType"),StringLiteral:mt(()=>Rwe,"StringLiteral"),TerminalAlternatives:mt(()=>Lwe,"TerminalAlternatives"),TerminalElement:mt(()=>Iwe,"TerminalElement"),TerminalGroup:mt(()=>Nwe,"TerminalGroup"),TerminalRule:mt(()=>Dwe,"TerminalRule"),TerminalRuleCall:mt(()=>Mwe,"TerminalRuleCall"),Type:mt(()=>Owe,"Type"),TypeAttribute:mt(()=>Pwe,"TypeAttribute"),TypeDefinition:mt(()=>Bwe,"TypeDefinition"),UnionType:mt(()=>$we,"UnionType"),UnorderedGroup:mt(()=>Fwe,"UnorderedGroup"),UntilToken:mt(()=>zwe,"UntilToken"),ValueLiteral:mt(()=>qwe,"ValueLiteral"),Wildcard:mt(()=>jwe,"Wildcard"),isAbstractElement:mt(()=>Zde,"isAbstractElement"),isAbstractParserRule:mt(()=>Qde,"isAbstractParserRule"),isAbstractRule:mt(()=>Jde,"isAbstractRule"),isAbstractType:mt(()=>epe,"isAbstractType"),isAction:mt(()=>tpe,"isAction"),isAlternatives:mt(()=>rpe,"isAlternatives"),isArrayLiteral:mt(()=>ipe,"isArrayLiteral"),isArrayType:mt(()=>npe,"isArrayType"),isAssignment:mt(()=>ape,"isAssignment"),isBooleanLiteral:mt(()=>spe,"isBooleanLiteral"),isCharacterRange:mt(()=>ope,"isCharacterRange"),isCondition:mt(()=>lpe,"isCondition"),isConjunction:mt(()=>cpe,"isConjunction"),isCrossReference:mt(()=>hpe,"isCrossReference"),isDisjunction:mt(()=>upe,"isDisjunction"),isEndOfFile:mt(()=>dpe,"isEndOfFile"),isGrammar:mt(()=>ppe,"isGrammar"),isGrammarImport:mt(()=>gpe,"isGrammarImport"),isGroup:mt(()=>fpe,"isGroup"),isInferredType:mt(()=>mpe,"isInferredType"),isInfixRule:mt(()=>ype,"isInfixRule"),isInfixRuleOperatorList:mt(()=>vpe,"isInfixRuleOperatorList"),isInfixRuleOperators:mt(()=>bpe,"isInfixRuleOperators"),isInterface:mt(()=>xpe,"isInterface"),isKeyword:mt(()=>Tpe,"isKeyword"),isNamedArgument:mt(()=>kpe,"isNamedArgument"),isNegatedToken:mt(()=>wpe,"isNegatedToken"),isNegation:mt(()=>Cpe,"isNegation"),isNumberLiteral:mt(()=>Spe,"isNumberLiteral"),isParameter:mt(()=>Epe,"isParameter"),isParameterReference:mt(()=>_pe,"isParameterReference"),isParserRule:mt(()=>Ape,"isParserRule"),isReferenceType:mt(()=>Rpe,"isReferenceType"),isRegexToken:mt(()=>Lpe,"isRegexToken"),isReturnType:mt(()=>Ipe,"isReturnType"),isRuleCall:mt(()=>Npe,"isRuleCall"),isSimpleType:mt(()=>Dpe,"isSimpleType"),isStringLiteral:mt(()=>Mpe,"isStringLiteral"),isTerminalAlternatives:mt(()=>Ope,"isTerminalAlternatives"),isTerminalElement:mt(()=>Ppe,"isTerminalElement"),isTerminalGroup:mt(()=>Bpe,"isTerminalGroup"),isTerminalRule:mt(()=>$pe,"isTerminalRule"),isTerminalRuleCall:mt(()=>Fpe,"isTerminalRuleCall"),isType:mt(()=>zpe,"isType"),isTypeAttribute:mt(()=>qpe,"isTypeAttribute"),isTypeDefinition:mt(()=>jpe,"isTypeDefinition"),isUnionType:mt(()=>Wpe,"isUnionType"),isUnorderedGroup:mt(()=>Upe,"isUnorderedGroup"),isUntilToken:mt(()=>Gpe,"isUntilToken"),isValueLiteral:mt(()=>Vpe,"isValueLiteral"),isWildcard:mt(()=>Ype,"isWildcard"),reflection:mt(()=>Uwe,"reflection")}),Gke={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Vke={$type:"AbstractElement",cardinality:"cardinality"},mt(Zde,"isAbstractElement"),yt(Zde,"isAbstractElement"),Yke={$type:"AbstractParserRule"},mt(Qde,"isAbstractParserRule"),yt(Qde,"isAbstractParserRule"),Hke={$type:"AbstractRule"},mt(Jde,"isAbstractRule"),yt(Jde,"isAbstractRule"),Xke={$type:"AbstractType"},mt(epe,"isAbstractType"),yt(epe,"isAbstractType"),Kke={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"},mt(tpe,"isAction"),yt(tpe,"isAction"),Zke={$type:"Alternatives",cardinality:"cardinality",elements:"elements"},mt(rpe,"isAlternatives"),yt(rpe,"isAlternatives"),Qke={$type:"ArrayLiteral",elements:"elements"},mt(ipe,"isArrayLiteral"),yt(ipe,"isArrayLiteral"),Jke={$type:"ArrayType",elementType:"elementType"},mt(npe,"isArrayType"),yt(npe,"isArrayType"),ewe={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"},mt(ape,"isAssignment"),yt(ape,"isAssignment"),twe={$type:"BooleanLiteral",true:"true"},mt(spe,"isBooleanLiteral"),yt(spe,"isBooleanLiteral"),rwe={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"},mt(ope,"isCharacterRange"),yt(ope,"isCharacterRange"),iwe={$type:"Condition"},mt(lpe,"isCondition"),yt(lpe,"isCondition"),nwe={$type:"Conjunction",left:"left",right:"right"},mt(cpe,"isConjunction"),yt(cpe,"isConjunction"),awe={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"},mt(hpe,"isCrossReference"),yt(hpe,"isCrossReference"),swe={$type:"Disjunction",left:"left",right:"right"},mt(upe,"isDisjunction"),yt(upe,"isDisjunction"),owe={$type:"EndOfFile",cardinality:"cardinality"},mt(dpe,"isEndOfFile"),yt(dpe,"isEndOfFile"),lwe={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},mt(ppe,"isGrammar"),yt(ppe,"isGrammar"),cwe={$type:"GrammarImport",path:"path"},mt(gpe,"isGrammarImport"),yt(gpe,"isGrammarImport"),hwe={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"},mt(fpe,"isGroup"),yt(fpe,"isGroup"),uwe={$type:"InferredType",name:"name"},mt(mpe,"isInferredType"),yt(mpe,"isInferredType"),dwe={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"},mt(ype,"isInfixRule"),yt(ype,"isInfixRule"),pwe={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},mt(vpe,"isInfixRuleOperatorList"),yt(vpe,"isInfixRuleOperatorList"),gwe={$type:"InfixRuleOperators",precedences:"precedences"},mt(bpe,"isInfixRuleOperators"),yt(bpe,"isInfixRuleOperators"),fwe={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"},mt(xpe,"isInterface"),yt(xpe,"isInterface"),mwe={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"},mt(Tpe,"isKeyword"),yt(Tpe,"isKeyword"),ywe={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},mt(kpe,"isNamedArgument"),yt(kpe,"isNamedArgument"),vwe={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(wpe,"isNegatedToken"),yt(wpe,"isNegatedToken"),bwe={$type:"Negation",value:"value"},mt(Cpe,"isNegation"),yt(Cpe,"isNegation"),xwe={$type:"NumberLiteral",value:"value"},mt(Spe,"isNumberLiteral"),yt(Spe,"isNumberLiteral"),Twe={$type:"Parameter",name:"name"},mt(Epe,"isParameter"),yt(Epe,"isParameter"),kwe={$type:"ParameterReference",parameter:"parameter"},mt(_pe,"isParameterReference"),yt(_pe,"isParameterReference"),wwe={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"},mt(Ape,"isParserRule"),yt(Ape,"isParserRule"),Cwe={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},mt(Rpe,"isReferenceType"),yt(Rpe,"isReferenceType"),Swe={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"},mt(Lpe,"isRegexToken"),yt(Lpe,"isRegexToken"),Ewe={$type:"ReturnType",name:"name"},mt(Ipe,"isReturnType"),yt(Ipe,"isReturnType"),_we={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"},mt(Npe,"isRuleCall"),yt(Npe,"isRuleCall"),Awe={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"},mt(Dpe,"isSimpleType"),yt(Dpe,"isSimpleType"),Rwe={$type:"StringLiteral",value:"value"},mt(Mpe,"isStringLiteral"),yt(Mpe,"isStringLiteral"),Lwe={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Ope,"isTerminalAlternatives"),yt(Ope,"isTerminalAlternatives"),Iwe={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Ppe,"isTerminalElement"),yt(Ppe,"isTerminalElement"),Nwe={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Bpe,"isTerminalGroup"),yt(Bpe,"isTerminalGroup"),Dwe={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"},mt($pe,"isTerminalRule"),yt($pe,"isTerminalRule"),Mwe={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"},mt(Fpe,"isTerminalRuleCall"),yt(Fpe,"isTerminalRuleCall"),Owe={$type:"Type",name:"name",type:"type"},mt(zpe,"isType"),yt(zpe,"isType"),Pwe={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},mt(qpe,"isTypeAttribute"),yt(qpe,"isTypeAttribute"),Bwe={$type:"TypeDefinition"},mt(jpe,"isTypeDefinition"),yt(jpe,"isTypeDefinition"),$we={$type:"UnionType",types:"types"},mt(Wpe,"isUnionType"),yt(Wpe,"isUnionType"),Fwe={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"},mt(Upe,"isUnorderedGroup"),yt(Upe,"isUnorderedGroup"),zwe={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(Gpe,"isUntilToken"),yt(Gpe,"isUntilToken"),qwe={$type:"ValueLiteral"},mt(Vpe,"isValueLiteral"),yt(Vpe,"isValueLiteral"),jwe={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(Ype,"isWildcard"),yt(Ype,"isWildcard"),Wwe=class extends Bke{static{mt(this,"LangiumGrammarAstReflection")}static{yt(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:Vke.$type,properties:{cardinality:{name:Vke.cardinality}},superTypes:[]},AbstractParserRule:{name:Yke.$type,properties:{},superTypes:[Hke.$type,Xke.$type]},AbstractRule:{name:Hke.$type,properties:{},superTypes:[]},AbstractType:{name:Xke.$type,properties:{},superTypes:[]},Action:{name:Kke.$type,properties:{cardinality:{name:Kke.cardinality},feature:{name:Kke.feature},inferredType:{name:Kke.inferredType},operator:{name:Kke.operator},type:{name:Kke.type,referenceType:Xke.$type}},superTypes:[Vke.$type]},Alternatives:{name:Zke.$type,properties:{cardinality:{name:Zke.cardinality},elements:{name:Zke.elements,defaultValue:[]}},superTypes:[Vke.$type]},ArrayLiteral:{name:Qke.$type,properties:{elements:{name:Qke.elements,defaultValue:[]}},superTypes:[qwe.$type]},ArrayType:{name:Jke.$type,properties:{elementType:{name:Jke.elementType}},superTypes:[Bwe.$type]},Assignment:{name:ewe.$type,properties:{cardinality:{name:ewe.cardinality},feature:{name:ewe.feature},operator:{name:ewe.operator},predicate:{name:ewe.predicate},terminal:{name:ewe.terminal}},superTypes:[Vke.$type]},BooleanLiteral:{name:twe.$type,properties:{true:{name:twe.true,defaultValue:!1}},superTypes:[iwe.$type,qwe.$type]},CharacterRange:{name:rwe.$type,properties:{cardinality:{name:rwe.cardinality},left:{name:rwe.left},lookahead:{name:rwe.lookahead},parenthesized:{name:rwe.parenthesized,defaultValue:!1},right:{name:rwe.right}},superTypes:[Iwe.$type]},Condition:{name:iwe.$type,properties:{},superTypes:[]},Conjunction:{name:nwe.$type,properties:{left:{name:nwe.left},right:{name:nwe.right}},superTypes:[iwe.$type]},CrossReference:{name:awe.$type,properties:{cardinality:{name:awe.cardinality},deprecatedSyntax:{name:awe.deprecatedSyntax,defaultValue:!1},isMulti:{name:awe.isMulti,defaultValue:!1},terminal:{name:awe.terminal},type:{name:awe.type,referenceType:Xke.$type}},superTypes:[Vke.$type]},Disjunction:{name:swe.$type,properties:{left:{name:swe.left},right:{name:swe.right}},superTypes:[iwe.$type]},EndOfFile:{name:owe.$type,properties:{cardinality:{name:owe.cardinality}},superTypes:[Vke.$type]},Grammar:{name:lwe.$type,properties:{imports:{name:lwe.imports,defaultValue:[]},interfaces:{name:lwe.interfaces,defaultValue:[]},isDeclared:{name:lwe.isDeclared,defaultValue:!1},name:{name:lwe.name},rules:{name:lwe.rules,defaultValue:[]},types:{name:lwe.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:cwe.$type,properties:{path:{name:cwe.path}},superTypes:[]},Group:{name:hwe.$type,properties:{cardinality:{name:hwe.cardinality},elements:{name:hwe.elements,defaultValue:[]},guardCondition:{name:hwe.guardCondition},predicate:{name:hwe.predicate}},superTypes:[Vke.$type]},InferredType:{name:uwe.$type,properties:{name:{name:uwe.name}},superTypes:[Xke.$type]},InfixRule:{name:dwe.$type,properties:{call:{name:dwe.call},dataType:{name:dwe.dataType},inferredType:{name:dwe.inferredType},name:{name:dwe.name},operators:{name:dwe.operators},parameters:{name:dwe.parameters,defaultValue:[]},returnType:{name:dwe.returnType,referenceType:Xke.$type}},superTypes:[Yke.$type]},InfixRuleOperatorList:{name:pwe.$type,properties:{associativity:{name:pwe.associativity},operators:{name:pwe.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:gwe.$type,properties:{precedences:{name:gwe.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:fwe.$type,properties:{attributes:{name:fwe.attributes,defaultValue:[]},name:{name:fwe.name},superTypes:{name:fwe.superTypes,defaultValue:[],referenceType:Xke.$type}},superTypes:[Xke.$type]},Keyword:{name:mwe.$type,properties:{cardinality:{name:mwe.cardinality},predicate:{name:mwe.predicate},value:{name:mwe.value}},superTypes:[Vke.$type]},NamedArgument:{name:ywe.$type,properties:{calledByName:{name:ywe.calledByName,defaultValue:!1},parameter:{name:ywe.parameter,referenceType:Twe.$type},value:{name:ywe.value}},superTypes:[]},NegatedToken:{name:vwe.$type,properties:{cardinality:{name:vwe.cardinality},lookahead:{name:vwe.lookahead},parenthesized:{name:vwe.parenthesized,defaultValue:!1},terminal:{name:vwe.terminal}},superTypes:[Iwe.$type]},Negation:{name:bwe.$type,properties:{value:{name:bwe.value}},superTypes:[iwe.$type]},NumberLiteral:{name:xwe.$type,properties:{value:{name:xwe.value}},superTypes:[qwe.$type]},Parameter:{name:Twe.$type,properties:{name:{name:Twe.name}},superTypes:[]},ParameterReference:{name:kwe.$type,properties:{parameter:{name:kwe.parameter,referenceType:Twe.$type}},superTypes:[iwe.$type]},ParserRule:{name:wwe.$type,properties:{dataType:{name:wwe.dataType},definition:{name:wwe.definition},entry:{name:wwe.entry,defaultValue:!1},fragment:{name:wwe.fragment,defaultValue:!1},inferredType:{name:wwe.inferredType},name:{name:wwe.name},parameters:{name:wwe.parameters,defaultValue:[]},returnType:{name:wwe.returnType,referenceType:Xke.$type}},superTypes:[Yke.$type]},ReferenceType:{name:Cwe.$type,properties:{isMulti:{name:Cwe.isMulti,defaultValue:!1},referenceType:{name:Cwe.referenceType}},superTypes:[Bwe.$type]},RegexToken:{name:Swe.$type,properties:{cardinality:{name:Swe.cardinality},lookahead:{name:Swe.lookahead},parenthesized:{name:Swe.parenthesized,defaultValue:!1},regex:{name:Swe.regex}},superTypes:[Iwe.$type]},ReturnType:{name:Ewe.$type,properties:{name:{name:Ewe.name}},superTypes:[]},RuleCall:{name:_we.$type,properties:{arguments:{name:_we.arguments,defaultValue:[]},cardinality:{name:_we.cardinality},predicate:{name:_we.predicate},rule:{name:_we.rule,referenceType:Hke.$type}},superTypes:[Vke.$type]},SimpleType:{name:Awe.$type,properties:{primitiveType:{name:Awe.primitiveType},stringType:{name:Awe.stringType},typeRef:{name:Awe.typeRef,referenceType:Xke.$type}},superTypes:[Bwe.$type]},StringLiteral:{name:Rwe.$type,properties:{value:{name:Rwe.value}},superTypes:[qwe.$type]},TerminalAlternatives:{name:Lwe.$type,properties:{cardinality:{name:Lwe.cardinality},elements:{name:Lwe.elements,defaultValue:[]},lookahead:{name:Lwe.lookahead},parenthesized:{name:Lwe.parenthesized,defaultValue:!1}},superTypes:[Iwe.$type]},TerminalElement:{name:Iwe.$type,properties:{cardinality:{name:Iwe.cardinality},lookahead:{name:Iwe.lookahead},parenthesized:{name:Iwe.parenthesized,defaultValue:!1}},superTypes:[Vke.$type]},TerminalGroup:{name:Nwe.$type,properties:{cardinality:{name:Nwe.cardinality},elements:{name:Nwe.elements,defaultValue:[]},lookahead:{name:Nwe.lookahead},parenthesized:{name:Nwe.parenthesized,defaultValue:!1}},superTypes:[Iwe.$type]},TerminalRule:{name:Dwe.$type,properties:{definition:{name:Dwe.definition},fragment:{name:Dwe.fragment,defaultValue:!1},hidden:{name:Dwe.hidden,defaultValue:!1},name:{name:Dwe.name},type:{name:Dwe.type}},superTypes:[Hke.$type]},TerminalRuleCall:{name:Mwe.$type,properties:{cardinality:{name:Mwe.cardinality},lookahead:{name:Mwe.lookahead},parenthesized:{name:Mwe.parenthesized,defaultValue:!1},rule:{name:Mwe.rule,referenceType:Dwe.$type}},superTypes:[Iwe.$type]},Type:{name:Owe.$type,properties:{name:{name:Owe.name},type:{name:Owe.type}},superTypes:[Xke.$type]},TypeAttribute:{name:Pwe.$type,properties:{defaultValue:{name:Pwe.defaultValue},isOptional:{name:Pwe.isOptional,defaultValue:!1},name:{name:Pwe.name},type:{name:Pwe.type}},superTypes:[]},TypeDefinition:{name:Bwe.$type,properties:{},superTypes:[]},UnionType:{name:$we.$type,properties:{types:{name:$we.types,defaultValue:[]}},superTypes:[Bwe.$type]},UnorderedGroup:{name:Fwe.$type,properties:{cardinality:{name:Fwe.cardinality},elements:{name:Fwe.elements,defaultValue:[]}},superTypes:[Vke.$type]},UntilToken:{name:zwe.$type,properties:{cardinality:{name:zwe.cardinality},lookahead:{name:zwe.lookahead},parenthesized:{name:zwe.parenthesized,defaultValue:!1},terminal:{name:zwe.terminal}},superTypes:[Iwe.$type]},ValueLiteral:{name:qwe.$type,properties:{},superTypes:[]},Wildcard:{name:jwe.$type,properties:{cardinality:{name:jwe.cardinality},lookahead:{name:jwe.lookahead},parenthesized:{name:jwe.parenthesized,defaultValue:!1}},superTypes:[Iwe.$type]}}}},Uwe=new Wwe,mt(Hpe,"getDatatypeNode"),yt(Hpe,"getDatatypeNode"),mt(Xpe,"streamCst"),yt(Xpe,"streamCst"),mt(Kpe,"flattenCst"),yt(Kpe,"flattenCst"),mt(Zpe,"isChildNode"),yt(Zpe,"isChildNode"),mt(Qpe,"tokenToRange"),yt(Qpe,"tokenToRange"),mt(Jpe,"toDocumentSegment"),yt(Jpe,"toDocumentSegment"),(E=Gwe=Gwe||{})[E.Before=0]="Before",E[E.After=1]="After",E[E.OverlapFront=2]="OverlapFront",E[E.OverlapBack=3]="OverlapBack",E[E.Inside=4]="Inside",E[E.Outside=5]="Outside",mt(e0e,"compareRange"),yt(e0e,"compareRange"),mt(t0e,"inRange"),yt(t0e,"inRange"),Vwe=/^[\w\p{L}]$/u,mt(r0e,"findDeclarationNodeAtOffset"),yt(r0e,"findDeclarationNodeAtOffset"),mt(i0e,"findCommentNode"),yt(i0e,"findCommentNode"),mt(n0e,"isCommentNode"),yt(n0e,"isCommentNode"),mt(a0e,"findLeafNodeAtOffset"),yt(a0e,"findLeafNodeAtOffset"),mt(s0e,"findLeafNodeBeforeOffset"),yt(s0e,"findLeafNodeBeforeOffset"),mt(o0e,"binarySearch"),yt(o0e,"binarySearch"),mt(l0e,"getPreviousNode"),yt(l0e,"getPreviousNode"),mt(c0e,"getNextNode"),yt(c0e,"getNextNode"),mt(h0e,"getStartlineNode"),yt(h0e,"getStartlineNode"),mt(u0e,"getInteriorNodes"),yt(u0e,"getInteriorNodes"),mt(d0e,"getCommonParent"),yt(d0e,"getCommonParent"),mt(p0e,"getParentChain"),yt(p0e,"getParentChain"),l5e(Ywe={},{findAssignment:mt(()=>q0e,"findAssignment"),findNameAssignment:mt(()=>j0e,"findNameAssignment"),findNodeForKeyword:mt(()=>F0e,"findNodeForKeyword"),findNodeForProperty:mt(()=>P0e,"findNodeForProperty"),findNodesForKeyword:mt(()=>$0e,"findNodesForKeyword"),findNodesForKeywordInternal:mt(()=>z0e,"findNodesForKeywordInternal"),findNodesForProperty:mt(()=>O0e,"findNodesForProperty"),getActionAtElement:mt(()=>U0e,"getActionAtElement"),getActionType:mt(()=>ege,"getActionType"),getAllReachableRules:mt(()=>L0e,"getAllReachableRules"),getAllRulesUsedForCrossReferences:mt(()=>N0e,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:mt(()=>D0e,"getCrossReferenceTerminal"),getEntryRule:mt(()=>A0e,"getEntryRule"),getExplicitRuleType:mt(()=>Q0e,"getExplicitRuleType"),getHiddenRules:mt(()=>R0e,"getHiddenRules"),getRuleType:mt(()=>rge,"getRuleType"),getRuleTypeName:mt(()=>tge,"getRuleTypeName"),getTypeName:mt(()=>J0e,"getTypeName"),isArrayCardinality:mt(()=>V0e,"isArrayCardinality"),isArrayOperator:mt(()=>Y0e,"isArrayOperator"),isCommentTerminal:mt(()=>M0e,"isCommentTerminal"),isDataType:mt(()=>K0e,"isDataType"),isDataTypeRule:mt(()=>H0e,"isDataTypeRule"),isOptionalCardinality:mt(()=>G0e,"isOptionalCardinality"),terminalRegex:mt(()=>ige,"terminalRegex")}),Hwe=class extends Error{static{mt(this,"ErrorWithLocation")}static{yt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(g0e,"assertUnreachable"),yt(g0e,"assertUnreachable"),mt(f0e,"assertCondition"),yt(f0e,"assertCondition"),l5e(Xwe={},{NEWLINE_REGEXP:mt(()=>iCe,"NEWLINE_REGEXP"),escapeRegExp:mt(()=>S0e,"escapeRegExp"),getTerminalParts:mt(()=>k0e,"getTerminalParts"),isMultilineComment:mt(()=>w0e,"isMultilineComment"),isWhitespace:mt(()=>C0e,"isWhitespace"),partialMatches:mt(()=>E0e,"partialMatches"),partialRegExp:mt(()=>_0e,"partialRegExp"),whitespaceCharacters:mt(()=>sCe,"whitespaceCharacters")}),mt(m0e,"cc"),yt(m0e,"cc"),mt(y0e,"insertToSet"),yt(y0e,"insertToSet"),mt(v0e,"addFlag"),yt(v0e,"addFlag"),mt(b0e,"ASSERT_EXISTS"),yt(b0e,"ASSERT_EXISTS"),mt(x0e,"ASSERT_NEVER_REACH_HERE"),yt(x0e,"ASSERT_NEVER_REACH_HERE"),mt(T0e,"isCharacter"),yt(T0e,"isCharacter"),Kwe=[];for(let e=m0e("0");e<=m0e("9");e++)Kwe.push(e);Zwe=[m0e("_")].concat(Kwe);for(let e=m0e("a");e<=m0e("z");e++)Zwe.push(e);for(let e=m0e("A");e<=m0e("Z");e++)Zwe.push(e);function n(){}function a(t){let r="";for(let e=1;e{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),n=0,a=[];for(var s of i){var o=e.offsetAt(s.range.start);if(on&&a.push(r.substring(n,o)),s.newText.length&&a.push(s.newText),n=e.offsetAt(s.range.end)}return a.push(r.substr(n)),a.join("")}Qwe=[m0e(" "),m0e("\f"),m0e(` `),m0e("\r"),m0e("\t"),m0e("\v"),m0e("\t"),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e(" "),m0e("\u2028"),m0e("\u2029"),m0e(" "),m0e(" "),m0e(" "),m0e("\ufeff")],Jwe=/[0-9a-fA-F]/,eCe=/[0-9]/,tCe=/[1-9]/,eLe=class{static{mt(this,"RegExpParser")}static{yt(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");for(var t=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":v0e(r,"global");break;case"i":v0e(r,"ignoreCase");break;case"m":v0e(r,"multiLine");break;case"u":v0e(r,"unicode");break;case"y":v0e(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){var e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let e;switch(this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":e="Lookbehind";break;case"!":e="NegativeLookbehind"}}b0e(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return x0e()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":t=this.isDigit()?{atLeast:i,atMost:this.integerIncludingZero()}:{atLeast:i,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;b0e(t)}if((!0!==e||void 0!==t)&&b0e(t))return"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return b0e(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):x0e()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[m0e(` `),m0e("\r"),m0e("\u2028"),m0e("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=Kwe;break;case"D":e=Kwe,t=!0;break;case"s":e=Qwe;break;case"S":e=Qwe,t=!0;break;case"w":e=Zwe;break;case"W":e=Zwe,t=!0}return b0e(e)?{type:"Set",value:e,complement:t}:x0e()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=m0e("\f");break;case"n":e=m0e(` `);break;case"r":e=m0e("\r");break;case"t":e=m0e("\t");break;case"v":e=m0e("\v")}return b0e(e)?{type:"Character",value:e}:x0e()}controlLetterEscapeAtom(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:m0e("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:m0e(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:m0e(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,T0e(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,T0e(i)){if(i.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},rCe=class{static{mt(this,"BaseRegExpVisitor")}static{yt(this,"BaseRegExpVisitor")}visitChildren(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},iCe=/\r?\n/gm,nCe=new eLe,z=class extends rCe{static{mt(this,"TerminalRegExpVisitor")}static{yt(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){var t=String.fromCharCode(e.value);this.multiline||t!==` `||(this.multiline=!0),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=S0e(t),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitSet(e){var t;this.multiline||(t=this.regex.substring(e.loc.begin,e.loc.end),t=new RegExp(t),this.multiline=!!` `.match(t)),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=this.regex.substring(e.loc.begin,e.loc.end),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}},aCe=new z,mt(k0e,"getTerminalParts"),yt(k0e,"getTerminalParts"),mt(w0e,"isMultilineComment"),yt(w0e,"isMultilineComment"),sCe=` \r              

   `.split(""),mt(C0e,"isWhitespace"),yt(C0e,"isWhitespace"),mt(S0e,"escapeRegExp"),yt(S0e,"escapeRegExp"),mt(E0e,"partialMatches"),yt(E0e,"partialMatches"),mt(_0e,"partialRegExp"),yt(_0e,"partialRegExp"),mt(A0e,"getEntryRule"),yt(A0e,"getEntryRule"),mt(R0e,"getHiddenRules"),yt(R0e,"getHiddenRules"),mt(L0e,"getAllReachableRules"),yt(L0e,"getAllReachableRules"),mt(I0e,"ruleDfs"),yt(I0e,"ruleDfs"),mt(N0e,"getAllRulesUsedForCrossReferences"),yt(N0e,"getAllRulesUsedForCrossReferences"),mt(D0e,"getCrossReferenceTerminal"),yt(D0e,"getCrossReferenceTerminal"),mt(M0e,"isCommentTerminal"),yt(M0e,"isCommentTerminal"),mt(O0e,"findNodesForProperty"),yt(O0e,"findNodesForProperty"),mt(P0e,"findNodeForProperty"),yt(P0e,"findNodeForProperty"),mt(B0e,"findNodesForPropertyInternal"),yt(B0e,"findNodesForPropertyInternal"),mt($0e,"findNodesForKeyword"),yt($0e,"findNodesForKeyword"),mt(F0e,"findNodeForKeyword"),yt(F0e,"findNodeForKeyword"),mt(z0e,"findNodesForKeywordInternal"),yt(z0e,"findNodesForKeywordInternal"),mt(q0e,"findAssignment"),yt(q0e,"findAssignment"),mt(j0e,"findNameAssignment"),yt(j0e,"findNameAssignment"),mt(W0e,"findNameAssignmentInternal"),yt(W0e,"findNameAssignmentInternal"),mt(U0e,"getActionAtElement"),yt(U0e,"getActionAtElement"),mt(G0e,"isOptionalCardinality"),yt(G0e,"isOptionalCardinality"),mt(V0e,"isArrayCardinality"),yt(V0e,"isArrayCardinality"),mt(Y0e,"isArrayOperator"),yt(Y0e,"isArrayOperator"),mt(H0e,"isDataTypeRule"),yt(H0e,"isDataTypeRule"),mt(X0e,"isDataTypeRuleInternal"),yt(X0e,"isDataTypeRuleInternal"),mt(K0e,"isDataType"),yt(K0e,"isDataType"),mt(Z0e,"isDataTypeInternal"),yt(Z0e,"isDataTypeInternal"),mt(Q0e,"getExplicitRuleType"),yt(Q0e,"getExplicitRuleType"),mt(J0e,"getTypeName"),yt(J0e,"getTypeName"),mt(ege,"getActionType"),yt(ege,"getActionType"),mt(tge,"getRuleTypeName"),yt(tge,"getRuleTypeName"),mt(rge,"getRuleType"),yt(rge,"getRuleType"),mt(ige,"terminalRegex"),yt(ige,"terminalRegex"),oCe=/[\s\S]/.source,mt(nge,"abstractElementToRegex"),yt(nge,"abstractElementToRegex"),mt(age,"terminalAlternativesToRegex"),yt(age,"terminalAlternativesToRegex"),mt(sge,"terminalGroupToRegex"),yt(sge,"terminalGroupToRegex"),mt(oge,"untilTokenToRegex"),yt(oge,"untilTokenToRegex"),mt(lge,"negateTokenToRegex"),yt(lge,"negateTokenToRegex"),mt(cge,"characterRangeToRegex"),yt(cge,"characterRangeToRegex"),mt(hge,"keywordToRegex"),yt(hge,"keywordToRegex"),mt(uge,"withCardinality"),yt(uge,"withCardinality"),mt(dge,"createGrammarConfig"),yt(dge,"createGrammarConfig"),z="object"==typeof global&&global&&global.Object===Object&&global,u9e="object"==typeof self&&self&&self.Object===Object&&self,u9e=z||u9e||Function("return this")(),fRe=u9e.Symbol,F=Object.prototype,lCe=F.hasOwnProperty,cCe=F.toString,hCe=fRe?fRe.toStringTag:void 0,mt(pge,"getRawTag"),yt(pge,"getRawTag"),uCe=pge,F=Object.prototype,dCe=F.toString,mt(gge,"objectToString"),yt(gge,"objectToString"),pCe=gge,gCe=fRe?fRe.toStringTag:void 0,mt(fge,"baseGetTag"),yt(fge,"baseGetTag"),fCe=fge,mt(mge,"isObjectLike"),yt(mge,"isObjectLike"),mCe=mge,mt(yge,"isSymbol"),yt(yge,"isSymbol"),yCe=yge,mt(vge,"arrayMap"),yt(vge,"arrayMap"),vCe=vge,F=Array.isArray,bCe=F,xCe=1/0,F=fRe?fRe.prototype:void 0,TCe=F?F.toString:void 0,mt(bge,"baseToString"),yt(bge,"baseToString"),kCe=bge,wCe=/\s/,mt(xge,"trimmedEndIndex"),yt(xge,"trimmedEndIndex"),CCe=xge,SCe=/^\s+/,mt(Tge,"baseTrim"),yt(Tge,"baseTrim"),ECe=Tge,mt(kge,"isObject"),yt(kge,"isObject"),_Ce=kge,ACe=NaN,RCe=/^[-+]0x[0-9a-f]+$/i,LCe=/^0b[01]+$/i,ICe=/^0o[0-7]+$/i,NCe=parseInt,mt(wge,"toNumber"),yt(wge,"toNumber"),DCe=wge,mt(Cge,"toFinite"),yt(Cge,"toFinite"),MCe=Cge,mt(Sge,"toInteger"),yt(Sge,"toInteger"),OCe=Sge,mt(Ege,"identity"),yt(Ege,"identity"),PCe=Ege,mt(_ge,"isFunction"),yt(_ge,"isFunction"),BCe=_ge,F=u9e["__core-js_shared__"],E=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""),$Ce=E?"Symbol(src)_1."+E:"",mt(Age,"isMasked"),yt(Age,"isMasked"),FCe=Age,F=Function.prototype,zCe=F.toString,mt(Rge,"toSource"),yt(Rge,"toSource"),qCe=Rge,F=/[\\^$.*+?()[\]{}|]/g,jCe=/^\[object .+?Constructor\]$/,v8e=Function.prototype,BRe=Object.prototype,v8e=v8e.toString,BRe=BRe.hasOwnProperty,WCe=RegExp("^"+v8e.call(BRe).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(Lge,"baseIsNative"),yt(Lge,"baseIsNative"),UCe=Lge,mt(Ige,"getValue"),yt(Ige,"getValue"),GCe=Ige,mt(Nge,"getNative"),yt(Nge,"getNative"),v8e=(VCe=Nge)(u9e,"WeakMap"),BRe=v8e,YCe=Object.create,mt(n,"object"),yt(n,"object"),HCe=function(e){return _Ce(e)?YCe?YCe(e):(n.prototype=e,e=new n,n.prototype=void 0,e):{}},mt(Dge,"apply"),yt(Dge,"apply"),XCe=Dge,mt(Mge,"noop"),yt(Mge,"noop"),KCe=Mge,mt(Oge,"copyArray"),yt(Oge,"copyArray"),ZCe=Oge,QCe=Date.now,mt(Pge,"shortOut"),yt(Pge,"shortOut"),F=Pge,mt(Bge,"constant"),yt(Bge,"constant"),JCe=Bge,v8e=(()=>{try{var e=VCe(Object,"defineProperty");return e({},"",{}),e}catch{}})(),F=F((e6e=v8e)?function(e,t){return e6e(e,"toString",{configurable:!0,enumerable:!1,value:JCe(t),writable:!0})}:PCe),t6e=F,mt($ge,"arrayEach"),yt($ge,"arrayEach"),r6e=$ge,mt(Fge,"baseFindIndex"),yt(Fge,"baseFindIndex"),i6e=Fge,mt(zge,"baseIsNaN"),yt(zge,"baseIsNaN"),n6e=zge,mt(qge,"strictIndexOf"),yt(qge,"strictIndexOf"),a6e=qge,mt(jge,"baseIndexOf"),yt(jge,"baseIndexOf"),s6e=jge,mt(Wge,"arrayIncludes"),yt(Wge,"arrayIncludes"),o6e=Wge,l6e=/^(?:0|[1-9]\d*)$/,mt(Uge,"isIndex"),yt(Uge,"isIndex"),c6e=Uge,mt(Gge,"baseAssignValue"),yt(Gge,"baseAssignValue"),h6e=Gge,mt(Vge,"eq"),yt(Vge,"eq"),u6e=Vge,v8e=Object.prototype,d6e=v8e.hasOwnProperty,mt(Yge,"assignValue"),yt(Yge,"assignValue"),p6e=Yge,mt(Hge,"copyObject"),yt(Hge,"copyObject"),g6e=Hge,f6e=Math.max,mt(Xge,"overRest"),yt(Xge,"overRest"),m6e=Xge,mt(Kge,"baseRest"),yt(Kge,"baseRest"),y6e=Kge,mt(Zge,"isLength"),yt(Zge,"isLength"),v6e=Zge,mt(Qge,"isArrayLike"),yt(Qge,"isArrayLike"),b6e=Qge,mt(Jge,"isIterateeCall"),yt(Jge,"isIterateeCall"),x6e=Jge,mt(efe,"createAssigner"),yt(efe,"createAssigner"),F=efe,T6e=Object.prototype,mt(tfe,"isPrototype"),yt(tfe,"isPrototype"),k6e=tfe,mt(rfe,"baseTimes"),yt(rfe,"baseTimes"),w6e=rfe,mt(ife,"baseIsArguments"),yt(ife,"baseIsArguments"),v8e=ife,ALe=Object.prototype,C6e=ALe.hasOwnProperty,S6e=ALe.propertyIsEnumerable,ALe=v8e(function(){return arguments}())?v8e:function(e){return mCe(e)&&C6e.call(e,"callee")&&!S6e.call(e,"callee")},E6e=ALe,mt(nfe,"stubFalse"),yt(nfe,"stubFalse"),v8e=nfe,ALe="object"==typeof exports&&exports&&!exports.nodeType&&exports,bLe=(bLe=ALe&&"object"==typeof module&&module&&!module.nodeType&&module)&&bLe.exports===ALe?u9e.Buffer:void 0,ALe=bLe?bLe.isBuffer:void 0,_6e=ALe||v8e,(A6e={})["[object Float32Array]"]=A6e["[object Float64Array]"]=A6e["[object Int8Array]"]=A6e["[object Int16Array]"]=A6e["[object Int32Array]"]=A6e["[object Uint8Array]"]=A6e["[object Uint8ClampedArray]"]=A6e["[object Uint16Array]"]=A6e["[object Uint32Array]"]=!0,A6e["[object Arguments]"]=A6e["[object Array]"]=A6e["[object ArrayBuffer]"]=A6e["[object Boolean]"]=A6e["[object DataView]"]=A6e["[object Date]"]=A6e["[object Error]"]=A6e["[object Function]"]=A6e["[object Map]"]=A6e["[object Number]"]=A6e["[object Object]"]=A6e["[object RegExp]"]=A6e["[object Set]"]=A6e["[object String]"]=A6e["[object WeakMap]"]=!1,mt(afe,"baseIsTypedArray"),yt(afe,"baseIsTypedArray"),bLe=afe,mt(sfe,"baseUnary"),yt(sfe,"baseUnary"),R6e=sfe,ALe="object"==typeof exports&&exports&&!exports.nodeType&&exports,L6e=ALe&&"object"==typeof module&&module&&!module.nodeType&&module,v8e=L6e&&L6e.exports===ALe,I6e=v8e&&z.process,ALe=(()=>{try{return L6e&&L6e.require&&L6e.require("util").types||I6e&&I6e.binding&&I6e.binding("util")}catch{}})(),z=(v8e=ALe)&&v8e.isTypedArray,ALe=z?R6e(z):bLe,N6e=ALe,z=Object.prototype,D6e=z.hasOwnProperty,mt(ofe,"arrayLikeKeys"),yt(ofe,"arrayLikeKeys"),M6e=ofe,mt(lfe,"overArg"),yt(lfe,"overArg"),ALe=(bLe=lfe)(Object.keys,Object),O6e=ALe,z=Object.prototype,P6e=z.hasOwnProperty,mt(cfe,"baseKeys"),yt(cfe,"baseKeys"),B6e=cfe,mt(hfe,"keys"),yt(hfe,"keys"),$6e=hfe,ALe=Object.prototype,F6e=ALe.hasOwnProperty,z=F(function(e,t){if(k6e(t)||b6e(t))g6e(t,$6e(t),e);else for(var r in t)F6e.call(t,r)&&p6e(e,r,t[r])}),z6e=z,mt(ufe,"nativeKeysIn"),yt(ufe,"nativeKeysIn"),q6e=ufe,ALe=Object.prototype,j6e=ALe.hasOwnProperty,mt(dfe,"baseKeysIn"),yt(dfe,"baseKeysIn"),W6e=dfe,mt(pfe,"keysIn"),yt(pfe,"keysIn"),U6e=pfe,G6e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V6e=/^\w*$/,mt(gfe,"isKey"),yt(gfe,"isKey"),Y6e=gfe,F=VCe(Object,"create"),H6e=F,mt(ffe,"hashClear"),yt(ffe,"hashClear"),z=ffe,mt(mfe,"hashDelete"),yt(mfe,"hashDelete"),ALe=mfe,F=Object.prototype,X6e=F.hasOwnProperty,mt(yfe,"hashGet"),yt(yfe,"hashGet"),F=yfe,$Re=Object.prototype,K6e=$Re.hasOwnProperty,mt(vfe,"hashHas"),yt(vfe,"hashHas"),$Re=vfe,mt(bfe,"hashSet"),yt(bfe,"hashSet"),ORe=bfe,mt(xfe,"Hash"),yt(xfe,"Hash"),xfe.prototype.clear=z,xfe.prototype.delete=ALe,xfe.prototype.get=F,xfe.prototype.has=$Re,xfe.prototype.set=ORe,Z6e=xfe,mt(Tfe,"listCacheClear"),yt(Tfe,"listCacheClear"),z=Tfe,mt(kfe,"assocIndexOf"),yt(kfe,"assocIndexOf"),Q6e=kfe,ALe=Array.prototype,J6e=ALe.splice,mt(wfe,"listCacheDelete"),yt(wfe,"listCacheDelete"),F=wfe,mt(Cfe,"listCacheGet"),yt(Cfe,"listCacheGet"),$Re=Cfe,mt(Sfe,"listCacheHas"),yt(Sfe,"listCacheHas"),ORe=Sfe,mt(Efe,"listCacheSet"),yt(Efe,"listCacheSet"),ALe=Efe,mt(_fe,"ListCache"),yt(_fe,"ListCache"),_fe.prototype.clear=z,_fe.prototype.delete=F,_fe.prototype.get=$Re,_fe.prototype.has=ORe,_fe.prototype.set=ALe,eSe=_fe,z=VCe(u9e,"Map"),tSe=z,mt(Afe,"mapCacheClear"),yt(Afe,"mapCacheClear"),F=Afe,mt(Rfe,"isKeyable"),yt(Rfe,"isKeyable"),rSe=Rfe,mt(Lfe,"getMapData"),yt(Lfe,"getMapData"),iSe=Lfe,mt(Ife,"mapCacheDelete"),yt(Ife,"mapCacheDelete"),$Re=Ife,mt(Nfe,"mapCacheGet"),yt(Nfe,"mapCacheGet"),ORe=Nfe,mt(Dfe,"mapCacheHas"),yt(Dfe,"mapCacheHas"),ALe=Dfe,mt(Mfe,"mapCacheSet"),yt(Mfe,"mapCacheSet"),z=Mfe,mt(Ofe,"MapCache"),yt(Ofe,"MapCache"),Ofe.prototype.clear=F,Ofe.prototype.delete=$Re,Ofe.prototype.get=ORe,Ofe.prototype.has=ALe,Ofe.prototype.set=z,nSe=Ofe,aSe="Expected a function",mt(Pfe,"memoize"),yt(Pfe,"memoize"),Pfe.Cache=nSe,sSe=Pfe,mt(Bfe,"memoizeCapped"),yt(Bfe,"memoizeCapped"),oSe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lSe=/\\(\\)?/g,F=Bfe(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(oSe,function(e,t,r,i){n.push(r?i.replace(lSe,"$1"):t||e)}),n}),cSe=F,mt($fe,"toString2"),yt($fe,"toString"),hSe=$fe,mt(Ffe,"castPath"),yt(Ffe,"castPath"),uSe=Ffe,mt(zfe,"toKey"),yt(zfe,"toKey"),dSe=zfe,mt(qfe,"baseGet"),yt(qfe,"baseGet"),pSe=qfe,mt(jfe,"get"),yt(jfe,"get"),gSe=jfe,mt(Wfe,"arrayPush"),yt(Wfe,"arrayPush"),fSe=Wfe,mSe=fRe?fRe.isConcatSpreadable:void 0,mt(Ufe,"isFlattenable"),yt(Ufe,"isFlattenable"),ySe=Ufe,mt(Gfe,"baseFlatten"),yt(Gfe,"baseFlatten"),vSe=Gfe,mt(Vfe,"flatten"),yt(Vfe,"flatten"),bSe=Vfe,$Re=bLe(Object.getPrototypeOf,Object),xSe=$Re,mt(Yfe,"baseSlice"),yt(Yfe,"baseSlice"),TSe=Yfe,mt(Hfe,"arrayReduce"),yt(Hfe,"arrayReduce"),kSe=Hfe,mt(Xfe,"stackClear"),yt(Xfe,"stackClear"),ORe=Xfe,mt(Kfe,"stackDelete"),yt(Kfe,"stackDelete"),ALe=Kfe,mt(Zfe,"stackGet"),yt(Zfe,"stackGet"),z=Zfe,mt(Qfe,"stackHas"),yt(Qfe,"stackHas"),F=Qfe,mt(Jfe,"stackSet"),yt(Jfe,"stackSet"),bLe=Jfe,mt(e1e,"Stack"),yt(e1e,"Stack"),e1e.prototype.clear=ORe,e1e.prototype.delete=ALe,e1e.prototype.get=z,e1e.prototype.has=F,e1e.prototype.set=bLe,wSe=e1e,mt(t1e,"baseAssign"),yt(t1e,"baseAssign"),CSe=t1e,mt(r1e,"baseAssignIn"),yt(r1e,"baseAssignIn"),SSe=r1e,$Re="object"==typeof exports&&exports&&!exports.nodeType&&exports,ORe=$Re&&"object"==typeof module&&module&&!module.nodeType&&module,ALe=ORe&&ORe.exports===$Re?u9e.Buffer:void 0,ESe=ALe?ALe.allocUnsafe:void 0,mt(i1e,"cloneBuffer"),yt(i1e,"cloneBuffer"),_Se=i1e,mt(n1e,"arrayFilter"),yt(n1e,"arrayFilter"),ASe=n1e,mt(a1e,"stubArray"),yt(a1e,"stubArray"),z=a1e,F=Object.prototype,RSe=F.propertyIsEnumerable,ISe=(LSe=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),ASe(LSe(t),function(e){return RSe.call(t,e)}))}:z,mt(s1e,"copySymbols"),yt(s1e,"copySymbols"),NSe=s1e,bLe=Object.getOwnPropertySymbols,DSe=bLe?function(e){for(var t=[];e;)fSe(t,ISe(e)),e=xSe(e);return t}:z,mt(o1e,"copySymbolsIn"),yt(o1e,"copySymbolsIn"),MSe=o1e,mt(l1e,"baseGetAllKeys"),yt(l1e,"baseGetAllKeys"),OSe=l1e,mt(c1e,"getAllKeys"),yt(c1e,"getAllKeys"),PSe=c1e,mt(h1e,"getAllKeysIn"),yt(h1e,"getAllKeysIn"),BSe=h1e,ORe=VCe(u9e,"DataView"),$Re=ORe,ALe=VCe(u9e,"Promise"),F=ALe,bLe=VCe(u9e,"Set"),$Se=bLe,FSe="[object Map]",zSe="[object Promise]",qSe="[object Set]",jSe="[object WeakMap]",WSe="[object DataView]",USe=qCe($Re),GSe=qCe(tSe),VSe=qCe(F),YSe=qCe($Se),HSe=qCe(BRe),z=fCe,($Re&&z(new $Re(new ArrayBuffer(1)))!=WSe||tSe&&z(new tSe)!=FSe||F&&z(F.resolve())!=zSe||$Se&&z(new $Se)!=qSe||BRe&&z(new BRe)!=jSe)&&(z=yt(function(e){var t=fCe(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?qCe(e):"")switch(e){case USe:return WSe;case GSe:return FSe;case VSe:return zSe;case YSe:return qSe;case HSe:return jSe}return t},"getTag")),XSe=z,ORe=Object.prototype,KSe=ORe.hasOwnProperty,mt(u1e,"initCloneArray"),yt(u1e,"initCloneArray"),ZSe=u1e,ALe=u9e.Uint8Array,QSe=ALe,mt(d1e,"cloneArrayBuffer"),yt(d1e,"cloneArrayBuffer"),JSe=d1e,mt(p1e,"cloneDataView"),yt(p1e,"cloneDataView"),eEe=p1e,tEe=/\w*$/,mt(g1e,"cloneRegExp"),yt(g1e,"cloneRegExp"),rEe=g1e,bLe=fRe?fRe.prototype:void 0,iEe=bLe?bLe.valueOf:void 0,mt(f1e,"cloneSymbol"),yt(f1e,"cloneSymbol"),nEe=f1e,mt(m1e,"cloneTypedArray"),yt(m1e,"cloneTypedArray"),aEe=m1e,mt(y1e,"initCloneByTag"),yt(y1e,"initCloneByTag"),sEe=y1e,mt(v1e,"initCloneObject"),yt(v1e,"initCloneObject"),oEe=v1e,mt(b1e,"baseIsMap"),yt(b1e,"baseIsMap"),$Re=b1e,F=v8e&&v8e.isMap,BRe=F?R6e(F):$Re,lEe=BRe,mt(x1e,"baseIsSet"),yt(x1e,"baseIsSet"),z=x1e,ORe=v8e&&v8e.isSet,u9e=ORe?R6e(ORe):z,cEe=u9e,hEe=1,uEe=2,dEe=4,gEe="[object Function]",fEe="[object GeneratorFunction]",mEe="[object Object]",(yEe={})[pEe="[object Arguments]"]=yEe["[object Array]"]=yEe["[object ArrayBuffer]"]=yEe["[object DataView]"]=yEe["[object Boolean]"]=yEe["[object Date]"]=yEe["[object Float32Array]"]=yEe["[object Float64Array]"]=yEe["[object Int8Array]"]=yEe["[object Int16Array]"]=yEe["[object Int32Array]"]=yEe["[object Map]"]=yEe["[object Number]"]=yEe[mEe]=yEe["[object RegExp]"]=yEe["[object Set]"]=yEe["[object String]"]=yEe["[object Symbol]"]=yEe["[object Uint8Array]"]=yEe["[object Uint8ClampedArray]"]=yEe["[object Uint16Array]"]=yEe["[object Uint32Array]"]=!0,yEe["[object Error]"]=yEe[gEe]=yEe["[object WeakMap]"]=!1,mt(T1e,"baseClone"),yt(T1e,"baseClone"),vEe=T1e,mt(k1e,"clone"),yt(k1e,"clone"),bEe=k1e,mt(w1e,"compact"),yt(w1e,"compact"),xEe=w1e,mt(C1e,"setCacheAdd"),yt(C1e,"setCacheAdd"),ALe=C1e,mt(S1e,"setCacheHas"),yt(S1e,"setCacheHas"),bLe=S1e,mt(E1e,"SetCache"),yt(E1e,"SetCache"),E1e.prototype.add=E1e.prototype.push=ALe,E1e.prototype.has=bLe,TEe=E1e,mt(_1e,"arraySome"),yt(_1e,"arraySome"),kEe=_1e,mt(A1e,"cacheHas"),yt(A1e,"cacheHas"),wEe=A1e,mt(R1e,"equalArrays"),yt(R1e,"equalArrays"),CEe=R1e,mt(L1e,"mapToArray"),yt(L1e,"mapToArray"),SEe=L1e,mt(I1e,"setToArray"),yt(I1e,"setToArray"),EEe=I1e,F=fRe?fRe.prototype:void 0,_Ee=F?F.valueOf:void 0,mt(N1e,"equalByTag"),yt(N1e,"equalByTag"),AEe=N1e,$Re=Object.prototype,REe=$Re.hasOwnProperty,mt(D1e,"equalObjects"),yt(D1e,"equalObjects"),LEe=D1e,IEe="[object Arguments]",NEe="[object Array]",DEe="[object Object]",BRe=Object.prototype,MEe=BRe.hasOwnProperty,mt(M1e,"baseIsEqualDeep"),yt(M1e,"baseIsEqualDeep"),OEe=M1e,mt(O1e,"baseIsEqual"),yt(O1e,"baseIsEqual"),PEe=O1e,mt(P1e,"baseIsMatch"),yt(P1e,"baseIsMatch"),BEe=P1e,mt(B1e,"isStrictComparable"),yt(B1e,"isStrictComparable"),$Ee=B1e,mt($1e,"getMatchData"),yt($1e,"getMatchData"),FEe=$1e,mt(F1e,"matchesStrictComparable"),yt(F1e,"matchesStrictComparable"),zEe=F1e,mt(z1e,"baseMatches"),yt(z1e,"baseMatches"),qEe=z1e,mt(q1e,"baseHasIn"),yt(q1e,"baseHasIn"),jEe=q1e,mt(j1e,"hasPath"),yt(j1e,"hasPath"),WEe=j1e,mt(W1e,"hasIn"),yt(W1e,"hasIn"),UEe=W1e,mt(U1e,"baseMatchesProperty"),yt(U1e,"baseMatchesProperty"),GEe=U1e,mt(G1e,"baseProperty"),yt(G1e,"baseProperty"),VEe=G1e,mt(V1e,"basePropertyDeep"),yt(V1e,"basePropertyDeep"),YEe=V1e,mt(Y1e,"property"),yt(Y1e,"property"),HEe=Y1e,mt(H1e,"baseIteratee"),yt(H1e,"baseIteratee"),XEe=H1e,mt(X1e,"arrayAggregator"),yt(X1e,"arrayAggregator"),KEe=X1e,mt(K1e,"createBaseFor"),yt(K1e,"createBaseFor"),ORe=K1e(),ZEe=ORe,mt(Z1e,"baseForOwn"),yt(Z1e,"baseForOwn"),z=Z1e,mt(Q1e,"createBaseEach"),yt(Q1e,"createBaseEach"),u9e=Q1e(z),QEe=u9e,mt(J1e,"baseAggregator"),yt(J1e,"baseAggregator"),JEe=J1e,mt(eme,"createAggregator"),yt(eme,"createAggregator"),ALe=eme,e_e=Object.prototype,t_e=e_e.hasOwnProperty,bLe=y6e(function(e,t){e=Object(e);var r=-1,i=t.length,n=2{e.accept(t)})}},Q_e=class extends Z_e{static{mt(this,"NonTerminal")}static{yt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},J_e=class extends Z_e{static{mt(this,"Rule")}static{yt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",z6e(this,j_e(e,e=>void 0!==e))}},e7e=class extends Z_e{static{mt(this,"Alternative")}static{yt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,z6e(this,j_e(e,e=>void 0!==e))}},t7e=class extends Z_e{static{mt(this,"Option")}static{yt(this,"Option")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},r7e=class extends Z_e{static{mt(this,"RepetitionMandatory")}static{yt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},i7e=class extends Z_e{static{mt(this,"RepetitionMandatoryWithSeparator")}static{yt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},n7e=class extends Z_e{static{mt(this,"Repetition")}static{yt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},a7e=class extends Z_e{static{mt(this,"RepetitionWithSeparator")}static{yt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}},s7e=class extends Z_e{static{mt(this,"Alternation")}static{yt(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,z6e(this,j_e(e,e=>void 0!==e))}},o7e=class{static{mt(this,"Terminal")}static{yt(this,"Terminal")}constructor(e){this.idx=1,z6e(this,j_e(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(Yme,"serializeGrammar"),yt(Yme,"serializeGrammar"),mt(Hme,"serializeProduction"),yt(Hme,"serializeProduction"),BRe=class{static{mt(this,"GAstVisitor")}static{yt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case Q_e:return this.visitNonTerminal(t);case e7e:return this.visitAlternative(t);case t7e:return this.visitOption(t);case r7e:return this.visitRepetitionMandatory(t);case i7e:return this.visitRepetitionMandatoryWithSeparator(t);case a7e:return this.visitRepetitionWithSeparator(t);case n7e:return this.visitRepetition(t);case s7e:return this.visitAlternation(t);case o7e:return this.visitTerminal(t);case J_e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},mt(Xme,"isSequenceProd"),yt(Xme,"isSequenceProd"),mt(Kme,"isOptionalProd"),yt(Kme,"isOptionalProd"),mt(Zme,"isBranchingProd"),yt(Zme,"isBranchingProd"),mt(Qme,"getProductionDslName"),yt(Qme,"getProductionDslName"),ALe=class{static{mt(this,"RestWalker")}static{yt(this,"RestWalker")}walk(r,i=[]){u_e(r.definition,(e,t)=>{if(t=l_e(r.definition,t+1),e instanceof Q_e)this.walkProdRef(e,t,i);else if(e instanceof o7e)this.walkTerminal(e,t,i);else if(e instanceof e7e)this.walkFlat(e,t,i);else if(e instanceof t7e)this.walkOption(e,t,i);else if(e instanceof r7e)this.walkAtLeastOne(e,t,i);else if(e instanceof i7e)this.walkAtLeastOneSep(e,t,i);else if(e instanceof a7e)this.walkManySep(e,t,i);else if(e instanceof n7e)this.walkMany(e,t,i);else{if(!(e instanceof s7e))throw Error("non exhaustive match");this.walkOr(e,t,i)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){t=t.concat(r),this.walk(e,t)}walkOption(e,t,r){t=t.concat(r),this.walk(e,t)}walkAtLeastOne(e,t,r){t=[new t7e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=Jme(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new t7e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=Jme(e,t,r),this.walk(e,t)}walkOr(e,t,r){let i=t.concat(r);u_e(e.definition,e=>{e=new e7e({definition:[e]}),this.walk(e,i)})}},mt(Jme,"restForRepetitionWithSeparator"),yt(Jme,"restForRepetitionWithSeparator"),mt(eye,"first"),yt(eye,"first"),mt(tye,"firstForSequence"),yt(tye,"firstForSequence"),mt(rye,"firstForBranching"),yt(rye,"firstForBranching"),mt(iye,"firstForTerminal"),yt(iye,"firstForTerminal"),l7e=class extends ALe{static{mt(this,"ResyncFollowsWalker")}static{yt(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){e=aye(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=eye(new e7e({definition:t})),this.follows[e]=r}},mt(nye,"computeAllProdsFollows"),yt(nye,"computeAllProdsFollows"),mt(aye,"buildBetweenProdsFollowPrefix"),yt(aye,"buildBetweenProdsFollowPrefix"),c7e={},h7e=new eLe,mt(sye,"getRegExpAst"),yt(sye,"getRegExpAst"),mt(oye,"clearRegExpParserCache"),yt(oye,"clearRegExpParserCache"),u7e="Complement Sets are not supported for first char optimization",d7e=`Unable to use "first char" lexer optimizations: `,mt(lye,"getOptimizedStartCodesIndices"),yt(lye,"getOptimizedStartCodesIndices"),mt(cye,"firstCharOptimizedIndices"),yt(cye,"firstCharOptimizedIndices"),mt(hye,"addOptimizedIdxToResult"),yt(hye,"addOptimizedIdxToResult"),mt(uye,"handleIgnoreCase"),yt(uye,"handleIgnoreCase"),mt(dye,"findCode"),yt(dye,"findCode"),mt(pye,"isWholeOptional"),yt(pye,"isWholeOptional"),p7e=class extends rCe{static{mt(this,"CharCodeFinder")}static{yt(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){N_e(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===dye(e,this.targetCharCodes)&&(this.found=!0):void 0!==dye(e,this.targetCharCodes)&&(this.found=!0)}},mt(gye,"canMatchCharCode"),yt(gye,"canMatchCharCode"),g7e="PATTERN",f7e="defaultMode",m7e="boolean"==typeof new RegExp("(?:)").sticky,mt(fye,"analyzeTokenTypes"),yt(fye,"analyzeTokenTypes"),mt(mye,"validatePatterns"),yt(mye,"validatePatterns"),mt(yye,"validateRegExpPattern"),yt(yye,"validateRegExpPattern"),mt(vye,"findMissingPatterns"),yt(vye,"findMissingPatterns"),mt(bye,"findInvalidPatterns"),yt(bye,"findInvalidPatterns"),y7e=/[^\\][$]/,mt(xye,"findEndOfInputAnchor"),yt(xye,"findEndOfInputAnchor"),mt(Tye,"findEmptyMatchRegExps"),yt(Tye,"findEmptyMatchRegExps"),v7e=/[^\\[][\^]|^\^/,mt(kye,"findStartOfInputAnchor"),yt(kye,"findStartOfInputAnchor"),mt(wye,"findUnsupportedFlags"),yt(wye,"findUnsupportedFlags"),mt(Cye,"findDuplicatePatterns"),yt(Cye,"findDuplicatePatterns"),mt(Sye,"findInvalidGroupType"),yt(Sye,"findInvalidGroupType"),mt(Eye,"findModesThatDoNotExist"),yt(Eye,"findModesThatDoNotExist"),mt(_ye,"findUnreachablePatterns"),yt(_ye,"findUnreachablePatterns"),mt(Aye,"tryToMatchStrToPattern"),yt(Aye,"tryToMatchStrToPattern"),mt(Rye,"noMetaChar"),yt(Rye,"noMetaChar"),mt(Lye,"usesLookAheadOrBehind"),yt(Lye,"usesLookAheadOrBehind"),mt(Iye,"addStartOfInput"),yt(Iye,"addStartOfInput"),mt(Nye,"addStickyFlag"),yt(Nye,"addStickyFlag"),mt(Dye,"performRuntimeChecks"),yt(Dye,"performRuntimeChecks"),mt(Mye,"performWarningRuntimeChecks"),yt(Mye,"performWarningRuntimeChecks"),mt(Oye,"cloneEmptyGroups"),yt(Oye,"cloneEmptyGroups"),mt(Pye,"isCustomPattern"),yt(Pye,"isCustomPattern"),mt(Bye,"isShortPattern"),yt(Bye,"isShortPattern"),b7e={test:yt(function(t){var r=t.length;for(let e=this.lastIndex;e${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,i,n,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}},(E=S7e=S7e||{})[E.MISSING_PATTERN=0]="MISSING_PATTERN",E[E.INVALID_PATTERN=1]="INVALID_PATTERN",E[E.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",E[E.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",E[E.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",E[E.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",E[E.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",E[E.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",E[E.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",E[E.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",E[E.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",E[E.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",E[E.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",E[E.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",E[E.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",E[E.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",E[E.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",E[E.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",E7e={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:C7e,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(E7e),(_7e=class{static{mt(this,"Lexer")}static{yt(this,"Lexer")}constructor(n,a=E7e){if(this.lexerDefinition=n,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{var r,i,n,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:i,value:n}=(this.traceInitIndent <${e}>`),Wme(t)),a=10 time: ${i}ms`),this.traceInitIndent--,n):t()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. a boolean 2nd argument is no longer supported`);this.config=z6e({},E7e,a);var e=this.config.traceInitPerf;!0===e?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof e&&(this.traceInitMaxIdent=e,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,e=!0,i=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===E7e.lineTerminatorsPattern)this.config.lineTerminatorsPattern=b7e;else if(this.config.lineTerminatorCharacters===E7e.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=bCe(n)?{modes:{defaultMode:bEe(n)},defaultMode:f7e}:(e=!1,bEe(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Dye(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Mye(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},u_e(r.modes,(e,t)=>{r.modes[t]=G_e(e,e=>$_e(e))}),$6e(r.modes)),t;if(u_e(r.modes,(t,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(mye(t,i))}),P_e(this.lexerDefinitionErrors)){Vye(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=fye(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=e.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=e.charCodeToPatternIdxToConfig,this.emptyGroups=z6e({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!P_e(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=T_e(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `),new Error(`Errors detected in definition of Lexer: `+t);u_e(this.lexerDefinitionWarning,e=>{jme(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(m7e?(this.chopInput=PCe,this.match=this.matchWithTest):(this.updateLastIndex=KCe,this.match=this.matchWithExec),e&&(this.handleModes=KCe),!1===this.trackStartLines&&(this.computeNewColumn=PCe),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=KCe),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var e=U_e(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!P_e(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{oye()}),this.TRACE_INIT("toFastProperties",()=>{Ume(this)})})}tokenize(e,t=this.defaultMode){if(P_e(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=T_e(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+e)}tokenizeInternal(n,P){let e,a,t,r,i,s,o,l,c,h,B,u,d,$,p,g=n,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(n.length/10),y=new Array(z),v=[],b=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,T=Oye(this.emptyGroups),q=this.trackStartLines,k=this.config.lineTerminatorsPattern,w=0,C=[],S=[],E=[],j=[];Object.freeze(j);let _;function A(){return C}function R(e){return e=jye(e),void 0===(e=S[e])?j:e}mt(A,"getPossiblePatternsSlow"),yt(A,"getPossiblePatternsSlow"),mt(R,"getPossiblePatternsOptimized"),yt(R,"getPossiblePatternsOptimized");var W=yt(e=>{var t;1===E.length&&void 0===e.tokenType.PUSH_MODE?(t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e),v.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})):(E.pop(),e=o_e(E),C=this.patternIdxToConfig[e],S=this.charCodeToPatternIdxToConfig[e],w=C.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=S&&t?R:A)},"pop_mode");function L(e){E.push(e),S=this.charCodeToPatternIdxToConfig[e],C=this.patternIdxToConfig[e],w=C.length,w=C.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=S&&e?R:A}mt(L,"push_mode"),yt(L,"push_mode"),L.call(this,P);let I,U=this.config.recoveryEnabled;for(;fs.length){s=r,o=l,I=D;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,b,x,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):T[h].push(u)),n=this.chopInput(n,c),f+=c,x=this.computeNewColumn(x,c),!0===q&&!0===I.canLineTerminator){let e=0,t,r;for(k.lastIndex=0;!0===(t=k.test(s))&&(r=k.lastIndex-1,e++),!0===t;);0!==e&&(b+=e,x=c-r,this.updateTokenEndLineColumnLocation(u,h,r,e,b,x,c))}this.handleModes(I,W,L,u)}else{let e=f,t=b,r=x,i=!1===U;for(;!1===i&&f ${i2e(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=` but found: '`+b_e(t).image+"'";return r?i+r+t:(r=U_e(e,(e,t)=>e.concat(t),[]),e=T_e(r,e=>`[${T_e(e,e=>i2e(e)).join(", ")}]`),i+`one of these possible Token sequences: `+T_e(e,(e,t)=>` ${t+1}. `+e).join(` `)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=` but found: '`+b_e(t).image+"'";return r?i+r+t:i+`expecting at least one iteration which starts with one of these possible Token sequences:: <${T_e(e,e=>`[${T_e(e,e=>i2e(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze($7e),F7e={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- inside top level rule: ->`+e.name+"<-"}},z7e={buildDuplicateFoundError(e,t){function r(e){return e instanceof o7e?e.terminalType.name:e instanceof Q_e?e.nonTerminalName:""}mt(r,"getExtraProductionArgument2"),yt(r,"getExtraProductionArgument");let i=e.name,n=b_e(t),a=n.idx,s=Qme(n),o=r(n),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} appears more than once (${t.length} times) in the top level rule: ->${i}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,` `)},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){var t=T_e(e.prefixPath,e=>i2e(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX For Further details.`},buildAlternationAmbiguityError(e){var t=T_e(e.prefixPath,e=>i2e(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, <${t}> may appears as a prefix path in all these alternatives. `+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`},buildEmptyRepetitionError(e){let t=Qme(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: inside <${e.topLevelRule.name}> Rule. has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){var t=e.topLevelRule.name;return`Left Recursion found in grammar. rule: <${t}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${t+" --\x3e "+T_e(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")} To fix this refactor your grammar to remove the left recursion. see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){return`Duplicate definition, rule: ->${e.topLevelRule instanceof J_e?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}},mt(c2e,"resolveGrammar"),yt(c2e,"resolveGrammar"),q7e=class extends BRe{static{mt(this,"GastRefResolverVisitor")}static{yt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){u_e(L_e(this.nameToTopRule),e=>{(this.currTopLevel=e).accept(this)})}visitNonTerminal(e){var t=this.nameToTopRule[e.nonTerminalName];t?e.referencedRule=t:(t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e),this.errors.push({message:t,type:y8e.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}},ORe=class extends ALe{static{mt(this,"AbstractNextPossibleTokensWalker")}static{yt(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=bEe(this.path.ruleStack).reverse(),this.occurrenceStack=bEe(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence&&(t=t.concat(r),this.updateExpectedNext(),this.walk(e.referencedRule,t))}updateExpectedNext(){P_e(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},j7e=class extends ORe{static{mt(this,"NextAfterTokenWalker")}static{yt(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(e=t.concat(r),t=new e7e({definition:e}),this.possibleTokTypes=eye(t),this.found=!0)}},z=class extends ALe{static{mt(this,"AbstractNextTerminalAfterProductionWalker")}static{yt(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},W7e=class extends z{static{mt(this,"NextTerminalAfterManyWalker")}static{yt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(e,t,r)}},U7e=class extends z{static{mt(this,"NextTerminalAfterManySepWalker")}static{yt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(e,t,r)}},G7e=class extends z{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}static{yt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(e,t,r)}},V7e=class extends z{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}static{yt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var i;e.idx===this.occurrence?(i=b_e(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof o7e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(h2e,"possiblePathsFrom"),yt(h2e,"possiblePathsFrom"),mt(u2e,"nextPossibleTokensAfter"),yt(u2e,"nextPossibleTokensAfter"),mt(d2e,"expandTopLevelRule"),yt(d2e,"expandTopLevelRule"),(E=Y7e=Y7e||{})[E.OPTION=0]="OPTION",E[E.REPETITION=1]="REPETITION",E[E.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",E[E.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",E[E.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",E[E.ALTERNATION=5]="ALTERNATION",mt(p2e,"getProdType"),yt(p2e,"getProdType"),mt(g2e,"getLookaheadPaths"),yt(g2e,"getLookaheadPaths"),mt(f2e,"buildLookaheadFuncForOr"),yt(f2e,"buildLookaheadFuncForOr"),mt(m2e,"buildLookaheadFuncForOptionalProd"),yt(m2e,"buildLookaheadFuncForOptionalProd"),mt(y2e,"buildAlternativesLookAheadFunc"),yt(y2e,"buildAlternativesLookAheadFunc"),mt(v2e,"buildSingleAlternativeLookaheadFunction"),yt(v2e,"buildSingleAlternativeLookaheadFunction"),H7e=class extends ALe{static{mt(this,"RestDefinitionFinderWalker")}static{yt(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,i){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(i),!0)}walkOption(e,t,r){this.checkIsTarget(e,Y7e.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Y7e.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Y7e.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},X7e=class extends BRe{static{mt(this,"InsideDefinitionFinderVisitor")}static{yt(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Y7e.OPTION)}visitRepetition(e){this.checkIsTarget(e,Y7e.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Y7e.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Y7e.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Y7e.ALTERNATION)}},mt(b2e,"initializeArrayOfArrays"),yt(b2e,"initializeArrayOfArrays"),mt(x2e,"pathToHashKeys"),yt(x2e,"pathToHashKeys"),mt(T2e,"isUniquePrefixHash"),yt(T2e,"isUniquePrefixHash"),mt(k2e,"lookAheadSequenceFromAlternatives"),yt(k2e,"lookAheadSequenceFromAlternatives"),mt(w2e,"getLookaheadPathsForOr"),yt(w2e,"getLookaheadPathsForOr"),mt(C2e,"getLookaheadPathsForOptionalProd"),yt(C2e,"getLookaheadPathsForOptionalProd"),mt(S2e,"containsPath"),yt(S2e,"containsPath"),mt(E2e,"isStrictPrefixOfPath"),yt(E2e,"isStrictPrefixOfPath"),mt(_2e,"areTokenCategoriesNotUsed"),yt(_2e,"areTokenCategoriesNotUsed"),mt(A2e,"validateLookahead"),yt(A2e,"validateLookahead"),mt(R2e,"validateGrammar"),yt(R2e,"validateGrammar"),mt(L2e,"validateDuplicateProductions"),yt(L2e,"validateDuplicateProductions"),mt(I2e,"identifyProductionForDuplicates"),yt(I2e,"identifyProductionForDuplicates"),mt(N2e,"getExtraProductionArgument"),yt(N2e,"getExtraProductionArgument"),K7e=class extends BRe{static{mt(this,"OccurrenceValidationCollector")}static{yt(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},mt(D2e,"validateRuleDoesNotAlreadyExist"),yt(D2e,"validateRuleDoesNotAlreadyExist"),mt(M2e,"validateRuleIsOverridden"),yt(M2e,"validateRuleIsOverridden"),mt(O2e,"validateNoLeftRecursion"),yt(O2e,"validateNoLeftRecursion"),mt(P2e,"getFirstNoneTerminal"),yt(P2e,"getFirstNoneTerminal"),Z7e=class extends BRe{static{mt(this,"OrCollector")}static{yt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(B2e,"validateEmptyOrAlternative"),yt(B2e,"validateEmptyOrAlternative"),mt($2e,"validateAmbiguousAlternationAlternatives"),yt($2e,"validateAmbiguousAlternationAlternatives"),Q7e=class extends BRe{static{mt(this,"RepetitionCollector")}static{yt(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},mt(F2e,"validateTooManyAlts"),yt(F2e,"validateTooManyAlts"),mt(z2e,"validateSomeNonEmptyLookaheadPath"),yt(z2e,"validateSomeNonEmptyLookaheadPath"),mt(q2e,"checkAlternativesAmbiguities"),yt(q2e,"checkAlternativesAmbiguities"),mt(j2e,"checkPrefixAlternativesAmbiguities"),yt(j2e,"checkPrefixAlternativesAmbiguities"),mt(W2e,"checkTerminalAndNoneTerminalsNameSpace"),yt(W2e,"checkTerminalAndNoneTerminalsNameSpace"),mt(U2e,"resolveGrammar2"),yt(U2e,"resolveGrammar"),mt(G2e,"validateGrammar2"),yt(G2e,"validateGrammar"),J7e=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(J7e),mt(V2e,"isRecognitionException"),yt(V2e,"isRecognitionException"),u9e=class extends Error{static{mt(this,"RecognitionException")}static{yt(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},e8e=class extends u9e{static{mt(this,"MismatchedTokenException")}static{yt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},t8e=class extends u9e{static{mt(this,"NoViableAltException")}static{yt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},r8e=class extends u9e{static{mt(this,"NotAllInputParsedException")}static{yt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},i8e=class extends u9e{static{mt(this,"EarlyExitException")}static{yt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}},n8e={},a8e="InRuleRecoveryException",s8e=class extends Error{static{mt(this,"InRuleRecoveryException")}static{yt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=a8e}},v8e=class{static{mt(this,"Recoverable")}static{yt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(__e(e,"recoveryEnabled")?e:f8e).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Y2e)}getTokenToInsert(e){return(e=o2e(e,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=yt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new e8e(e,l,this.LA(0))).resyncedTokens=c_e(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,i))return void h();if(r.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,n)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(!1===r||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){return e=this.getCurrentGrammarPath(e,t),this.getNextPossibleTokenTypes(e)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e))return t=this.SKIP_TOKEN(),this.consumeToken(),t;throw new s8e("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||P_e(t))return!1;let r=this.LA(1);return void 0!==v_e(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){var t=this.getCurrFollowKey(),t=this.getFollowSetFromFollowKey(t);return N_e(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var i=v_e(e,e=>l2e(t,e));if(void 0!==i)return i;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?n8e:(e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return T_e(r,(e,t)=>0===t?n8e:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:i[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=T_e(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return bSe(e)}getFollowSetFromFollowKey(e){return e===n8e?[B7e]:(e=e.ruleName+e.idxInCallingRule+"_~IN~_"+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,B7e)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return c_e(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:bEe(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return T_e(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(Y2e,"attemptInRepetitionRecovery"),yt(Y2e,"attemptInRepetitionRecovery"),mt(H2e,"getKeyForAutomaticLookahead"),yt(H2e,"getKeyForAutomaticLookahead"),o8e=class{static{mt(this,"LLkLookaheadStrategy")}static{yt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:f8e.maxLookahead}validate(e){var t,r,i=this.validateNoLeftRecursion(e.rules);return P_e(i)?(t=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),e=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead),[...i,...t,...r,...e]):i}validateNoLeftRecursion(e){return k_e(e,e=>O2e(e,e,z7e))}validateEmptyOrAlternatives(e){return k_e(e,e=>B2e(e,z7e))}validateAmbiguousAlternationAlternatives(e,t){return k_e(e,e=>$2e(e,t,z7e))}validateSomeNonEmptyLookaheadPath(e,t){return z2e(e,t,z7e)}buildLookaheadForAlternation(e){return f2e(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,y2e)}buildLookaheadForOptional(e){return m2e(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,p2e(e.prodType),v2e)}},fRe=class{static{mt(this,"LooksAhead")}static{yt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(__e(e,"dynamicTokensEnabled")?e:f8e).dynamicTokensEnabled,this.maxLookahead=(__e(e,"maxLookahead")?e:f8e).maxLookahead,this.lookaheadStrategy=__e(e,"lookaheadStrategy")?e.lookaheadStrategy:new o8e({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){u_e(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:n,repetitionWithSeparator:a}=X2e(s);u_e(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+Qme(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=H2e(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),u_e(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,Qme(e))}),u_e(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,Qme(e))}),u_e(i,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,Qme(e))}),u_e(n,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,Qme(e))}),u_e(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,Qme(e))})})})}computeLookaheadFunc(r,i,n,a,s,e){this.TRACE_INIT(""+e+(0===i?"":i),()=>{var e=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:i,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),t=H2e(this.fullRuleNameToShort[r.name],n,i);this.setLaFuncCache(t,e)})}getKeyForAutomaticLookahead(e,t){return t|e|this.getLastExplicitRuleShortName()}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},bLe=class extends BRe{static{mt(this,"DslMethodsCollectorVisitor")}static{yt(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},l8e=new bLe,mt(X2e,"collectMethods"),yt(X2e,"collectMethods"),mt(K2e,"setNodeLocationOnlyOffset"),yt(K2e,"setNodeLocationOnlyOffset"),mt(Z2e,"setNodeLocationFull"),yt(Z2e,"setNodeLocationFull"),mt(Q2e,"addTerminalToCst"),yt(Q2e,"addTerminalToCst"),mt(J2e,"addNoneTerminalToCst"),yt(J2e,"addNoneTerminalToCst"),mt(eve,"defineNameProp"),yt(eve,"defineNameProp"),mt(tve,"defaultVisit"),yt(tve,"defaultVisit"),mt(rve,"createBaseSemanticVisitorConstructor"),yt(rve,"createBaseSemanticVisitorConstructor"),mt(ive,"createBaseVisitorConstructorWithDefaults"),yt(ive,"createBaseVisitorConstructorWithDefaults"),(E=c8e=c8e||{})[E.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",E[E.MISSING_METHOD=1]="MISSING_METHOD",mt(nve,"validateVisitor"),yt(nve,"validateVisitor"),mt(ave,"validateMissingCstMethods"),yt(ave,"validateMissingCstMethods"),F=class{static{mt(this,"TreeBuilder")}static{yt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(__e(e,"nodeLocationTracking")?e:f8e).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Z2e,this.setNodeLocationFromNode=Z2e,this.cstPostRule=KCe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=KCe,this.setNodeLocationFromNode=KCe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=K2e,this.setNodeLocationFromNode=K2e,this.cstPostRule=KCe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=KCe,this.setNodeLocationFromNode=KCe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=KCe,this.setNodeLocationFromNode=KCe,this.cstPostRule=KCe,this.setInitialNodeLocation=KCe}else this.cstInvocationStateUpdate=KCe,this.cstFinallyStateUpdate=KCe,this.cstPostTerminal=KCe,this.cstPostNonTerminal=KCe,this.cstPostRule=KCe}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){e={name:e,children:Object.create(null)},this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?(e.endOffset=t.endOffset,e.endLine=t.endLine,e.endColumn=t.endColumn):(e.startOffset=NaN,e.startLine=NaN,e.startColumn=NaN)}cstPostRuleOnlyOffset(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?e.endOffset=t.endOffset:e.startOffset=NaN}cstPostTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];Q2e(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];J2e(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return $_e(this.baseCstVisitorConstructor)?(e=rve(this.className,$6e(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return $_e(this.baseCstVisitorWithDefaultsConstructor)?(e=ive(this.className,$6e(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=e):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},$Re=class{static{mt(this,"LexerAdapter")}static{yt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):g8e}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?g8e:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},eLe=class{static{mt(this,"RecognizerApi")}static{yt(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=m8e){N_e(this.definedRulesNames,e)&&(i={message:z7e.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:y8e.DUPLICATE_RULE_NAME,ruleName:e},this.definitionErrors.push(i)),this.definedRulesNames.push(e);var i=this.defineRule(e,t,r);return this[e]=i}OVERRIDE_RULE(e,t,r=m8e){var i=M2e(e,this.definedRulesNames,this.className),i=(this.definitionErrors=this.definitionErrors.concat(i),this.defineRule(e,t,r));return this[e]=i}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);var e=this.saveRecogState();try{return t.apply(this,r),!0}catch(e){if(V2e(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Yme(L_e(this.gastProductionsCache))}},ORe=class{static{mt(this,"RecognizerEngine")}static{yt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Gye,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},__e(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(bCe(e)){if(P_e(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if("number"==typeof e[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(bCe(e))this.tokensMap=U_e(e,(e,t)=>(e[t.name]=t,e),{});else if(__e(e,"modes")&&g_e(bSe(L_e(e.modes)),r2e))t=bSe(L_e(e.modes)),t=K_e(t),this.tokensMap=U_e(t,(e,t)=>(e[t.name]=t,e),{});else{if(!_Ce(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=bEe(e)}this.tokensMap.EOF=B7e,t=__e(e,"modes")?bSe(L_e(e.modes)):L_e(e),e=g_e(t,e=>P_e(e.categoryMatches)),this.tokenMatcher=e?Gye:Uye,Vye(L_e(this.tokensMap))}defineRule(r,i,e){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called' Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=(__e(e,"resyncEnabled")?e:m8e).resyncEnabled,a=(__e(e,"recoveryValueFunc")?e:m8e).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?yt(mt(function(...e){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}catch(e){return this.invokeRuleCatch(e,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry2"),"invokeRuleWithTry"):yt(mt(function(...e){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,e)}catch(e){return this.invokeRuleCatch(e,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),"invokeRuleWithTryCst"),Object.assign(e,{ruleName:r,originalGrammarAction:i})}invokeRuleCatch(e,t,r){var i=1===this.RULE_STACK.length,t=t&&!this.isBackTracking()&&this.recoveryEnabled;if(V2e(e)){var n=e;if(t){if(t=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(t))return n.resyncedTokens=this.reSyncTo(t),this.outputCst?((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,t):r(e);this.outputCst&&((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,n.partialCstResult=t)}else if(i)return this.moveToTerminatedState(),r(e);throw n}throw e}optionInternal(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if("function"!=typeof e){n=e.DEF;let t=e.GATE;if(void 0!==t){let e=i;i=yt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,r,t){let i=this.getLaFuncFromCache(t),n;if("function"!=typeof r){n=r.DEF;let t=r.GATE;if(void 0!==t){let e=i;i=yt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=r;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Y7e.REPETITION_MANDATORY,r.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,G7e)}atLeastOneSepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,Y7e.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(i.call(this),r=yt(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,V7e],r,1536,e,V7e)}manyInternal(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,r,t){let i=this.getLaFuncFromCache(t),n;if("function"!=typeof r){n=r.DEF;let t=r.GATE;if(void 0!==t){let e=i;i=yt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else n=r;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,W7e,a)}manySepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(i.call(this),t=yt(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,t,i,U7e],t,1280,e,U7e)}}repetitionSepSecondInternal(e,t,r,i,n){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,n],r,1536,e,n)}doSingleRepetition(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){var r=this.getKeyForAutomaticLookahead(256,t),i=bCe(e)?e:e.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,i)))return i[r].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){var e,t;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new r8e(t,e)))}subruleInternal(e,t,r){var i;try{var n=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,n),this.cstPostNonTerminal(i,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),i}catch(t){throw this.subruleInternalError(t,r,e.ruleName)}}subruleInternalError(e,t,r){throw V2e(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{var n=this.LA(1);!0===this.tokenMatcher(n,e)?(this.consumeToken(),i=n):this.consumeInternalError(e,n,r)}catch(r){i=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){var i=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new e8e(r,t,i))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;t=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,t)}catch(e){throw e.name===a8e?r:e}}saveRecogState(){var e=this.errors,t=bEe(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),B7e)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},z=class{static{mt(this,"ErrorHandler")}static{yt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(__e(e,"errorMessageProvider")?e:f8e).errorMessageProvider}SAVE_ERROR(e){if(V2e(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:bEe(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return bEe(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var i=this.getCurrRuleFullName(),e=C2e(e,this.getGAstProductions()[i],t,this.maxLookahead)[0],n=[];for(let e=1;e<=this.maxLookahead;e++)n.push(this.LA(e));throw t=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:e,actual:n,previous:this.LA(0),customUserDescription:r,ruleName:i}),this.SAVE_ERROR(new i8e(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=w2e(e,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));throw r=this.LA(0),e=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:e,actual:i,previous:r,customUserDescription:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new t8e(e,this.LA(1),r))}},ALe=class{static{mt(this,"ContentAssist")}static{yt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if($_e(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return u2e([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=b_e(e.ruleStack),t=this.getGAstProductions()[t];return new j7e(t,e).startWalking()}},h8e={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(h8e),u8e=Math.pow(2,8)-1,Vye([u9e=a2e({name:"RECORDING_PHASE_TOKEN",pattern:_7e.NA})]),d8e=o2e(u9e,`This IToken indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze(d8e),p8e={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},BRe=class{static{mt(this,"GastRecorder")}static{yt(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var e=0{var t=this;for(let e=0;e<10;e++){var r=0!0}LA_RECORD(e){return g8e}topLevelRuleRecord(e,t){try{var r=new J_e({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+` This error was thrown during the "grammar recording phase" For more info see: https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw e}}optionInternalRecord(e,t){return sve.call(this,t7e,e,t)}atLeastOneInternalRecord(e,t){sve.call(this,r7e,t,e)}atLeastOneSepFirstInternalRecord(e,t){sve.call(this,i7e,t,e,!0)}manyInternalRecord(e,t){sve.call(this,n7e,t,e)}manySepFirstInternalRecord(e,t){sve.call(this,a7e,t,e,!0)}orInternalRecord(e,t){return ove.call(this,e,t)}subruleInternalRecord(e,t,r){var i,n;if(cve(t),e&&!1!==__e(e,"ruleName"))return i=o_e(this.recordingProdStack),n=e.ruleName,n=new Q_e({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?p8e:h8e;throw(r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(e,t,r){var i;if(cve(t),Qye(e))return i=o_e(this.recordingProdStack),r=new o7e({idx:t,terminalType:e,label:r?.LABEL}),i.definition.push(r),d8e;throw(i=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,i}},mt(sve,"recordProd"),yt(sve,"recordProd"),mt(ove,"recordOrProd"),yt(ove,"recordOrProd"),mt(lve,"getIdxSuffix"),yt(lve,"getIdxSuffix"),mt(cve,"assertMethodIdxIsValid"),yt(cve,"assertMethodIdxIsValid"),bLe=class{static{mt(this,"PerformanceTracer")}static{yt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;__e(e,"traceInitPerf")?(e=e.traceInitPerf,this.traceInitMaxIdent=(t="number"==typeof e)?e:1/0,this.traceInitPerf=t?0 <${e}>`),Wme(t)),a=10 time: ${i}ms`),this.traceInitIndent--,n):t()}},mt(hve,"applyMixins"),yt(hve,"applyMixins"),g8e=o2e(B7e,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(g8e),f8e=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:$7e,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),m8e=Object.freeze({recoveryValueFunc:yt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(E=y8e=y8e||{})[E.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",E[E.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",E[E.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",E[E.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",E[E.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",E[E.LEFT_RECURSION=5]="LEFT_RECURSION",E[E.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",E[E.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",E[E.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",E[E.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",E[E.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",E[E.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",E[E.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",E[E.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",mt(uve,"EMPTY_ALT"),yt(uve,"EMPTY_ALT"),(u9e=class B{static{mt(this,"_Parser")}static{yt(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var e;this.selfAnalysisDone=!0;let r=this.className,i=(this.TRACE_INIT("toFastProps",()=>{Ume(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),u_e(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,r;this.TRACE_INIT(e+" Rule",()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{i=U2e({rules:L_e(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;P_e(i)&&!1===this.skipValidations&&(e=G2e({rules:L_e(this.gastProductionsCache),tokenTypes:L_e(this.tokensMap),errMsgProvider:z7e,grammarName:r}),t=A2e({lookaheadStrategy:this.lookaheadStrategy,rules:L_e(this.gastProductionsCache),tokenTypes:L_e(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),P_e(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=nye(L_e(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:L_e(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(L_e(this.gastProductionsCache))})),!B.DEFER_DEFINITION_ERRORS_HANDLING&&!P_e(this.definitionErrors))throw e=T_e(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected: `+e.join(` ------------------------------- `))})}constructor(e,t){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),__e(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=(__e(t,"skipValidations")?t:f8e).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,hve(u9e,[v8e,fRe,F,$Re,ORe,eLe,z,ALe,BRe,bLe]),v8e=class extends u9e{static{mt(this,"EmbeddedActionsParser")}static{yt(this,"EmbeddedActionsParser")}constructor(e,t=f8e){(t=bEe(t)).outputCst=!1,super(e,t)}},mt(dve,"arrayMap2"),yt(dve,"arrayMap"),b8e=dve,mt(pve,"listCacheClear2"),yt(pve,"listCacheClear"),fRe=pve,mt(gve,"eq2"),yt(gve,"eq"),x8e=gve,mt(fve,"assocIndexOf2"),yt(fve,"assocIndexOf"),T8e=fve,F=Array.prototype,k8e=F.splice,mt(mve,"listCacheDelete2"),yt(mve,"listCacheDelete"),$Re=mve,mt(yve,"listCacheGet2"),yt(yve,"listCacheGet"),ORe=yve,mt(vve,"listCacheHas2"),yt(vve,"listCacheHas"),eLe=vve,mt(bve,"listCacheSet2"),yt(bve,"listCacheSet"),z=bve,mt(xve,"ListCache2"),yt(xve,"ListCache"),xve.prototype.clear=fRe,xve.prototype.delete=$Re,xve.prototype.get=ORe,xve.prototype.has=eLe,xve.prototype.set=z,w8e=xve,mt(Tve,"stackClear2"),yt(Tve,"stackClear"),ALe=Tve,mt(kve,"stackDelete2"),yt(kve,"stackDelete"),BRe=kve,mt(wve,"stackGet2"),yt(wve,"stackGet"),bLe=wve,mt(Cve,"stackHas2"),yt(Cve,"stackHas"),u9e=Cve,F="object"==typeof global&&global&&global.Object===Object&&global,fRe=F,$Re="object"==typeof self&&self&&self.Object===Object&&self,ORe=fRe||$Re||Function("return this")(),z=(eLe=ORe).Symbol,F=z,$Re=Object.prototype,C8e=$Re.hasOwnProperty,S8e=$Re.toString,E8e=F?F.toStringTag:void 0,mt(Sve,"getRawTag2"),yt(Sve,"getRawTag"),_8e=Sve,ORe=Object.prototype,A8e=ORe.toString,mt(Eve,"objectToString2"),yt(Eve,"objectToString"),R8e=Eve,L8e=F?F.toStringTag:void 0,mt(_ve,"baseGetTag2"),yt(_ve,"baseGetTag"),I8e=_ve,mt(Ave,"isObject2"),yt(Ave,"isObject"),N8e=Ave,mt(Rve,"isFunction2"),yt(Rve,"isFunction"),D8e=Rve,z=eLe["__core-js_shared__"],E=/[^.]+$/.exec(($Re=z)&&$Re.keys&&$Re.keys.IE_PROTO||""),M8e=E?"Symbol(src)_1."+E:"",mt(Lve,"isMasked2"),yt(Lve,"isMasked"),O8e=Lve,ORe=Function.prototype,P8e=ORe.toString,mt(Ive,"toSource2"),yt(Ive,"toSource"),B8e=Ive,z=/[\\^$.*+?()[\]{}|]/g,$8e=/^\[object .+?Constructor\]$/,$Re=Function.prototype,ORe=Object.prototype,$Re=$Re.toString,ORe=ORe.hasOwnProperty,F8e=RegExp("^"+$Re.call(ORe).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(Nve,"baseIsNative2"),yt(Nve,"baseIsNative"),z8e=Nve,mt(Dve,"getValue2"),yt(Dve,"getValue"),q8e=Dve,mt(Mve,"getNative2"),yt(Mve,"getNative"),ORe=($Re=Mve)(eLe,"Map"),j8e=ORe,z=$Re(Object,"create"),W8e=z,mt(Ove,"hashClear2"),yt(Ove,"hashClear"),ORe=Ove,mt(Pve,"hashDelete2"),yt(Pve,"hashDelete"),z=Pve,c9e=Object.prototype,U8e=c9e.hasOwnProperty,mt(Bve,"hashGet2"),yt(Bve,"hashGet"),c9e=Bve,xLe=Object.prototype,G8e=xLe.hasOwnProperty,mt($ve,"hashHas2"),yt($ve,"hashHas"),xLe=$ve,mt(Fve,"hashSet2"),yt(Fve,"hashSet"),vRe=Fve,mt(zve,"Hash2"),yt(zve,"Hash"),zve.prototype.clear=ORe,zve.prototype.delete=z,zve.prototype.get=c9e,zve.prototype.has=xLe,zve.prototype.set=vRe,V8e=zve,mt(qve,"mapCacheClear2"),yt(qve,"mapCacheClear"),ORe=qve,mt(jve,"isKeyable2"),yt(jve,"isKeyable"),Y8e=jve,mt(Wve,"getMapData2"),yt(Wve,"getMapData"),H8e=Wve,mt(Uve,"mapCacheDelete2");yt(Uve,"mapCacheDelete"),z=Uve,mt(Gve,"mapCacheGet2"),yt(Gve,"mapCacheGet"),c9e=Gve,mt(Vve,"mapCacheHas2"),yt(Vve,"mapCacheHas"),xLe=Vve,mt(Yve,"mapCacheSet2"),yt(Yve,"mapCacheSet"),vRe=Yve,mt(Hve,"MapCache2"),yt(Hve,"MapCache"),Hve.prototype.clear=ORe,Hve.prototype.delete=z,Hve.prototype.get=c9e,Hve.prototype.has=xLe,Hve.prototype.set=vRe,X8e=Hve,mt(Xve,"stackSet2"),yt(Xve,"stackSet"),ORe=Xve,mt(Kve,"Stack2"),yt(Kve,"Stack"),Kve.prototype.clear=ALe,Kve.prototype.delete=BRe,Kve.prototype.get=bLe,Kve.prototype.has=u9e,Kve.prototype.set=ORe,K8e=Kve,mt(Zve,"setCacheAdd2"),yt(Zve,"setCacheAdd"),z=Zve,mt(Qve,"setCacheHas2"),yt(Qve,"setCacheHas"),c9e=Qve,mt(Jve,"SetCache2"),yt(Jve,"SetCache"),Jve.prototype.add=Jve.prototype.push=z,Jve.prototype.has=c9e,Z8e=Jve,mt(ebe,"arraySome2"),yt(ebe,"arraySome"),Q8e=ebe,mt(tbe,"cacheHas2"),yt(tbe,"cacheHas"),J8e=tbe,mt(rbe,"equalArrays2"),yt(rbe,"equalArrays"),eAe=rbe,xLe=eLe.Uint8Array,tAe=xLe,mt(ibe,"mapToArray2"),yt(ibe,"mapToArray"),rAe=ibe,mt(nbe,"setToArray2"),yt(nbe,"setToArray"),iAe=nbe,vRe=F?F.prototype:void 0,nAe=vRe?vRe.valueOf:void 0,mt(abe,"equalByTag2"),yt(abe,"equalByTag"),aAe=abe,mt(sbe,"arrayPush2"),yt(sbe,"arrayPush"),sAe=sbe,ALe=Array.isArray,oAe=ALe,mt(obe,"baseGetAllKeys2"),yt(obe,"baseGetAllKeys"),lAe=obe,mt(lbe,"arrayFilter2"),yt(lbe,"arrayFilter"),cAe=lbe,mt(cbe,"stubArray2"),yt(cbe,"stubArray"),BRe=cbe,bLe=Object.prototype,hAe=bLe.propertyIsEnumerable,dAe=(uAe=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),cAe(uAe(t),function(e){return hAe.call(t,e)}))}:BRe,mt(hbe,"baseTimes2"),yt(hbe,"baseTimes"),pAe=hbe,mt(ube,"isObjectLike2"),yt(ube,"isObjectLike"),gAe=ube,mt(dbe,"baseIsArguments2"),yt(dbe,"baseIsArguments"),u9e=dbe,ORe=Object.prototype,fAe=ORe.hasOwnProperty,mAe=ORe.propertyIsEnumerable,z=u9e(function(){return arguments}())?u9e:function(e){return gAe(e)&&fAe.call(e,"callee")&&!mAe.call(e,"callee")},yAe=z,mt(pbe,"stubFalse2"),yt(pbe,"stubFalse"),c9e=pbe,xLe="object"==typeof exports&&exports&&!exports.nodeType&&exports,vRe=xLe&&"object"==typeof module&&module&&!module.nodeType&&module,ALe=vRe&&vRe.exports===xLe?eLe.Buffer:void 0,bLe=ALe?ALe.isBuffer:void 0,vAe=bLe||c9e,bAe=/^(?:0|[1-9]\d*)$/,mt(gbe,"isIndex2"),yt(gbe,"isIndex"),xAe=gbe,mt(fbe,"isLength2"),yt(fbe,"isLength"),TAe=fbe,(kAe={})["[object Float32Array]"]=kAe["[object Float64Array]"]=kAe["[object Int8Array]"]=kAe["[object Int16Array]"]=kAe["[object Int32Array]"]=kAe["[object Uint8Array]"]=kAe["[object Uint8ClampedArray]"]=kAe["[object Uint16Array]"]=kAe["[object Uint32Array]"]=!0,kAe["[object Arguments]"]=kAe["[object Array]"]=kAe["[object ArrayBuffer]"]=kAe["[object Boolean]"]=kAe["[object DataView]"]=kAe["[object Date]"]=kAe["[object Error]"]=kAe["[object Function]"]=kAe["[object Map]"]=kAe["[object Number]"]=kAe["[object Object]"]=kAe["[object RegExp]"]=kAe["[object Set]"]=kAe["[object String]"]=kAe["[object WeakMap]"]=!1,mt(mbe,"baseIsTypedArray2"),yt(mbe,"baseIsTypedArray"),BRe=mbe,mt(ybe,"baseUnary2"),yt(ybe,"baseUnary"),ORe=ybe,u9e="object"==typeof exports&&exports&&!exports.nodeType&&exports,wAe=u9e&&"object"==typeof module&&module&&!module.nodeType&&module,z=wAe&&wAe.exports===u9e,CAe=z&&fRe.process,vRe=(()=>{try{return wAe&&wAe.require&&wAe.require("util").types||CAe&&CAe.binding&&CAe.binding("util")}catch{}})(),ALe=(xLe=vRe)&&xLe.isTypedArray,bLe=ALe?ORe(ALe):BRe,SAe=bLe,c9e=Object.prototype,EAe=c9e.hasOwnProperty,mt(vbe,"arrayLikeKeys2"),yt(vbe,"arrayLikeKeys"),_Ae=vbe,AAe=Object.prototype,mt(bbe,"isPrototype2"),yt(bbe,"isPrototype"),RAe=bbe,mt(xbe,"overArg2"),yt(xbe,"overArg"),u9e=xbe(Object.keys,Object),LAe=u9e,IAe=(z=Object.prototype).hasOwnProperty,mt(Tbe,"baseKeys2"),yt(Tbe,"baseKeys"),NAe=Tbe,mt(kbe,"isArrayLike2"),yt(kbe,"isArrayLike"),DAe=kbe,mt(wbe,"keys2"),yt(wbe,"keys"),MAe=wbe,mt(Cbe,"getAllKeys2"),yt(Cbe,"getAllKeys"),OAe=Cbe,fRe=Object.prototype,PAe=fRe.hasOwnProperty,mt(Sbe,"equalObjects2"),yt(Sbe,"equalObjects"),BAe=Sbe,vRe=$Re(eLe,"DataView"),xLe=vRe,ORe=$Re(eLe,"Promise"),ALe=ORe,BRe=$Re(eLe,"Set"),$Ae=BRe,bLe=$Re(eLe,"WeakMap"),c9e=bLe,FAe="[object Map]",zAe="[object Promise]",qAe="[object Set]",jAe="[object WeakMap]",WAe="[object DataView]",UAe=B8e(xLe),GAe=B8e(j8e),VAe=B8e(ALe),YAe=B8e($Ae),HAe=B8e(c9e),u9e=I8e,(xLe&&u9e(new xLe(new ArrayBuffer(1)))!=WAe||j8e&&u9e(new j8e)!=FAe||ALe&&u9e(ALe.resolve())!=zAe||$Ae&&u9e(new $Ae)!=qAe||c9e&&u9e(new c9e)!=jAe)&&(u9e=yt(function(e){var t=I8e(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?B8e(e):"")switch(e){case UAe:return WAe;case GAe:return FAe;case VAe:return zAe;case YAe:return qAe;case HAe:return jAe}return t},"getTag")),XAe=u9e,KAe="[object Arguments]",ZAe="[object Array]",QAe="[object Object]",z=Object.prototype,JAe=z.hasOwnProperty,mt(Ebe,"baseIsEqualDeep2"),yt(Ebe,"baseIsEqualDeep"),eRe=Ebe,mt(_be,"baseIsEqual2"),yt(_be,"baseIsEqual"),tRe=_be,mt(Abe,"baseIsMatch2"),yt(Abe,"baseIsMatch"),rRe=Abe,mt(Rbe,"isStrictComparable2"),yt(Rbe,"isStrictComparable"),iRe=Rbe,mt(Lbe,"getMatchData2"),yt(Lbe,"getMatchData"),nRe=Lbe,mt(Ibe,"matchesStrictComparable2"),yt(Ibe,"matchesStrictComparable"),aRe=Ibe,mt(Nbe,"baseMatches2"),yt(Nbe,"baseMatches"),sRe=Nbe,mt(Dbe,"isSymbol2"),yt(Dbe,"isSymbol"),oRe=Dbe,lRe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cRe=/^\w*$/,mt(Mbe,"isKey2"),yt(Mbe,"isKey"),hRe=Mbe,uRe="Expected a function",mt(Obe,"memoize2"),yt(Obe,"memoize"),Obe.Cache=X8e,dRe=Obe,mt(Pbe,"memoizeCapped2"),yt(Pbe,"memoizeCapped"),pRe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gRe=/\\(\\)?/g,fRe=Pbe(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(pRe,function(e,t,r,i){n.push(r?i.replace(gRe,"$1"):t||e)}),n}),mRe=fRe,yRe=1/0,vRe=F?F.prototype:void 0,bRe=vRe?vRe.toString:void 0,mt(Bbe,"baseToString2"),yt(Bbe,"baseToString"),xRe=Bbe,mt($be,"toString3"),yt($be,"toString"),TRe=$be,mt(Fbe,"castPath2"),yt(Fbe,"castPath"),kRe=Fbe,mt(zbe,"toKey2"),yt(zbe,"toKey"),wRe=zbe,mt(qbe,"baseGet2"),yt(qbe,"baseGet"),CRe=qbe,mt(jbe,"get2"),yt(jbe,"get"),SRe=jbe,mt(Wbe,"baseHasIn2"),yt(Wbe,"baseHasIn"),ERe=Wbe,mt(Ube,"hasPath2"),yt(Ube,"hasPath"),_Re=Ube,mt(Gbe,"hasIn2"),yt(Gbe,"hasIn"),ARe=Gbe,mt(Vbe,"baseMatchesProperty2"),yt(Vbe,"baseMatchesProperty"),RRe=Vbe,mt(Ybe,"identity2"),yt(Ybe,"identity"),LRe=Ybe,mt(Hbe,"baseProperty2"),yt(Hbe,"baseProperty"),IRe=Hbe,mt(Xbe,"basePropertyDeep2"),yt(Xbe,"basePropertyDeep"),NRe=Xbe,mt(Kbe,"property2"),yt(Kbe,"property"),DRe=Kbe,mt(Zbe,"baseIteratee2"),yt(Zbe,"baseIteratee"),MRe=Zbe,mt(Qbe,"createBaseFor2"),yt(Qbe,"createBaseFor"),ORe=Qbe(),PRe=ORe,mt(Jbe,"baseForOwn2"),yt(Jbe,"baseForOwn"),BRe=Jbe,mt(exe,"createBaseEach2"),yt(exe,"createBaseEach"),$Re=exe(BRe),FRe=$Re,mt(txe,"baseMap2"),yt(txe,"baseMap"),zRe=txe,mt(rxe,"map2"),yt(rxe,"map"),qRe=rxe,mt(ixe,"baseFilter2"),yt(ixe,"baseFilter"),jRe=ixe,mt(nxe,"filter2"),yt(nxe,"filter"),WRe=nxe,mt(axe,"buildATNKey"),yt(axe,"buildATNKey"),URe=1,GRe=2,VRe=4,YRe=5,HRe=7,XRe=8,KRe=9,ZRe=10,QRe=11,JRe=12,eLe=class{static{mt(this,"AbstractTransition")}static{yt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},tLe=class extends eLe{static{mt(this,"AtomTransition")}static{yt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},rLe=class extends eLe{static{mt(this,"EpsilonTransition")}static{yt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},iLe=class extends eLe{static{mt(this,"RuleTransition")}static{yt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(sxe,"createATN"),yt(sxe,"createATN"),mt(oxe,"createRuleStartAndStopATNStates"),yt(oxe,"createRuleStartAndStopATNStates"),mt(lxe,"atom"),yt(lxe,"atom"),mt(cxe,"repetition"),yt(cxe,"repetition"),mt(hxe,"repetitionSep"),yt(hxe,"repetitionSep"),mt(uxe,"repetitionMandatory"),yt(uxe,"repetitionMandatory"),mt(dxe,"repetitionMandatorySep"),yt(dxe,"repetitionMandatorySep"),mt(pxe,"alternation"),yt(pxe,"alternation"),mt(gxe,"option"),yt(gxe,"option"),mt(fxe,"block"),yt(fxe,"block"),mt(mxe,"plus"),yt(mxe,"plus"),mt(yxe,"star"),yt(yxe,"star"),mt(vxe,"optional"),yt(vxe,"optional"),mt(bxe,"defineDecisionState"),yt(bxe,"defineDecisionState"),mt(xxe,"makeAlts"),yt(xxe,"makeAlts"),mt(Txe,"getProdType2"),yt(Txe,"getProdType"),mt(kxe,"makeBlock"),yt(kxe,"makeBlock"),mt(wxe,"tokenRef"),yt(wxe,"tokenRef"),mt(Cxe,"ruleRef"),yt(Cxe,"ruleRef"),mt(Sxe,"buildRuleHandle"),yt(Sxe,"buildRuleHandle"),mt(Exe,"epsilon"),yt(Exe,"epsilon"),mt(_xe,"newState"),yt(_xe,"newState"),mt(Axe,"addTransition"),yt(Axe,"addTransition"),mt(Rxe,"removeState"),yt(Rxe,"removeState"),nLe={},aLe=class{static{mt(this,"ATNConfigSet")}static{yt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=Lxe(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return qRe(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(Lxe,"getATNConfigKey"),yt(Lxe,"getATNConfigKey"),mt(Ixe,"baseExtremum"),yt(Ixe,"baseExtremum"),sLe=Ixe,mt(Nxe,"baseLt"),yt(Nxe,"baseLt"),oLe=Nxe,mt(Dxe,"min"),yt(Dxe,"min"),lLe=Dxe,cLe=F?F.isConcatSpreadable:void 0,mt(Mxe,"isFlattenable2"),yt(Mxe,"isFlattenable"),hLe=Mxe,mt(Oxe,"baseFlatten2"),yt(Oxe,"baseFlatten"),uLe=Oxe,mt(Pxe,"flatMap2"),yt(Pxe,"flatMap"),dLe=Pxe,mt(Bxe,"baseFindIndex2"),yt(Bxe,"baseFindIndex"),pLe=Bxe,mt($xe,"baseIsNaN2"),yt($xe,"baseIsNaN"),gLe=$xe,mt(Fxe,"strictIndexOf2"),yt(Fxe,"strictIndexOf"),fLe=Fxe,mt(zxe,"baseIndexOf2"),yt(zxe,"baseIndexOf"),mLe=zxe,mt(qxe,"arrayIncludes2"),yt(qxe,"arrayIncludes"),yLe=qxe,mt(jxe,"arrayIncludesWith2"),yt(jxe,"arrayIncludesWith"),vLe=jxe,mt(Wxe,"noop2"),yt(Wxe,"noop"),bLe=Wxe,xLe=$Ae&&1/iAe(new $Ae([,-0]))[1]==1/0?function(e){return new $Ae(e)}:bLe,TLe=xLe,mt(Uxe,"baseUniq2"),yt(Uxe,"baseUniq"),kLe=Uxe,mt(Gxe,"uniqBy"),yt(Gxe,"uniqBy"),wLe=Gxe,mt(Vxe,"flatten2"),yt(Vxe,"flatten"),CLe=Vxe,mt(Yxe,"arrayEach2"),yt(Yxe,"arrayEach"),SLe=Yxe,mt(Hxe,"castFunction2"),yt(Hxe,"castFunction"),ELe=Hxe,mt(Xxe,"forEach2"),yt(Xxe,"forEach"),_Le=Xxe,ALe=Object.prototype,RLe=ALe.hasOwnProperty,mt(Kxe,"isEmpty2"),yt(Kxe,"isEmpty"),LLe=Kxe,mt(Zxe,"arrayReduce2"),yt(Zxe,"arrayReduce"),ILe=Zxe,mt(Qxe,"baseReduce2"),yt(Qxe,"baseReduce"),NLe=Qxe,mt(Jxe,"reduce2"),yt(Jxe,"reduce"),DLe=Jxe,mt(e4e,"createDFACache"),yt(e4e,"createDFACache"),MLe=class{static{mt(this,"PredicateSet")}static{yt(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let t="",r=this.predicates.length;for(let e=0;econsole.log(e)}initialize(e){this.atn=sxe(e.rules),this.dfas=r4e(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=e,a=this.dfas,s=this.logging,o=axe(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=qRe(g2e({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>qRe(e,e=>e[0]));if(!t4e(c,!1)||n)return i?function(t){var r=new MLe,i=void 0===t?0:t.length;for(let e=0;e(_Le(e,e=>{e&&(t[e.tokenTypeIdx]=r,_Le(e.categoryMatches,e=>{t[e]=r}))}),t),{});return i?function(e){var t=this.LA(1),t=r[t.tokenTypeIdx];if(void 0===e||void 0===t||void 0===(e=null==(e=e[t])?void 0:e.GATE)||!1!==e.call(this))return t}:function(){var e=this.LA(1);return r[e.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:e,rule:t,prodType:i,dynamicTokensEnabled:n}=r,a=this.dfas,s=this.logging,o=axe(t,i,e),l=this.atn.decisionMap[o].decision,c=qRe(g2e({maxLookahead:1,occurrence:e,prodType:i,rule:t}),e=>qRe(e,e=>e[0]));if(t4e(c)&&c[0][0]&&!n){if(r=c[0],1===(r=CLe(r)).length&&LLe(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=DLe(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,_Le(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=i4e.call(this,a,l,OLe,s);return"object"!=typeof e&&0===e}}},mt(t4e,"isLL1Sequence"),yt(t4e,"isLL1Sequence"),mt(r4e,"initATNSimulator"),yt(r4e,"initATNSimulator"),mt(i4e,"adaptivePredict"),yt(i4e,"adaptivePredict"),mt(n4e,"performLookahead"),yt(n4e,"performLookahead"),mt(a4e,"computeLookaheadTarget"),yt(a4e,"computeLookaheadTarget"),mt(s4e,"reportLookaheadAmbiguity"),yt(s4e,"reportLookaheadAmbiguity"),mt(o4e,"buildAmbiguityError"),yt(o4e,"buildAmbiguityError"),mt(l4e,"getProductionDslName2"),yt(l4e,"getProductionDslName"),mt(c4e,"buildAdaptivePredictError"),yt(c4e,"buildAdaptivePredictError"),mt(h4e,"getExistingTargetState"),yt(h4e,"getExistingTargetState"),mt(u4e,"computeReachSet"),yt(u4e,"computeReachSet"),mt(d4e,"getReachableTarget"),yt(d4e,"getReachableTarget"),mt(p4e,"getUniqueAlt"),yt(p4e,"getUniqueAlt"),mt(g4e,"newDFAState"),yt(g4e,"newDFAState"),mt(f4e,"addDFAEdge"),yt(f4e,"addDFAEdge"),mt(m4e,"addDFAState"),yt(m4e,"addDFAState"),mt(y4e,"computeStartState"),yt(y4e,"computeStartState"),mt(v4e,"closure"),yt(v4e,"closure"),mt(b4e,"getEpsilonTarget"),yt(b4e,"getEpsilonTarget"),mt(x4e,"hasConfigInRuleStopState"),yt(x4e,"hasConfigInRuleStopState"),mt(T4e,"allConfigsInRuleStopStates"),yt(T4e,"allConfigsInRuleStopStates"),mt(k4e,"hasConflictTerminatingPrediction"),yt(k4e,"hasConflictTerminatingPrediction"),mt(w4e,"getConflictingAltSets"),yt(w4e,"getConflictingAltSets"),mt(C4e,"hasConflictingAltSet"),yt(C4e,"hasConflictingAltSet"),mt(S4e,"hasStateAssociatedWithOneAlt"),yt(S4e,"hasStateAssociatedWithOneAlt"),U3e(),BLe=class{static{mt(this,"CstNodeBuilder")}static{yt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new jLe(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new zLe;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new FLe(e.startOffset,e.image.length,Qpe(e),e.tokenType,!t)).grammarSource=t,e.root=this.rootNode,this.current.content.push(e),e}removeNode(e){var t=e.container;t&&0<=(e=t.content.indexOf(e))&&t.content.splice(e,1)}addHiddenNodes(e){var t,r=[];for(t of e){var i=new FLe(t.startOffset,t.image.length,Qpe(t),t.tokenType,!0);i.root=this.rootNode,r.push(i)}let n=this.current,a=!1;if(0e.endsWith("​")?e:e+"​","withRuleSuffix"),GLe=class{static{mt(this,"AbstractLangiumParser")}static{yt(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;var t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new QLe(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new ZLe(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},VLe=class extends GLe{static{mt(this,"LangiumParser")}static{yt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new BLe,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),i;return ype(e)&&(i=e.name,this.registerPrecedenceMap(e)),t=this.wrapper.DEFINE_RULE(ULe(e.name),this.startImplementation(r,i,t).bind(this)),this.allRules.set(e.name,t),Ape(e)&&e.entry&&(this.mainRule=t),t}registerPrecedenceMap(t){var e=t.name,r=new Map;for(let e=0;e{var t,r=!this.isRecording()&&void 0!==i;return r&&(this.stack.push(t={$type:i}),i===WLe?t.value="":void 0!==n&&(t.$infixName=n)),a(e),r?this.construct():void 0}}extractHiddenTokens(e){var t=this.lexerResult.hidden;if(!t.length)return[];var r=e.startOffset;for(let e=0;er)return t.splice(0,e);return t.splice(0,t.length)}consume(t,r,i){if(t=this.wrapper.wrapConsume(t,r),!this.isRecording()&&this.isValidToken(t)){var r=this.extractHiddenTokens(t),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(t,i)),{assignment:e,crossRef:n}=this.getAssignment(i),a=this.current;if(e){var s=Tpe(i)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,n)}else if(E4e(a)){let e=t.image;Tpe(i)||(e=this.converter.convert(e,r).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,i,n){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(i));let s;try{s=this.wrapper.wrapSubrule(e,t,n)}finally{this.isRecording()||void 0!==(s=void 0!==s||r?s:this.construct())&&a&&0r?(r=s.precedence,t=e):s.precedence!==r||s.rightAssoc||(t=e)}var o=a.slice(0,t),l=a.slice(t+1),c=n.slice(0,t+1),n=n.slice(t+1),c={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},o={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:n,operators:l},n=this.constructInfix(c,i),l=this.constructInfix(o,i);return{$type:e.$type,$cstNode:e.$cstNode,left:n,operator:a[t],right:l}}}getAssignment(e){var t;return this.assignmentMap.has(e)||(t=$de(e,ape),this.assignmentMap.set(e,{assignment:t,crossRef:t&&hpe(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})),this.assignmentMap.get(e)}assign(e,t,r,i,n){var a=this.current,s="single"===n&&"string"==typeof r?this.linker.buildReference(a,t,i,r):"multi"===n&&"string"==typeof r?this.linker.buildMultiReference(a,t,i,r):r;switch(e){case"=":a[t]=s;break;case"?=":a[t]=!0;break;case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(var[r,i]of Object.entries(t)){var n=e[r];void 0===n?e[r]=i:Array.isArray(n)&&Array.isArray(i)&&(i.push(...n),e[r]=i)}return(t=e.$cstNode)&&(t.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},YLe=class{static{mt(this,"AbstractParserErrorMessageProvider")}static{yt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return $7e.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return $7e.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return $7e.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return $7e.buildEarlyExitMessage(e)}},HLe=class extends YLe{static{mt(this,"LangiumParserErrorMessageProvider")}static{yt(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},XLe=class extends GLe{static{mt(this,"LangiumCompletionParser")}static{yt(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),e=this.lexer.tokenize(e,{mode:"partial"}),this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){return t=this.wrapper.DEFINE_RULE(ULe(e.name),this.startImplementation(t).bind(this)),this.allRules.set(e.name,t),e.entry&&(this.mainRule=t),t}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(r){return e=>{var t=this.keepStackSize();try{r(e)}finally{this.resetStackSize(t)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var e=this.elementStack.length;return this.stackSize=e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i,n){this.before(i),this.wrapper.wrapSubrule(e,t,n),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){this.isRecording()||0<=(e=this.elementStack.lastIndexOf(e))&&this.elementStack.splice(e)}get currIdx(){return this.wrapper.currIdx}},KLe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new HLe},ZLe=class extends v8e{static{mt(this,"ChevrotainWrapper")}static{yt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,{...KLe,lookaheadStrategy:r?new o8e({maxLookahead:t.maxLookahead}):new PLe({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},QLe=class extends ZLe{static{mt(this,"ProfilerWrapper")}static{yt(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}},mt(_4e,"createParser"),yt(_4e,"createParser"),mt(A4e,"buildRules"),yt(A4e,"buildRules"),mt(R4e,"buildInfixRule"),yt(R4e,"buildInfixRule"),mt(L4e,"buildElement"),yt(L4e,"buildElement"),mt(I4e,"buildAction"),yt(I4e,"buildAction"),mt(N4e,"buildRuleCall"),yt(N4e,"buildRuleCall"),mt(D4e,"buildRuleCallPredicate"),yt(D4e,"buildRuleCallPredicate"),mt(M4e,"buildPredicate"),yt(M4e,"buildPredicate"),mt(O4e,"buildAlternatives"),yt(O4e,"buildAlternatives"),mt(P4e,"buildUnorderedGroup"),yt(P4e,"buildUnorderedGroup"),mt(B4e,"buildGroup"),yt(B4e,"buildGroup"),mt($4e,"getGuardCondition"),yt($4e,"getGuardCondition"),mt(F4e,"buildCrossReference"),yt(F4e,"buildCrossReference"),mt(z4e,"buildKeyword"),yt(z4e,"buildKeyword"),mt(q4e,"wrap"),yt(q4e,"wrap"),mt(j4e,"getRule"),yt(j4e,"getRule"),mt(W4e,"getRuleName"),yt(W4e,"getRuleName"),mt(U4e,"getToken"),yt(U4e,"getToken"),mt(G4e,"createCompletionParser"),yt(G4e,"createCompletionParser"),mt(V4e,"createLangiumParser"),yt(V4e,"createLangiumParser"),mt(Y4e,"prepareLangiumParser"),yt(Y4e,"prepareLangiumParser"),JLe=class{static{mt(this,"DefaultTokenBuilder")}static{yt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){var e=Pde(L0e(e,!1)),r=this.buildTerminalTokens(e);return(e=this.buildKeywordTokens(e,r,t)).push(...r),e}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter($pe).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=ige(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r};return"function"==typeof r&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=C0e(t)?_7e.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(e,t)=>(r.lastIndex=t,r.exec(e))}buildKeywordTokens(e,t,r){return e.filter(Qde).flatMap(e=>Ude(e).filter(Tpe)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){return r=this.buildKeywordPattern(e,r),e={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)},"function"==typeof r&&(e.LINE_BREAKS=!0),e}buildKeywordPattern(e,t){return t?new RegExp(S0e(e.value),"i"):e.value}findLongerAlt(i,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&E0e("^"+r.source+"$",i.value)&&e.push(t),e},[])}},e9e=class{static{mt(this,"DefaultValueConverter")}static{yt(this,"DefaultValueConverter")}convert(e,t){var r=t.grammarSource;if(Npe(r=hpe(r)?D0e(r):r)){if(r=r.rule.ref)return this.runConverter(r,e,t);throw new Error("This cst node was not parsed by a rule.")}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return t9e.convertInt(t);case"STRING":return t9e.convertString(t);case"ID":return t9e.convertID(t)}switch(rge(e)?.toLowerCase()){case"number":return t9e.convertNumber(t);case"boolean":return t9e.convertBoolean(t);case"bigint":return t9e.convertBigint(t);case"date":return t9e.convertDate(t);default:return t}}},E=t9e=t9e||{},mt(a,"convertString"),yt(a,"convertString"),E.convertString=a,mt(s,"convertEscapeCharacter"),yt(s,"convertEscapeCharacter"),mt(o,"convertID"),yt(o,"convertID"),E.convertID=o,mt(l,"convertInt"),yt(l,"convertInt"),E.convertInt=l,mt(c,"convertBigint"),yt(c,"convertBigint"),E.convertBigint=c,mt(h,"convertDate"),yt(h,"convertDate"),E.convertDate=h,mt(u,"convertNumber"),yt(u,"convertNumber"),E.convertNumber=u,mt(d,"convertBoolean"),yt(d,"convertBoolean"),E.convertBoolean=d,h5e(r9e={},u5e(H3e(),1)),mt(H4e,"delayNextTick"),yt(H4e,"delayNextTick"),i9e=0,n9e=10,mt(X4e,"startCancelableOperation"),yt(X4e,"startCancelableOperation"),mt(K4e,"setInterruptionPeriod"),yt(K4e,"setInterruptionPeriod"),a9e=Symbol("OperationCancelled"),mt(Z4e,"isOperationCancelled"),yt(Z4e,"isOperationCancelled"),mt(Q4e,"interruptAndCheck"),yt(Q4e,"interruptAndCheck"),s9e=class{static{mt(this,"Deferred")}static{yt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}},o9e=class D{static{mt(this,"_FullTextDocument")}static{yt(this,"FullTextDocument")}constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){for(var a of e)if(D.isIncremental(a)){var s=rTe(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),e=Math.max(s.end.line,0),i=this._lineOffsets,n=eTe(a.text,!1,o);if(e-r===n.length)for(let e=0,t=n.length;ee?i=n:r=n+1}var a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],e.character<=0?t:(r=e.line+1{function d(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function a(e,t){for(var r,i="",n=0,a=-1,s=0,o=0;o<=e.length;++o){if(o{for(var r in t)v.o(t,r)&&!v.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},v.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let e={},i,r=((v.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),v.d(e,{URI:yt(()=>M,"URI"),Utils:yt(()=>m,"Utils")}),"object"==typeof process?i="win32"===process.platform:"object"==typeof navigator&&(i=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),n=/^\//,a=/^\/\//;function b(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!n.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}mt(b,"a"),yt(b,"a");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class M{static{mt(this,"l")}static{yt(this,"l")}static isUri(e){return e instanceof M||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,i,n,a=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=e||a?e:"file",this.authority=t||"",this.path=((e,t)=>{switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t})(this.scheme,r||""),this.query=i||"",this.fragment=n||"",b(this,a))}get fsPath(){return k(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:i,query:n,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===i?i=this.path:null===i&&(i=""),void 0===n?n=this.query:null===n&&(n=""),void 0===a?a=this.fragment:null===a&&(a=""),t===this.scheme&&r===this.authority&&i===this.path&&n===this.query&&a===this.fragment?this:new O(t,r,i,n,a)}static parse(e,t=!1){return(e=s.exec(e))?new O(e[2]||"",S(e[4]||""),S(e[5]||""),S(e[7]||""),S(e[9]||""),t):new O("","","","","")}static file(e){let t="",r;return"/"===(e=i?e.replace(/\\/g,"/"):e)[0]&&"/"===e[1]&&(e=-1===(r=e.indexOf("/",2))?(t=e.substring(2),"/"):(t=e.substring(2,r),e.substring(r)||"/")),new O("file",t,e,"","")}static from(e){return b(e=new O(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof M?e:((t=new O(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=i?1:void 0;class O extends M{static{mt(this,"d")}static{yt(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=o),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let l={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function x(t,r,i){let n,a=-1;for(let e=0;eC(e)):e}mt(S,"w"),yt(S,"w");let c=v(975),h=c.posix||c;(E=m=m||{}).joinPath=function(e,...t){return e.with({path:h.join(e.path,...t)})},E.resolvePath=function(e,...t){let r=e.path,i=!1,n=("/"!==r[0]&&(r="/"+r,i=!0),h.resolve(r,...t));return i&&"/"===n[0]&&!e.authority&&(n=n.substring(1)),e.with({path:n})},E.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=h.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},E.basename=function(e){return h.basename(e.path)},E.extname=function(e){return h.extname(e.path)},c9e=e}({URI:h9e,Utils:u9e}=c9e);{var E=d9e=d9e||{};E.basename=u9e.basename,E.dirname=u9e.dirname,E.extname=u9e.extname,E.joinPath=u9e.joinPath,E.resolvePath=u9e.resolvePath;let a="object"==typeof process&&"win32"===process?.platform;function _(e,t){return e?.toString()===t?.toString()}function A(e,t){var e=("string"==typeof e?h9e.parse(e):e).path,t=("string"==typeof t?h9e.parse(t):t).path,r=e.split("/").filter(e=>00e(),"dispose")}}p9e=class{static{mt(this,"UriTrie")}static{yt(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return d9e.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){(e=this.getNode(this.normalizeUri(e),!1))?.parent&&e.parent.children.delete(e.name)}has(e){return void 0!==this.getNode(this.normalizeUri(e),!1)?.element}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){var e=this.normalizeUri(e),t=this.getNode(e,!1);if(t)return{name:t.name,uri:d9e.joinPath(h9e.parse(e),t.name).toString(),element:t.element}}findChildren(e){let t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(e=>({name:e.name,uri:d9e.joinPath(h9e.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){return(e=this.getNode(d9e.normalize(e),!1))?this.collectValues(e):[]}getNode(e,t){var r,i=e.split("/");"/"===e.charAt(e.length-1)&&i.pop();let n=this.root;for(r of i){let e=n.children.get(r);if(!e){if(!t)return;e={name:r,children:new Map,parent:n},n.children.set(r,e)}n=e}return n}collectValues(e){var t,r=[];e.element&&r.push(e.element);for(t of e.children.values())r.push(...this.collectValues(t));return r}},(E=g9e=g9e||{})[E.Changed=0]="Changed",E[E.Parsed=1]="Parsed",E[E.IndexedContent=2]="IndexedContent",E[E.ComputedScopes=3]="ComputedScopes",E[E.Linked=4]="Linked",E[E.IndexedReferences=5]="IndexedReferences",E[E.Validated=6]="Validated",f9e=class{static{mt(this,"DefaultLangiumDocumentFactory")}static{yt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=r9e.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??h9e.parse(e.uri),r9e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return r9e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){var i;return"string"==typeof t?(i=this.parse(e,t,r),this.createLangiumDocument(i,e,void 0,t)):"$model"in t?(i={value:t.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(i,e)):(i=this.parse(e,t.getText(),r),this.createLangiumDocument(i,e,t))}async createAsync(e,t,r){var i;return"string"==typeof t?(i=await this.parseAsync(e,t,r),this.createLangiumDocument(i,e,void 0,t)):(i=await this.parseAsync(e,t.getText(),r),this.createLangiumDocument(i,e,t))}createLangiumDocument(t,r,e,i){let n;if(e)n={parseResult:t,uri:r,state:g9e.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,i);n={parseResult:t,uri:r,state:g9e.Parsed,references:[],get textDocument(){return e()}}}return t.value.$document=n}async update(e,t){var r=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(e.uri);return i?Object.defineProperty(e,"textDocument",{value:i}):(i=this.createTextDocumentGetter(e.uri,n),Object.defineProperty(e,"textDocument",{get:i})),r!==n&&(e.parseResult=await this.parseAsync(e.uri,n,t),e.parseResult.value.$document=e),e.state=g9e.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,i;return()=>i=i??l9e.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},m9e=class{static{mt(this,"DefaultLangiumDocuments")}static{yt(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new p9e,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Pde(this.documentTrie.all())}addDocument(e){var t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){return e=e.toString(),this.documentTrie.find(e)}getDocuments(e){return e=e.toString(),this.documentTrie.findAll(e)}async getOrCreateDocument(e,t){return this.getDocument(e)||(e=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(e),e)}createDocument(e,t,r){return r?this.langiumDocumentFactory.fromString(t,e,r).then(e=>(this.addDocument(e),e)):(r=this.langiumDocumentFactory.fromString(t,e),this.addDocument(r),r)}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){return e=e.toString(),(e=this.documentTrie.find(e))&&this.documentBuilder().resetToState(e,g9e.Changed),e}deleteDocument(e){var e=e.toString(),t=this.documentTrie.find(e);return t&&(t.state=g9e.Changed,this.documentTrie.delete(e)),t}deleteDocuments(e){var t,e=e.toString(),r=this.documentTrie.findAll(e);for(t of r)t.state=g9e.Changed;return this.documentTrie.delete(e),r}},y9e=Symbol("RefResolving"),v9e=class{static{mt(this,"DefaultLinker")}static{yt(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(n,e=r9e.CancellationToken.None){if(this.profiler?.isActive("linking")){let i=this.profiler.createTask("linking",this.languageId);i.start();try{for(let r of Gde(n.parseResult.value))await Q4e(e),Yde(r).forEach(e=>{var t=r.$type+":"+e.property;i.startSubTask(t);try{this.doLink(e,n)}finally{i.stopSubTask(t)}})}finally{i.stop()}}else for(var t of Gde(n.parseResult.value))await Q4e(e),Yde(t).forEach(e=>this.doLink(e,n))}doLink(e,t){var r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=y9e;try{var i=this.getCandidate(e);Lde(i)?r._ref=i:(r._nodeDescription=i,n=this.loadAstNode(i),r._ref=n??this.createLinkingError(e,i))}catch(t){console.error(`An error occurred while resolving reference to '${r.$refText}':`,t);var n=t.message??String(t);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': `+n}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=y9e;try{var a=this.getCandidates(e),s=[];if(Lde(a))r._linkingError=a;else for(var o of a){var l=this.loadAstNode(o);l&&s.push({ref:l,$nodeDescription:o})}r._items=s}catch(t){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': `+t},r._items=[]}t.references.push(r)}}unlink(e){for(var t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){var t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>e.documentUri+"#"+e.path).toArray();return 0hpe(e)&&e.isMulti)}findDeclarations(e){if(e){var t=q0e(e),r=e.astNode;if(t&&r){if(_de(t=r[t.feature])||Ade(t))return jde(t);if(Array.isArray(t))for(var i of t)if((_de(i)||Ade(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return jde(i)}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||Zpe(e,t)))return this.getSelfNodes(r)}return[]}getSelfNodes(t){if(this.hasMultiReference){var e=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));if(e=this.getNodeFromReferenceDescription(e.head()))for(var r of Yde(e))if(Ade(r.reference)&&r.reference.items.some(e=>e.ref===t))return r.reference.items.map(e=>e.ref)}return[t]}getNodeFromReferenceDescription(e){var t;return e&&(t=this.documents.getDocument(e.sourceUri))?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){var t,r=[];for(t of this.findDeclarations(e)){var i=this.nameProvider.getNameNode(t)??t.$cstNode;i&&r.push(i)}return r}findReferences(e,t){var r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(e=>d9e.equals(e.sourceUri,t.documentUri))),r.push(...i),Pde(r)}getSelfReferences(e){var t,r=[];for(t of this.getSelfNodes(e)){var i,n,a=this.nameProvider.getNameNode(t);a&&(i=zde(t),n=this.nodeLocator.getAstNodePath(t),r.push({sourceUri:i.uri,sourcePath:n,targetUri:i.uri,targetPath:n,segment:Jpe(a),local:!0}))}return r}},T9e=class{static{mt(this,"MultiMap")}static{yt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return jke.sum(Pde(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){var r;return void 0===t?this.map.delete(e):!!((r=this.map.get(e))&&0<=(t=r.indexOf(t)))&&(1===r.length?this.map.delete(e):r.splice(t,1),!0)}get(e){return this.map.get(e)??[]}getStream(e){return(e=this.map.get(e))?Pde(e):Fke}has(e,t){return void 0===t?this.map.has(e):!!(e=this.map.get(e))&&0<=e.indexOf(t)}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(r){this.map.forEach((e,t)=>e.forEach(e=>r(e,t,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Pde(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return Pde(this.map.keys())}values(){return Pde(this.map.values()).flat()}entriesGroupedByKey(){return Pde(this.map.entries())}},k9e=class{static{mt(this,"BiMap")}static{yt(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(var[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){var t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}},w9e=class{static{mt(this,"DefaultScopeComputation")}static{yt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=r9e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=Wde,i=r9e.CancellationToken.None){var n,a=[];this.addExportedSymbol(e,a,t);for(n of r(e))await Q4e(i),this.addExportedSymbol(n,a,t);return a}addExportedSymbol(e,t,r){var i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async collectLocalSymbols(e,t=r9e.CancellationToken.None){var r,i=e.parseResult.value,n=new T9e;for(r of Ude(i))await Q4e(t),this.addLocalSymbol(r,e,n);return n}addLocalSymbol(e,t,r){var i,n=e.$container;n&&(i=this.nameProvider.getName(e))&&r.add(n,this.descriptions.createDescription(e,i,t))}},C9e=class{static{mt(this,"StreamScope")}static{yt(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){let r=this.caseInsensitive?t.toLowerCase():t,e=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===r):this.elements.find(e=>e.name===t);return e||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){let r=this.caseInsensitive?t.toLowerCase():t,e=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===r):this.elements.filter(e=>e.name===t);return(this.concatOuterScope||e.isEmpty())&&this.outerScope?e.concat(this.outerScope.getElements(t)):e}},S9e=class{static{mt(this,"MapScope")}static{yt(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(var i of e){var n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}this.outerScope=t}getElement(e){var t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){var t=this.caseInsensitive?e.toLowerCase():e,t=(t=this.elements.get(t))?[t]:[];return(this.concatOuterScope||0e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},R9e=class extends A9e{static{mt(this,"SimpleCache")}static{yt(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){return this.throwIfDisposed(),this.cache.has(e)?this.cache.get(e):t?(t=t(),this.cache.set(e,t),t):void 0}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},L9e=class extends A9e{static{mt(this,"ContextCache")}static{yt(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){return this.throwIfDisposed(),(e=this.cacheForContext(e)).has(t)?e.get(t):r?(r=r(),e.set(t,r),r):void 0}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed(),e?(e=this.converter(e),this.cache.delete(e)):this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},I9e=class extends L9e{static{mt(this,"DocumentCache")}static{yt(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(var r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{var r;for(r of e.concat(t))this.clear(r)}))}},N9e=class extends R9e{static{mt(this,"WorkspaceCache")}static{yt(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{0{this.clear()}))}},D9e=class{static{mt(this,"DefaultScopeProvider")}static{yt(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new N9e(e.shared)}getScope(t){let r=[],i=this.reflection.getReferenceType(t),n=zde(t.container).localSymbols;if(n){let e=t.container;for(;n.has(e)&&r.push(n.getStream(e).filter(e=>this.reflection.isSubtype(e.type,i))),e=e.$container;);}let a=this.getGlobalScope(i,t);for(let e=r.length-1;0<=e;e--)a=this.createScope(r[e],a);return a}createScope(e,t,r){return new C9e(Pde(e),t,r)}createScopeForNodes(e,t,r){return e=Pde(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new C9e(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new E9e(this.indexManager.allElements(e)))}},mt(aTe,"isAstNodeWithComment"),yt(aTe,"isAstNodeWithComment"),mt(sTe,"isIntermediateReference"),yt(sTe,"isIntermediateReference"),M9e=class{static{mt(this,"DefaultJsonSerializer")}static{yt(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},i=t?.replacer,n=yt((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=i?(e,t)=>i(e,t,n):n;try{return this.currentDocument=zde(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){return t=t??{},e=JSON.parse(e),this.linkNode(e,e,t),e}replacer(t,r,{refText:e,sourceText:i,textRegions:n,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(t)){if(_de(r)){var o=r.ref,l=e?r.$refText:void 0;if(o){let e=zde(o),t="";return this.currentDocument&&this.currentDocument!==e&&(t=s?s(e.uri,o):e.uri.toString()),o=this.astNodeLocator.getAstNodePath(o),{$ref:t+"#"+o,$refText:l}}return{$error:r.error?.message??"Could not resolve reference",$refText:l}}if(Ade(r)){var c,o=e?r.$refText:void 0,h=[];for(c of r.items){let e=c.ref,t=zde(c.ref),r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());var u=this.astNodeLocator.getAstNodePath(e);h.push(r+"#"+u)}return{$refs:h,$refText:o}}if(Ede(r)){let e;return n&&(e=this.addAstNodeRegionWithAssignmentsTo({...r}),!t||r.$document)&&e?.$textRegion&&(e.$textRegion.documentURI=this.currentDocument?.uri.toString()),i&&!t&&((e=e??{...r}).$sourceText=r.$cstNode?.text),a&&(e=e??{...r},l=this.commentProvider.getComment(r))&&(e.$comment=l.replace(/\r/g,"")),e??r}return r}}addAstNodeRegionWithAssignmentsTo(i){let n=yt(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(i.$cstNode){let e=i.$textRegion=n(i.$cstNode),r=e.assignments={};return Object.keys(i).filter(e=>!e.startsWith("$")).forEach(e=>{var t=O0e(i.$cstNode,e).map(n);0!==t.length&&(r[e]=t)}),i}}linkNode(t,r,i,e,n,a){for(var[s,o]of Object.entries(t))if(Array.isArray(o))for(let e=0;e{await this.handleException(()=>i.call(n,e,t,r),"An error occurred during validation",t,e)}}async handleException(e,t,r,i){try{await e()}catch(e){if(Z4e(e))throw e;console.error(t+":",e),e instanceof Error&&e.stack&&console.error(e.stack),r("error",t+": "+(e instanceof Error?e.message:String(e)),{node:i})}}addEntry(e,t){if("AstNode"===e)this.entries.add("AstNode",t);else for(var r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Pde(this.entries.get(e)).concat(this.entries.get("AstNode"));return(r=t?r.filter(e=>t.includes(e.category)):r).map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(n,a,s){return async(e,t,r,i)=>{await this.handleException(()=>n.call(s,e,t,r,i),a,t,e)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},$9e=Object.freeze({validateNode:!0,validateChildren:!0}),F9e=class{static{mt(this,"DefaultDocumentValidator")}static{yt(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=r9e.CancellationToken.None){var i=e.parseResult,n=[];if(await Q4e(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(i,n,t),!(t.stopAfterLexingErrors&&n.some(e=>e.data?.code===z9e.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(e=>e.data?.code===z9e.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(e=>e.data?.code===z9e.LinkingError))))){try{n.push(...await this.validateAst(i.value,t,r))}catch(e){if(Z4e(e))throw e;console.error("An error occurred during validation:",e)}await Q4e(r)}return n}processLexingErrors(e,t,r){var i;for(i of[...e.lexerErrors,...e.lexerReport?.diagnostics??[]]){var n={severity:cTe(n=i.severity??"error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:hTe(n),source:this.getSource()};t.push(n)}}processParsingErrors(e,t,r){for(var i of e.parserErrors){let e;var n,a;isNaN(i.token.startOffset)?"previousToken"in i&&(a=i.previousToken,e=isNaN(a.startOffset)?{start:n={line:0,character:0},end:n}:{start:n={line:a.endLine-1,character:a.endColumn},end:n}):e=Qpe(i.token),e&&(a={severity:cTe("error"),range:e,message:i.message,data:oTe(z9e.ParsingError),source:this.getSource()},t.push(a))}}processLinkingErrors(e,t,r){for(var i of e.references){var n=i.error;n&&(i={node:n.info.container,range:i.$refNode?.range,property:n.info.property,index:n.info.index,data:{code:z9e.LinkingError,containerType:n.info.container.$type,property:n.info.property,refText:n.info.reference.$refText}},t.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(e,t,r=r9e.CancellationToken.None){let i=[],n=yt((e,t,r)=>{i.push(this.toDiagnostic(e,t,r))},"acceptor");return await this.validateAstBefore(e,t,n,r),await this.validateAstNodes(e,t,n,r),await this.validateAstAfter(e,t,n,r),i}async validateAstBefore(e,t,r,i=r9e.CancellationToken.None){var n;for(n of this.validationRegistry.checksBefore)await Q4e(i),await n(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=r9e.CancellationToken.None){if(this.profiler?.isActive("validating")){var n=this.profiler.createTask("validating",this.languageId);n.start();try{var a,s=Gde(e).iterator();for(a of s){n.startSubTask(a.$type);var o,l=this.validateSingleNodeOptions(a,t);if(l.validateNode)try{for(o of this.validationRegistry.getChecks(a.$type,t.categories))await o(a,r,i)}finally{n.stopSubTask(a.$type)}l.validateChildren||s.prune()}}finally{n.stop()}}else{var c,h=Gde(e).iterator();for(c of h){await Q4e(i);var u,d=this.validateSingleNodeOptions(c,t);if(d.validateNode)for(u of this.validationRegistry.getChecks(c.$type,t.categories))await u(c,r,i);d.validateChildren||h.prune()}}}validateSingleNodeOptions(e,t){return $9e}async validateAstAfter(e,t,r,i=r9e.CancellationToken.None){var n;for(n of this.validationRegistry.checksAfter)await Q4e(i),await n(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:lTe(r),severity:cTe(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},mt(lTe,"getDiagnosticRange"),yt(lTe,"getDiagnosticRange"),mt(cTe,"toDiagnosticSeverity"),yt(cTe,"toDiagnosticSeverity"),mt(hTe,"toDiagnosticData"),yt(hTe,"toDiagnosticData"),(E=z9e=z9e||{}).LexingError="lexing-error",E.LexingWarning="lexing-warning",E.LexingInfo="lexing-info",E.LexingHint="lexing-hint",E.ParsingError="parsing-error",E.LinkingError="linking-error",q9e=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}static{yt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){var r=r??zde(e),i=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${i} has no name.`);let n,a=yt(()=>n=n??Jpe(this.nameProvider.getNameNode(e)??e.$cstNode),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:Jpe(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},j9e=class{static{mt(this,"DefaultReferenceDescriptionProvider")}static{yt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=r9e.CancellationToken.None){let r=[],i=e.parseResult.value;for(var n of Gde(i))await Q4e(t),Yde(n).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){var t=e.reference;if(t.error||!t.$refNode)return[];let r=[];_de(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Ade(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));var i,n=zde(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=Jpe(t.$refNode);for(i of r)s.push({sourceUri:n,sourcePath:a,targetUri:i.documentUri,targetPath:i.path,segment:o,local:d9e.equals(i.documentUri,n)});return s}},W9e=class{static{mt(this,"DefaultAstNodeLocator")}static{yt(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){var t;return e.$container?(t=this.getAstNodePath(e.$container),e=this.getPathSegment(e),t+this.segmentSeparator+e):""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(e)return void 0!==t?e+this.indexSeparator+t:e;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{var r,i;return e&&0!==t.length?0<(i=t.indexOf(this.indexSeparator))?(r=t.substring(0,i),i=parseInt(t.substring(i+1)),e[r]?.[i]):e[t]:e},e)}},h5e(U9e={},u5e(Y3e(),1)),G9e=class{static{mt(this,"DefaultConfigurationProvider")}static{yt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new s9e,this.onConfigurationSectionUpdateEmitter=new U9e.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(t){var e;if(this.workspaceConfig&&(t.register&&(e=this.serviceRegistry.all,t.register({section:e.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})),t.fetchConfiguration)){let e=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await t.fetchConfiguration(e);e.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){if(await this.ready,e=this.toSectionName(e),this.settings[e])return this.settings[e][t]}toSectionName(e){return""+e}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},V9e=u5e(Mke(),1),E=Y9e=Y9e||{},mt(I,"create"),yt(I,"create"),E.create=I,H9e=class{static{mt(this,"DefaultDocumentBuilder")}static{yt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new T9e,this.documentPhaseListeners=new T9e,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=g9e.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=r9e.CancellationToken.None){for(var i of e){var n,a=i.uri.toString();i.state===g9e.Validated?"boolean"==typeof t.validation&&t.validation?this.resetToState(i,g9e.IndexedReferences):"object"==typeof t.validation&&0<(n=this.findMissingValidationCategories(i,t)).length&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:n}},result:this.buildState.get(a)?.result}),i.state=g9e.IndexedReferences):this.buildState.delete(a)}this.currentState=g9e.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=r9e.CancellationToken.None){this.currentState=g9e.Changed;var i,n,a,s=[];for(i of t)for(n of this.langiumDocuments.deleteDocuments(i))s.push(n.uri),this.cleanUpDeleted(n);for(a of t=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat()){let e=this.langiumDocuments.getDocument(a);void 0===e&&((e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a)).state=g9e.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,g9e.Changed)}let o=Pde(t).concat(s).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!o.has(e.uri.toString())&&this.shouldRelink(e,o)).forEach(e=>this.resetToState(e,g9e.ComputedScopes)),await this.emitUpdate(t,s),await Q4e(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state!n.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{var t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(t,r){await Promise.all(this.updateListeners.map(e=>e(t,r)))}sortDocuments(e){let t=0,r=e.length-1;for(;tvoid 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(t){return this.updateListeners.push(t),Y9e.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}resetToState(e,t){switch(t){case g9e.Changed:case g9e.Parsed:this.indexManager.removeContent(e.uri);case g9e.IndexedContent:e.localSymbols=void 0;case g9e.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case g9e.Linked:this.indexManager.removeReferences(e.uri);case g9e.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case g9e.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=g9e.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,g9e.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,g9e.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,g9e.ComputedScopes,r,async e=>{var t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)}),t=e.filter(e=>this.shouldLink(e)),await this.runCancelable(t,g9e.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(t,g9e.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r)),t=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1)),await this.runCancelable(t,g9e.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){(e=this.buildState.get(e.uri.toString()))&&(e.completed=!0)}prepareBuild(e,t){for(var r of e){var r=r.uri.toString(),i=this.buildState.get(r);i&&!i.completed||this.buildState.set(r,{completed:!1,options:t,result:i?.result})}}async runCancelable(e,t,r,i){for(var n of e)n.statee.state===t),await this.notifyBuildPhase(e,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),Y9e.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Y9e.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;return t&&"path"in t?i=t:r=t,r=r??r9e.CancellationToken.None,i?this.awaitDocumentState(e,i,r):this.awaitBuilderState(e,r)}awaitDocumentState(n,a,s){var e=this.langiumDocuments.getDocument(a);return e?e.state>=n?Promise.resolve(a):s.isCancellationRequested?Promise.reject(a9e):this.currentState>=n&&n>e.state?Promise.reject(new V9e.ResponseError(V9e.LSPErrorCodes.RequestFailed,`Document state of ${a.toString()} is ${g9e[e.state]}, requiring ${g9e[n]}, but workspace state is already ${g9e[this.currentState]}. Returning undefined.`)):new Promise((t,e)=>{let r=this.onDocumentPhase(n,e=>{d9e.equals(e.uri,a)&&(r.dispose(),i.dispose(),t(e.uri))}),i=s.onCancellationRequested(()=>{r.dispose(),i.dispose(),e(a9e)})}):Promise.reject(new V9e.ResponseError(V9e.LSPErrorCodes.ServerCancelled,"No document found for URI: "+a.toString()))}awaitBuilderState(n,a){return this.currentState>=n?Promise.resolve():a.isCancellationRequested?Promise.reject(a9e):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{r.dispose(),i.dispose(),e()}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(a9e)})})}async notifyDocumentPhase(e,t,r){var i;for(i of this.documentPhaseListeners.get(t).slice())try{await Q4e(r),await i(e,r)}catch(e){if(!Z4e(e))throw e}}async notifyBuildPhase(e,t,r){var i;if(0!==e.length)for(i of this.buildPhaseListeners.get(t).slice())await Q4e(r),await i(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,i="object"==typeof(n=this.getBuildOptions(e)).validation?{...n.validation}:{},n=(i.categories=this.findMissingValidationCategories(e,n),await r.validateDocument(e,i,t));e.diagnostics?e.diagnostics.push(...n):e.diagnostics=n,(r=this.buildState.get(e.uri.toString()))&&(r.result??(r.result={}),r.result.validationChecks?r.result.validationChecks=Pde(r.result.validationChecks).concat(i.categories).distinct().toArray():r.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},X9e=class{static{mt(this,"DefaultIndexManager")}static{yt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new L9e,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=zde(e).uri,i=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{d9e.equals(e.targetUri,r)&&e.targetPath===t&&i.push(e)})}),Pde(i)}allElements(t,r){let e=Pde(this.symbolIndex.keys());return(e=r?e.filter(e=>!r||r.has(e)):e).map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){e=e.toString(),this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e)}removeReferences(e){e=e.toString(),this.referenceIndex.delete(e)}async updateContent(e,t=r9e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),e=e.uri.toString(),this.symbolIndex.set(e,t),this.symbolByTypeIndex.clear(e)}async updateReferences(e,t=r9e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t),this.referenceIndex.set(e.uri.toString(),t)}isAffected(e,t){return!!(e=this.referenceIndex.get(e.uri.toString()))&&e.some(e=>!e.local&&t.has(e.targetUri.toString()))}},K9e=class{static{mt(this,"DefaultWorkspaceManager")}static{yt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new s9e,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=r9e.CancellationToken.None){e=await this.performStartup(e),await Q4e(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=yt(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector"),i=(await this.loadAdditionalDocuments(e,r),[]);return await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,i))),e=Pde(i).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e)),await this.loadWorkspaceDocuments(e,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{e=await this.langiumDocuments.getOrCreateDocument(e),t(e)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return h9e.parse(e.uri)}async traverseFolder(e,t){try{var r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){var t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){var t=d9e.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}},Z9e=class{static{mt(this,"DefaultLexerErrorMessageProvider")}static{yt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return C7e.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return C7e.buildUnableToPopLexerModeMessage(e)}},Q9e={mode:"full"},J9e=class{static{mt(this,"DefaultLexer")}static{yt(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;var t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive}),t=(this.tokenTypes=this.toTokenTypeDictionary(t),pTe(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new _7e(t,{positionTracking:"full",skipValidations:e,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=0){var r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(pTe(e))return e;let t=dTe(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(uTe,"isTokenTypeArray"),yt(uTe,"isTokenTypeArray"),mt(dTe,"isIMultiModeLexerDefinition"),yt(dTe,"isIMultiModeLexerDefinition"),mt(pTe,"isTokenTypeDictionary"),yt(pTe,"isTokenTypeDictionary"),U3e(),mt(gTe,"parseJSDoc"),yt(gTe,"parseJSDoc"),mt(fTe,"isJSDoc"),yt(fTe,"isJSDoc"),mt(mTe,"getLines"),yt(mTe,"getLines"),eIe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,tIe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(yTe,"tokenize"),yt(yTe,"tokenize"),mt(vTe,"buildInlineTokens"),yt(vTe,"buildInlineTokens"),rIe=/\S/,iIe=/\s*$/,mt(bTe,"skipWhitespace"),yt(bTe,"skipWhitespace"),mt(xTe,"lastCharacter"),yt(xTe,"lastCharacter"),mt(TTe,"parseJSDocComment"),yt(TTe,"parseJSDocComment"),mt(kTe,"parseJSDocElement"),yt(kTe,"parseJSDocElement"),mt(wTe,"appendEmptyLine"),yt(wTe,"appendEmptyLine"),mt(CTe,"parseJSDocText"),yt(CTe,"parseJSDocText"),mt(STe,"parseJSDocInline"),yt(STe,"parseJSDocInline"),mt(ETe,"parseJSDocTag"),yt(ETe,"parseJSDocTag"),mt(_Te,"parseJSDocLine"),yt(_Te,"parseJSDocLine"),mt(ATe,"normalizeOptions"),yt(ATe,"normalizeOptions"),mt(RTe,"normalizeOption"),yt(RTe,"normalizeOption"),nIe=class{static{mt(this,"JSDocCommentImpl")}static{yt(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(var t of this.elements)0===e.length?e=t.toString():(t=t.toString(),e+=NTe(e)+t);return e.trim()}toMarkdown(e){let t="";for(var r of this.elements)0===t.length?t=r.toMarkdown(e):(r=r.toMarkdown(e),t+=NTe(t)+r);return t.trim()}},aIe=class{static{mt(this,"JSDocTagImpl")}static{yt(this,"JSDocTagImpl")}constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e="@"+this.name,t=this.content.toString();return 1===this.content.inlines.length?e=e+" "+t:1r.range.start.line&&(t+=` `)}return t}toMarkdown(t){let r="";for(let e=0;ei.range.start.line&&(r+=` `)}return r}},oIe=class{static{mt(this,"JSDocLineImpl")}static{yt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(NTe,"fillNewlines"),yt(NTe,"fillNewlines"),lIe=class{static{mt(this,"JSDocDocumentationProvider")}static{yt(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(r){var e=this.commentProvider.getComment(r);if(e&&fTe(e))return gTe(e).toMarkdown({renderLink:yt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:yt(e=>this.documentationTagRenderer(r,e),"renderTag")})}documentationLinkRenderer(e,t,r){var i;return(e=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t))&&e.nameSegment?(t=e.nameSegment.range.start.line+1,i=e.nameSegment.range.start.character+1,`[${r}](${e.documentUri.with({fragment:`L${t},`+i}).toString()})`):void 0}documentationTagRenderer(e,t){}findNameInLocalSymbols(t,r){var i=zde(t).localSymbols;if(i){let e=t;do{var n=i.getStream(e).find(e=>e.name===r);if(n)return n}while(e=e.$container)}}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},cIe=class{static{mt(this,"DefaultCommentProvider")}static{yt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return aTe(e)?e.$comment:i0e(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},hIe=class{static{mt(this,"DefaultAsyncParser")}static{yt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},uIe=class{static{mt(this,"AbstractThreadedAsyncParser")}static{yt(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{var e;0{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{e=this.hydrator.hydrate(e),i.resolve(e)}).catch(e=>{i.reject(e)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.promise}terminateWorker(e){e.terminate(),0<=(e=this.workerPool.indexOf(e))&&this.workerPool.splice(e,1)}async acquireParserWorker(e){this.initializeWorkers();for(var t of this.workerPool)if(t.ready)return t.lock(),t;let r=new s9e;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(a9e)}),this.queue.push(r),r.promise}},dIe=class{static{mt(this,"ParserWorker")}static{yt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new U9e.Emitter,this.deferred=new s9e,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,t(e=>{this.deferred.resolve(e),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(a9e),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new s9e,this.sendMessage(e),this.deferred.promise}},pIe=class{static{mt(this,"DefaultWorkspaceLock")}static{yt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new r9e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=X4e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=r9e.CancellationToken.None){var i=new s9e;return e.push({action:t,deferred:i,cancellationToken:r}),this.performNextOperation(),i.promise}async performNextOperation(){if(this.done){var e=[];if(0{try{var i=await Promise.resolve().then(()=>e(r));t.resolve(i)}catch(e){Z4e(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}},gIe=class{static{mt(this,"DefaultHydrator")}static{yt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new k9e,this.tokenTypeIdMap=new k9e,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){var t,r=new Map,i=new Map;for(t of Gde(e))r.set(t,{});if(e.$cstNode)for(var n of Xpe(e.$cstNode))i.set(n,{});return{astNodes:r,cstNodes:i}}dehydrateAstNode(e,t){var r,i,n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for([r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)Ede(a)?s.push(this.dehydrateAstNode(a,t)):_de(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else Ede(i)?n[r]=this.dehydrateAstNode(i,t):_de(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){var r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){var r=t.cstNodes.get(e);return Dde(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Ide(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Nde(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){var t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){var t,r=new Map,i=new Map;for(t of Gde(e))r.set(t,{});let n;if(e.$cstNode)for(var a of Xpe(e.$cstNode)){let e;"fullText"in a?(e=new jLe(a.fullText),n=e):"content"in a?e=new zLe:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(i.set(a,e),e.root=n)}return{astNodes:r,cstNodes:i}}hydrateAstNode(e,t){var r,i,n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for([r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)Ede(a)?s.push(this.setParent(this.hydrateAstNode(a,t),n)):_de(a)?s.push(this.hydrateReference(a,n,r,t)):s.push(a)}else Ede(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):_de(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){var i=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Ide(i))for(var n of e.content)n=this.hydrateCstNode(n,t,r++),i.content.push(n);return i}hydrateCstLeafNode(e){var t=this.getTokenType(e.tokenType),r=e.offset;return new FLe(r,e.length,{start:{line:e.startLine,character:e.startColumn},end:{line:e.endLine,character:e.endColumn}},t,e.hidden)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(var t of Gde(this.grammar))Zde(t)&&this.grammarElementIdMap.set(t,e++)}},mt(DTe,"createDefaultCoreModule"),yt(DTe,"createDefaultCoreModule"),mt(MTe,"createDefaultSharedCoreModule"),yt(MTe,"createDefaultSharedCoreModule"),(fIe=fIe||{}).merge=(e,t)=>FTe(FTe({},e),t),mt(OTe,"inject"),yt(OTe,"inject"),mIe=Symbol("isProxy"),mt(PTe,"eagerLoad"),yt(PTe,"eagerLoad"),mt(BTe,"_inject"),yt(BTe,"_inject"),yIe=Symbol(),mt($Te,"_resolve"),yt($Te,"_resolve"),mt(FTe,"_merge"),yt(FTe,"_merge"),vIe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(E=bIe=bIe||{}).REGULAR="indentation-sensitive",E.IGNORE_INDENTATION="ignore-indentation",xIe=class extends JLe{static{mt(this,"IndentationAwareTokenBuilder")}static{yt(this,"IndentationAwareTokenBuilder")}constructor(e=vIe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...vIe,...e},this.indentTokenType=a2e({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=a2e({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!uTe(e=super.buildTokens(e,t)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:n,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,c,h=[];for(r of e){for(var[u,d]of s)r.name===u?r.PUSH_MODE=bIe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===n?o=r:r.name===i?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0Wke,"AstUtils"),BiMap:mt(()=>k9e,"BiMap"),Cancellation:mt(()=>r9e,"Cancellation"),ContextCache:mt(()=>L9e,"ContextCache"),CstUtils:mt(()=>Pke,"CstUtils"),DONE_RESULT:mt(()=>zke,"DONE_RESULT"),Deferred:mt(()=>s9e,"Deferred"),Disposable:mt(()=>Y9e,"Disposable"),DisposableCache:mt(()=>A9e,"DisposableCache"),DocumentCache:mt(()=>I9e,"DocumentCache"),EMPTY_STREAM:mt(()=>Fke,"EMPTY_STREAM"),ErrorWithLocation:mt(()=>Hwe,"ErrorWithLocation"),GrammarUtils:mt(()=>Ywe,"GrammarUtils"),MultiMap:mt(()=>T9e,"MultiMap"),OperationCancelled:mt(()=>a9e,"OperationCancelled"),Reduction:mt(()=>jke,"Reduction"),RegExpUtils:mt(()=>Xwe,"RegExpUtils"),SimpleCache:mt(()=>R9e,"SimpleCache"),StreamImpl:mt(()=>$ke,"StreamImpl"),TreeStreamImpl:mt(()=>qke,"TreeStreamImpl"),URI:mt(()=>h9e,"URI"),UriTrie:mt(()=>p9e,"UriTrie"),UriUtils:mt(()=>d9e,"UriUtils"),WorkspaceCache:mt(()=>N9e,"WorkspaceCache"),assertCondition:mt(()=>f0e,"assertCondition"),assertUnreachable:mt(()=>g0e,"assertUnreachable"),delayNextTick:mt(()=>H4e,"delayNextTick"),interruptAndCheck:mt(()=>Q4e,"interruptAndCheck"),isOperationCancelled:mt(()=>Z4e,"isOperationCancelled"),loadGrammarFromJson:mt(()=>qTe,"loadGrammarFromJson"),setInterruptionPeriod:mt(()=>K4e,"setInterruptionPeriod"),startCancelableOperation:mt(()=>X4e,"startCancelableOperation"),stream:mt(()=>Pde,"stream")}),h5e(z,U9e),kIe=class{static{mt(this,"EmptyFileSystemProvider")}static{yt(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},wIe={fileSystemProvider:yt(()=>new kIe,"fileSystemProvider")},CIe={Grammar:yt(()=>{},"Grammar"),LanguageMetaData:yt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},SIe={AstReflection:yt(()=>new Wwe,"AstReflection")},mt(zTe,"createMinimalGrammarServices"),yt(zTe,"createMinimalGrammarServices"),mt(qTe,"loadGrammarFromJson"),yt(qTe,"loadGrammarFromJson"),h5e(Oke,z),EIe=class{static{mt(this,"DefaultLangiumProfiler")}static{yt(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new T9e}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(t,e){if(this.isActive(t))return console.log(`Creating profiling task for '${t}.${e}'.`),new _Ie(e=>this.records.add(t,this.dumpRecord(t,e)),e);throw new Error(`Category "${t}" is not active.`)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at `+t.date.toISOString());var r,i=[];for(r of t.entries.keys()){var n=t.entries.get(r),a=n.reduce((e,t)=>e+t);i.push({name:t.identifier+"."+r,count:n.length,duration:a})}function s(e){return Math.round(100*e)/100}return e=t.duration-i.map(e=>e.duration).reduce((e,t)=>e+t,0),i.push({name:t.identifier,count:1,duration:e}),i.sort((e,t)=>t.duration-e.duration),mt(s,"Round"),yt(s,"Round"),console.table(i.map(e=>({Element:e.name,Count:e.count,"Self %":s(100*e.duration/t.duration),"Time (ms)":s(e.duration)}))),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},_Ie=class{static{mt(this,"ProfilingTask")}static{yt(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new T9e,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);var e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){var t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);var r=performance.now()-t.start,r=(void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r),r-t.content);this.entries.add(e,r)}},(AIe=AIe||{}).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(RIe=RIe||{}).Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/},(LIe=LIe||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(IIe=IIe||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(NIe=NIe||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(DIe=DIe||{}).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(MIe=MIe||{}).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(OIe=OIe||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},(PIe=PIe||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/},(BIe=BIe||{}).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},{...AIe.Terminals,...RIe.Terminals,...LIe.Terminals,...IIe.Terminals,...NIe.Terminals,...DIe.Terminals,...MIe.Terminals,...PIe.Terminals,...OIe.Terminals,...BIe.Terminals},$Ie={$type:"Accelerator",name:"name",x:"x",y:"y"},FIe={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},zIe={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},qIe={$type:"Annotations",x:"x",y:"y"},jIe={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"},mt(jTe,"isArchitecture"),yt(jTe,"isArchitecture"),WIe={$type:"Axis",label:"label",name:"name"},UIe={$type:"Branch",name:"name",order:"order"},mt(WTe,"isBranch"),yt(WTe,"isBranch"),GIe={$type:"Checkout",branch:"branch"},VIe={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},YIe={$type:"ClassDefStatement",className:"className",styleText:"styleText"},HIe={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"},mt(UTe,"isCommit"),yt(UTe,"isCommit"),XIe={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},KIe={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},ZIe={$type:"Curve",entries:"entries",label:"label",name:"name"},QIe={$type:"Deaccelerator",name:"name",x:"x",y:"y"},JIe={$type:"Decorator",strategy:"strategy"},eNe={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},tNe={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},rNe={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},iNe={$type:"EmFrame"},nNe={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},aNe={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},sNe={$type:"EmModelEntity",name:"name"},mt(GTe,"isEmModelEntityType"),yt(GTe,"isEmModelEntityType"),oNe={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},lNe={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},mt(VTe,"isEmResetFrame"),yt(VTe,"isEmResetFrame"),cNe={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},hNe={$type:"Entry",axis:"axis",value:"value"},uNe={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},dNe={$type:"Evolution",stages:"stages"},pNe={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},gNe={$type:"Evolve",component:"component",target:"target"},fNe={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"},mt(YTe,"isGitGraph"),yt(YTe,"isGitGraph"),mNe={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},yNe={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"},mt(HTe,"isInfo"),yt(HTe,"isInfo"),vNe={$type:"Item",classSelector:"classSelector",name:"name"},bNe={$type:"Junction",id:"id",in:"in"},xNe={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},TNe={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},kNe={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},wNe={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"},mt(XTe,"isMerge"),yt(XTe,"isMerge"),CNe={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},SNe={$type:"Option",name:"name",value:"value"},ENe={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"},mt(KTe,"isPacket"),yt(KTe,"isPacket"),_Ne={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"},mt(ZTe,"isPacketBlock"),yt(ZTe,"isPacketBlock"),ANe={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"},mt(QTe,"isPie"),yt(QTe,"isPie"),RNe={$type:"PieSection",label:"label",value:"value"},mt(JTe,"isPieSection"),yt(JTe,"isPieSection"),LNe={$type:"Pipeline",components:"components",parent:"parent"},INe={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},NNe={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},DNe={$type:"Section",classSelector:"classSelector",name:"name"},MNe={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},ONe={$type:"Size",height:"height",width:"width"},PNe={$type:"Statement"},BNe={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"},mt(e5e,"isTreemap"),yt(e5e,"isTreemap"),$Ne={$type:"TreemapRow",indent:"indent",item:"item"},FNe={$type:"TreeNode",indent:"indent",name:"name"},zNe={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},qNe={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"},mt(t5e,"isWardley"),yt(t5e,"isWardley"),jNe=class extends Bke{static{mt(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Accelerator:{name:$Ie.$type,properties:{name:{name:$Ie.name},x:{name:$Ie.x},y:{name:$Ie.y}},superTypes:[]},Anchor:{name:FIe.$type,properties:{evolution:{name:FIe.evolution},name:{name:FIe.name},visibility:{name:FIe.visibility}},superTypes:[]},Annotation:{name:zIe.$type,properties:{number:{name:zIe.number},text:{name:zIe.text},x:{name:zIe.x},y:{name:zIe.y}},superTypes:[]},Annotations:{name:qIe.$type,properties:{x:{name:qIe.x},y:{name:qIe.y}},superTypes:[]},Architecture:{name:jIe.$type,properties:{accDescr:{name:jIe.accDescr},accTitle:{name:jIe.accTitle},edges:{name:jIe.edges,defaultValue:[]},groups:{name:jIe.groups,defaultValue:[]},junctions:{name:jIe.junctions,defaultValue:[]},services:{name:jIe.services,defaultValue:[]},title:{name:jIe.title}},superTypes:[]},Axis:{name:WIe.$type,properties:{label:{name:WIe.label},name:{name:WIe.name}},superTypes:[]},Branch:{name:UIe.$type,properties:{name:{name:UIe.name},order:{name:UIe.order}},superTypes:[PNe.$type]},Checkout:{name:GIe.$type,properties:{branch:{name:GIe.branch}},superTypes:[PNe.$type]},CherryPicking:{name:VIe.$type,properties:{id:{name:VIe.id},parent:{name:VIe.parent},tags:{name:VIe.tags,defaultValue:[]}},superTypes:[PNe.$type]},ClassDefStatement:{name:YIe.$type,properties:{className:{name:YIe.className},styleText:{name:YIe.styleText}},superTypes:[]},Commit:{name:HIe.$type,properties:{id:{name:HIe.id},message:{name:HIe.message},tags:{name:HIe.tags,defaultValue:[]},type:{name:HIe.type}},superTypes:[PNe.$type]},Common:{name:XIe.$type,properties:{accDescr:{name:XIe.accDescr},accTitle:{name:XIe.accTitle},title:{name:XIe.title}},superTypes:[]},Component:{name:KIe.$type,properties:{decorator:{name:KIe.decorator},evolution:{name:KIe.evolution},inertia:{name:KIe.inertia,defaultValue:!1},label:{name:KIe.label},name:{name:KIe.name},visibility:{name:KIe.visibility}},superTypes:[]},Curve:{name:ZIe.$type,properties:{entries:{name:ZIe.entries,defaultValue:[]},label:{name:ZIe.label},name:{name:ZIe.name}},superTypes:[]},Deaccelerator:{name:QIe.$type,properties:{name:{name:QIe.name},x:{name:QIe.x},y:{name:QIe.y}},superTypes:[]},Decorator:{name:JIe.$type,properties:{strategy:{name:JIe.strategy}},superTypes:[]},Direction:{name:eNe.$type,properties:{accDescr:{name:eNe.accDescr},accTitle:{name:eNe.accTitle},dir:{name:eNe.dir},statements:{name:eNe.statements,defaultValue:[]},title:{name:eNe.title}},superTypes:[fNe.$type]},Edge:{name:tNe.$type,properties:{lhsDir:{name:tNe.lhsDir},lhsGroup:{name:tNe.lhsGroup,defaultValue:!1},lhsId:{name:tNe.lhsId},lhsInto:{name:tNe.lhsInto,defaultValue:!1},rhsDir:{name:tNe.rhsDir},rhsGroup:{name:tNe.rhsGroup,defaultValue:!1},rhsId:{name:tNe.rhsId},rhsInto:{name:tNe.rhsInto,defaultValue:!1},title:{name:tNe.title}},superTypes:[]},EmDataEntity:{name:rNe.$type,properties:{dataBlockValue:{name:rNe.dataBlockValue},dataType:{name:rNe.dataType},name:{name:rNe.name}},superTypes:[]},EmFrame:{name:iNe.$type,properties:{},superTypes:[]},EmGwt:{name:nNe.$type,properties:{givenStatements:{name:nNe.givenStatements,defaultValue:[]},sourceFrame:{name:nNe.sourceFrame,referenceType:iNe.$type},thenStatements:{name:nNe.thenStatements,defaultValue:[]},whenStatements:{name:nNe.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:aNe.$type,properties:{entityIdentifier:{name:aNe.entityIdentifier,referenceType:sNe.$type}},superTypes:[]},EmModelEntity:{name:sNe.$type,properties:{name:{name:sNe.name}},superTypes:[]},EmNoteEntity:{name:oNe.$type,properties:{dataBlockValue:{name:oNe.dataBlockValue},dataType:{name:oNe.dataType},sourceFrame:{name:oNe.sourceFrame,referenceType:iNe.$type}},superTypes:[]},EmResetFrame:{name:lNe.$type,properties:{dataInlineValue:{name:lNe.dataInlineValue},dataReference:{name:lNe.dataReference,referenceType:rNe.$type},dataType:{name:lNe.dataType},entityIdentifier:{name:lNe.entityIdentifier},modelEntityType:{name:lNe.modelEntityType},name:{name:lNe.name},sourceFrames:{name:lNe.sourceFrames,defaultValue:[],referenceType:iNe.$type}},superTypes:[iNe.$type]},EmTimeFrame:{name:cNe.$type,properties:{dataInlineValue:{name:cNe.dataInlineValue},dataReference:{name:cNe.dataReference,referenceType:rNe.$type},dataType:{name:cNe.dataType},entityIdentifier:{name:cNe.entityIdentifier},modelEntityType:{name:cNe.modelEntityType},name:{name:cNe.name},sourceFrames:{name:cNe.sourceFrames,defaultValue:[],referenceType:iNe.$type}},superTypes:[iNe.$type]},Entry:{name:hNe.$type,properties:{axis:{name:hNe.axis,referenceType:WIe.$type},value:{name:hNe.value}},superTypes:[]},EventModel:{name:uNe.$type,properties:{accDescr:{name:uNe.accDescr},accTitle:{name:uNe.accTitle},dataEntities:{name:uNe.dataEntities,defaultValue:[]},frames:{name:uNe.frames,defaultValue:[]},gwtEntities:{name:uNe.gwtEntities,defaultValue:[]},modelEntities:{name:uNe.modelEntities,defaultValue:[]},noteEntities:{name:uNe.noteEntities,defaultValue:[]},title:{name:uNe.title}},superTypes:[]},Evolution:{name:dNe.$type,properties:{stages:{name:dNe.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:pNe.$type,properties:{boundary:{name:pNe.boundary},name:{name:pNe.name},secondName:{name:pNe.secondName}},superTypes:[]},Evolve:{name:gNe.$type,properties:{component:{name:gNe.component},target:{name:gNe.target}},superTypes:[]},GitGraph:{name:fNe.$type,properties:{accDescr:{name:fNe.accDescr},accTitle:{name:fNe.accTitle},statements:{name:fNe.statements,defaultValue:[]},title:{name:fNe.title}},superTypes:[]},Group:{name:mNe.$type,properties:{icon:{name:mNe.icon},id:{name:mNe.id},in:{name:mNe.in},title:{name:mNe.title}},superTypes:[]},Info:{name:yNe.$type,properties:{accDescr:{name:yNe.accDescr},accTitle:{name:yNe.accTitle},title:{name:yNe.title}},superTypes:[]},Item:{name:vNe.$type,properties:{classSelector:{name:vNe.classSelector},name:{name:vNe.name}},superTypes:[]},Junction:{name:bNe.$type,properties:{id:{name:bNe.id},in:{name:bNe.in}},superTypes:[]},Label:{name:xNe.$type,properties:{negX:{name:xNe.negX,defaultValue:!1},negY:{name:xNe.negY,defaultValue:!1},offsetX:{name:xNe.offsetX},offsetY:{name:xNe.offsetY}},superTypes:[]},Leaf:{name:TNe.$type,properties:{classSelector:{name:TNe.classSelector},name:{name:TNe.name},value:{name:TNe.value}},superTypes:[vNe.$type]},Link:{name:kNe.$type,properties:{arrow:{name:kNe.arrow},from:{name:kNe.from},fromPort:{name:kNe.fromPort},linkLabel:{name:kNe.linkLabel},to:{name:kNe.to},toPort:{name:kNe.toPort}},superTypes:[]},Merge:{name:wNe.$type,properties:{branch:{name:wNe.branch},id:{name:wNe.id},tags:{name:wNe.tags,defaultValue:[]},type:{name:wNe.type}},superTypes:[PNe.$type]},Note:{name:CNe.$type,properties:{evolution:{name:CNe.evolution},text:{name:CNe.text},visibility:{name:CNe.visibility}},superTypes:[]},Option:{name:SNe.$type,properties:{name:{name:SNe.name},value:{name:SNe.value,defaultValue:!1}},superTypes:[]},Packet:{name:ENe.$type,properties:{accDescr:{name:ENe.accDescr},accTitle:{name:ENe.accTitle},blocks:{name:ENe.blocks,defaultValue:[]},title:{name:ENe.title}},superTypes:[]},PacketBlock:{name:_Ne.$type,properties:{bits:{name:_Ne.bits},end:{name:_Ne.end},label:{name:_Ne.label},start:{name:_Ne.start}},superTypes:[]},Pie:{name:ANe.$type,properties:{accDescr:{name:ANe.accDescr},accTitle:{name:ANe.accTitle},sections:{name:ANe.sections,defaultValue:[]},showData:{name:ANe.showData,defaultValue:!1},title:{name:ANe.title}},superTypes:[]},PieSection:{name:RNe.$type,properties:{label:{name:RNe.label},value:{name:RNe.value}},superTypes:[]},Pipeline:{name:LNe.$type,properties:{components:{name:LNe.components,defaultValue:[]},parent:{name:LNe.parent}},superTypes:[]},PipelineComponent:{name:INe.$type,properties:{evolution:{name:INe.evolution},label:{name:INe.label},name:{name:INe.name}},superTypes:[]},Radar:{name:NNe.$type,properties:{accDescr:{name:NNe.accDescr},accTitle:{name:NNe.accTitle},axes:{name:NNe.axes,defaultValue:[]},curves:{name:NNe.curves,defaultValue:[]},options:{name:NNe.options,defaultValue:[]},title:{name:NNe.title}},superTypes:[]},Section:{name:DNe.$type,properties:{classSelector:{name:DNe.classSelector},name:{name:DNe.name}},superTypes:[vNe.$type]},Service:{name:MNe.$type,properties:{icon:{name:MNe.icon},iconText:{name:MNe.iconText},id:{name:MNe.id},in:{name:MNe.in},title:{name:MNe.title}},superTypes:[]},Size:{name:ONe.$type,properties:{height:{name:ONe.height},width:{name:ONe.width}},superTypes:[]},Statement:{name:PNe.$type,properties:{},superTypes:[]},TreeNode:{name:FNe.$type,properties:{indent:{name:FNe.indent},name:{name:FNe.name}},superTypes:[]},TreeView:{name:zNe.$type,properties:{accDescr:{name:zNe.accDescr},accTitle:{name:zNe.accTitle},nodes:{name:zNe.nodes,defaultValue:[]},title:{name:zNe.title}},superTypes:[]},Treemap:{name:BNe.$type,properties:{accDescr:{name:BNe.accDescr},accTitle:{name:BNe.accTitle},title:{name:BNe.title},TreemapRows:{name:BNe.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:$Ne.$type,properties:{indent:{name:$Ne.indent},item:{name:$Ne.item}},superTypes:[]},Wardley:{name:qNe.$type,properties:{accDescr:{name:qNe.accDescr},accelerators:{name:qNe.accelerators,defaultValue:[]},accTitle:{name:qNe.accTitle},anchors:{name:qNe.anchors,defaultValue:[]},annotation:{name:qNe.annotation,defaultValue:[]},annotations:{name:qNe.annotations,defaultValue:[]},components:{name:qNe.components,defaultValue:[]},deaccelerators:{name:qNe.deaccelerators,defaultValue:[]},evolution:{name:qNe.evolution},evolves:{name:qNe.evolves,defaultValue:[]},links:{name:qNe.links,defaultValue:[]},notes:{name:qNe.notes,defaultValue:[]},pipelines:{name:qNe.pipelines,defaultValue:[]},size:{name:qNe.size},title:{name:qNe.title}},superTypes:[]}}}static{yt(this,"MermaidAstReflection")}},WNe=new jNe,GNe=yt(()=>UNe=UNe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),"ArchitectureGrammarGrammar"),YNe=yt(()=>VNe=VNe??qTe('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}'),"EventModelingGrammar"),XNe=yt(()=>HNe=HNe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),"GitGraphGrammarGrammar"),ZNe=yt(()=>KNe=KNe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"InfoGrammarGrammar"),JNe=yt(()=>QNe=QNe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"PacketGrammarGrammar"),tDe=yt(()=>eDe=eDe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"PieGrammarGrammar"),iDe=yt(()=>rDe=rDe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),"RadarGrammarGrammar"),aDe=yt(()=>nDe=nDe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),"TreemapGrammarGrammar"),oDe=yt(()=>sDe=sDe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`),"TreeViewGrammarGrammar"),cDe=yt(()=>lDe=lDe??qTe(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"WardleyGrammarGrammar"),bDe={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(vDe={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(yDe={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(mDe={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(fDe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(gDe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(pDe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(dDe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(uDe={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(hDe={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},xDe={AstReflection:yt(()=>new jNe,"AstReflection")},TDe={Grammar:yt(()=>GNe(),"Grammar"),LanguageMetaData:yt(()=>hDe,"LanguageMetaData"),parser:{}},kDe={Grammar:yt(()=>YNe(),"Grammar"),LanguageMetaData:yt(()=>uDe,"LanguageMetaData"),parser:{}},wDe={Grammar:yt(()=>XNe(),"Grammar"),LanguageMetaData:yt(()=>dDe,"LanguageMetaData"),parser:{}},CDe={Grammar:yt(()=>ZNe(),"Grammar"),LanguageMetaData:yt(()=>pDe,"LanguageMetaData"),parser:{}},SDe={Grammar:yt(()=>JNe(),"Grammar"),LanguageMetaData:yt(()=>gDe,"LanguageMetaData"),parser:{}},EDe={Grammar:yt(()=>tDe(),"Grammar"),LanguageMetaData:yt(()=>fDe,"LanguageMetaData"),parser:{}},_De={Grammar:yt(()=>iDe(),"Grammar"),LanguageMetaData:yt(()=>mDe,"LanguageMetaData"),parser:{}},ADe={Grammar:yt(()=>aDe(),"Grammar"),LanguageMetaData:yt(()=>yDe,"LanguageMetaData"),parser:{}},RDe={Grammar:yt(()=>oDe(),"Grammar"),LanguageMetaData:yt(()=>vDe,"LanguageMetaData"),parser:{}},LDe={Grammar:yt(()=>cDe(),"Grammar"),LanguageMetaData:yt(()=>bDe,"LanguageMetaData"),parser:{}},IDe={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},NDe=class extends e9e{static{mt(this,"AbstractMermaidValueConverter")}static{yt(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){var i=this.runCommonConverter(e,t,r);return void 0===(i=void 0===i?this.runCustomConverter(e,t,r):i)?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){return void 0!==(e=IDe[e.name])&&null!==(e=e.exec(t))?void 0!==e[1]?e[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==e[2]?e[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` `):void 0:void 0}},DDe=class extends NDe{static{mt(this,"CommonValueConverter")}static{yt(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},MDe=class extends JLe{static{mt(this,"AbstractMermaidTokenBuilder")}static{yt(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){return(e=super.buildKeywordTokens(e,t,r)).forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),e}},class extends MDe{static{mt(this,"CommonTokenBuilder")}static{yt(this,"CommonTokenBuilder")}}});function PDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),_De,$De);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var BDe,$De,FDe=r(()=>{ODe(),BDe=class extends MDe{static{mt(this,"RadarTokenBuilder")}static{yt(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},$De={parser:{TokenBuilder:yt(()=>new BDe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(PDe,"createRadarServices"),yt(PDe,"createRadarServices")});function zDe(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function qDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),ADe,VDe);return e.ServiceRegistry.register(t),zDe(t),{shared:e,Treemap:t}}var jDe,WDe,UDe,GDe,VDe,YDe=r(()=>{ODe(),jDe=class extends MDe{static{mt(this,"TreemapTokenBuilder")}static{yt(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},WDe=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,UDe=class extends NDe{static{mt(this,"TreemapValueConverter")}static{yt(this,"TreemapValueConverter")}runCustomConverter(e,t,r){return"NUMBER2"===e.name?parseFloat(t.replace(/,/g,"")):"SEPARATOR"===e.name||"STRING2"===e.name?t.substring(1,t.length-1):"INDENTATION"===e.name?t.length:"ClassDef"===e.name?"string"!=typeof t?t:(e=WDe.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(zDe,"registerValidationChecks"),yt(zDe,"registerValidationChecks"),GDe=class{static{mt(this,"TreemapValidator")}static{yt(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(var i of e.TreemapRows)i.item&&(void 0===r&&void 0===i.indent?r=0:(void 0===i.indent||void 0!==r&&r>=parseInt(i.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},VDe={parser:{TokenBuilder:yt(()=>new jDe,"TokenBuilder"),ValueConverter:yt(()=>new UDe,"ValueConverter")},validation:{TreemapValidator:yt(()=>new GDe,"TreemapValidator")}},mt(qDe,"createTreemapServices"),yt(qDe,"createTreemapServices")});function HDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),LDe,KDe);return e.ServiceRegistry.register(t),{shared:e,Wardley:t}}var XDe,KDe,ZDe=r(()=>{ODe(),XDe=class extends NDe{static{mt(this,"WardleyValueConverter")}static{yt(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if("LINK_LABEL"===e.name.toUpperCase())return t.substring(1).trim()}},KDe={parser:{ValueConverter:yt(()=>new XDe,"ValueConverter")}},mt(HDe,"createWardleyServices"),yt(HDe,"createWardleyServices")});function QDe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),wDe,eMe);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var JDe,eMe,tMe=r(()=>{ODe(),JDe=class extends MDe{static{mt(this,"GitGraphTokenBuilder")}static{yt(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},eMe={parser:{TokenBuilder:yt(()=>new JDe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(QDe,"createGitGraphServices"),yt(QDe,"createGitGraphServices")});function rMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),CDe,nMe);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var iMe,nMe,aMe=r(()=>{ODe(),iMe=class extends MDe{static{mt(this,"InfoTokenBuilder")}static{yt(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},nMe={parser:{TokenBuilder:yt(()=>new iMe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(rMe,"createInfoServices"),yt(rMe,"createInfoServices")});function sMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),SDe,lMe);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var oMe,lMe,cMe=r(()=>{ODe(),oMe=class extends MDe{static{mt(this,"PacketTokenBuilder")}static{yt(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},lMe={parser:{TokenBuilder:yt(()=>new oMe,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")}},mt(sMe,"createPacketServices"),yt(sMe,"createPacketServices")});function hMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),EDe,pMe);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var uMe,dMe,pMe,gMe=r(()=>{ODe(),uMe=class extends MDe{static{mt(this,"PieTokenBuilder")}static{yt(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},dMe=class extends NDe{static{mt(this,"PieValueConverter")}static{yt(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},pMe={parser:{TokenBuilder:yt(()=>new uMe,"TokenBuilder"),ValueConverter:yt(()=>new dMe,"ValueConverter")}},mt(hMe,"createPieServices"),yt(hMe,"createPieServices")});function fMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),RDe,vMe);return e.ServiceRegistry.register(t),{shared:e,TreeView:t}}var mMe,yMe,vMe,bMe=r(()=>{ODe(),mMe=class extends NDe{static{mt(this,"TreeViewValueConverter")}static{yt(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){return"INDENTATION"===e.name?t?.length||0:"STRING2"===e.name?t.substring(1,t.length-1):void 0}},yMe=class extends MDe{static{mt(this,"TreeViewTokenBuilder")}static{yt(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},vMe={parser:{TokenBuilder:yt(()=>new yMe,"TokenBuilder"),ValueConverter:yt(()=>new mMe,"ValueConverter")}},mt(fMe,"createTreeViewServices"),yt(fMe,"createTreeViewServices")});function xMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),TDe,wMe);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var TMe,kMe,wMe,CMe=r(()=>{ODe(),TMe=class extends MDe{static{mt(this,"ArchitectureTokenBuilder")}static{yt(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},kMe=class extends NDe{static{mt(this,"ArchitectureValueConverter")}static{yt(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e=e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?(e=e.slice(1,-1)).replace(/\\"/g,'"').replace(/\\'/g,"'"):e).trim()}}},wMe={parser:{TokenBuilder:yt(()=>new TMe,"TokenBuilder"),ValueConverter:yt(()=>new kMe,"ValueConverter")}},mt(xMe,"createArchitectureServices"),yt(xMe,"createArchitectureServices")});function SMe(e){var t,r=e.validation.EventModelingValidator;(e=e.validation.ValidationRegistry)&&(t={EmTimeFrame:r.checkSourceFrameTypes.bind(r),EmResetFrame:r.checkSourceFrameTypes.bind(r)},e.register(t,r))}function EMe(e=wIe){var e=OTe(MTe(e),xDe),t=OTe(DTe({shared:e}),kDe,MMe);return e.ServiceRegistry.register(t),SMe(t),{shared:e,EventModel:t}}var _Me,AMe,RMe,LMe,IMe,NMe,DMe,MMe,OMe=r(()=>{ODe(),_Me=class extends MDe{static{mt(this,"EventModelingTokenBuilder")}static{yt(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},AMe=new Set(["cmd","command"]),RMe=new Set(["evt","event"]),LMe=new Set(["rmo","readmodel"]),IMe=new Set(["pcr","processor"]),NMe=new Set(["ui"]),mt(SMe,"registerValidationChecks"),yt(SMe,"registerValidationChecks"),DMe=class{static{mt(this,"EventModelingValidator")}static{yt(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){0!==e.sourceFrames.length&&(AMe.has(e.modelEntityType)?this.validateSources(e,new Set([...NMe,...IMe]),"command","ui or processor",t):RMe.has(e.modelEntityType)?this.validateSources(e,AMe,"event","command",t):LMe.has(e.modelEntityType)?this.validateSources(e,RMe,"read model","event",t):IMe.has(e.modelEntityType)?this.validateSources(e,LMe,"processor","read model",t):NMe.has(e.modelEntityType)&&this.validateSources(e,LMe,"ui","read model",t))}validateSources(e,t,r,i,n){for(var a of e.sourceFrames)void 0===(a=a.ref)||t.has(a.modelEntityType)||n("error",`A ${r} can only receive input from a ${i}, not from '${a.modelEntityType}'.`,{node:e,property:"sourceFrames"})}},MMe={parser:{TokenBuilder:yt(()=>new _Me,"TokenBuilder"),ValueConverter:yt(()=>new DDe,"ValueConverter")},validation:{EventModelingValidator:yt(()=>new DMe,"EventModelingValidator")}},mt(EMe,"createEventModelingServices"),yt(EMe,"createEventModelingServices")}),PMe={},BMe=(Vat(PMe,{InfoModule:()=>nMe,createInfoServices:()=>rMe}),r(()=>{aMe(),ODe()})),$Me={},FMe=(Vat($Me,{PacketModule:()=>lMe,createPacketServices:()=>sMe}),r(()=>{cMe(),ODe()})),zMe={},qMe=(Vat(zMe,{PieModule:()=>pMe,createPieServices:()=>hMe}),r(()=>{gMe(),ODe()})),jMe={},WMe=(Vat(jMe,{TreeViewModule:()=>vMe,createTreeViewServices:()=>fMe}),r(()=>{bMe(),ODe()})),UMe={},GMe=(Vat(UMe,{ArchitectureModule:()=>wMe,createArchitectureServices:()=>xMe}),r(()=>{CMe(),ODe()})),VMe={},YMe=(Vat(VMe,{GitGraphModule:()=>eMe,createGitGraphServices:()=>QDe}),r(()=>{tMe(),ODe()})),HMe={},XMe=(Vat(HMe,{EventModelingModule:()=>MMe,createEventModelingServices:()=>EMe}),r(()=>{OMe(),ODe()})),KMe={},ZMe=(Vat(KMe,{RadarModule:()=>$De,createRadarServices:()=>PDe}),r(()=>{FDe(),ODe()})),QMe={},JMe=(Vat(QMe,{TreemapModule:()=>VDe,createTreemapServices:()=>qDe}),r(()=>{YDe(),ODe()})),eOe={},tOe=(Vat(eOe,{WardleyModule:()=>KDe,createWardleyServices:()=>HDe}),r(()=>{ZDe(),ODe()}));async function rOe(e,t){var r=nOe[e];if(!r)throw new Error("Unknown diagram type: "+e);if(iOe[e]||await r(),0<(r=iOe[e].parse(t)).lexerErrors.length||0{FDe(),YDe(),ZDe(),tMe(),aMe(),cMe(),gMe(),bMe(),CMe(),OMe(),ODe(),iOe={},nOe={info:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(BMe(),PMe))).createInfoServices)().Info.parser.LangiumParser;iOe.info=e},"info"),packet:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(FMe(),$Me))).createPacketServices)().Packet.parser.LangiumParser;iOe.packet=e},"packet"),pie:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(qMe(),zMe))).createPieServices)().Pie.parser.LangiumParser;iOe.pie=e},"pie"),treeView:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(WMe(),jMe))).createTreeViewServices)().TreeView.parser.LangiumParser;iOe.treeView=e},"treeView"),architecture:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(GMe(),UMe))).createArchitectureServices)().Architecture.parser.LangiumParser;iOe.architecture=e},"architecture"),gitGraph:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(YMe(),VMe))).createGitGraphServices)().GitGraph.parser.LangiumParser;iOe.gitGraph=e},"gitGraph"),eventmodeling:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(XMe(),HMe))).createEventModelingServices)().EventModel.parser.LangiumParser;iOe.eventmodeling=e},"eventmodeling"),radar:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(ZMe(),KMe))).createRadarServices)().Radar.parser.LangiumParser;iOe.radar=e},"radar"),treemap:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(JMe(),QMe))).createTreemapServices)().Treemap.parser.LangiumParser;iOe.treemap=e},"treemap"),wardley:yt(async()=>{var e=(e=(await Promise.resolve().then(()=>(tOe(),eOe))).createWardleyServices)().Wardley.parser.LangiumParser;iOe.wardley=e},"wardley")},mt(rOe,"parse"),yt(rOe,"parse"),aOe=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: `+e.message).join(` `)} `+e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: `+e.message).join(` `)),this.result=e}static{yt(this,"MermaidParseError")}}});function oOe(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var lOe,cOe,hOe=r(()=>{mt(oOe,"populateCommonDb")}),uOe=r(()=>{lOe={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),dOe=r(()=>{cOe=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function pOe(){return SC({length:7})}function gOe(e,i){let n=Object.create(null);return e.reduce((e,t)=>{var r=i(t);return n[r]||(n[r]=!0,e.push(t)),e},[])}function fOe(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function mOe(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r="";e.forEach(function(e){e===t?r+="\t*":r+="\t|"});var i,n=[r,t.id,t.seq];for(i in v.records.branches)v.records.branches.get(i)===t.id&&n.push(i);if(P.debug(n.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=v.records.commits.get(t.parents[0]);fOe(e,t,a),t.parents[1]&&e.push(v.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=v.records.commits.get(t.parents[0]),fOe(e,t,a))}mOe(e=gOe(e,e=>e.id))}var yOe,vOe,v,bOe,xOe,TOe,kOe,wOe,COe,SOe,EOe,_Oe,AOe,ROe,LOe,IOe,NOe,DOe,MOe,OOe,POe,BOe,$Oe,FOe,zOe,qOe,jOe,WOe,UOe,GOe,VOe,YOe,HOe,XOe,KOe,ZOe,QOe,JOe,ePe,tPe,rPe,iPe,nPe,aPe,sPe,oPe,lPe,cPe,hPe,uPe,dPe,pPe,gPe,fPe,mPe,yPe,vPe,bPe,xPe,TPe,kPe,wPe,CPe,SPe,EPe,_Pe,APe,RPe,LPe,IPe,NPe,DPe,MPe,OPe=r(()=>{e(),zC(),wi(),th(),Wu(),uOe(),dOe(),Ti(),yOe=ir.gitGraph,vOe=mt(()=>lC({...yOe,...vr().gitGraph}),"getConfig"),v=new cOe(()=>{var e=(t=vOe()).mainBranchName,t=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}}),mt(pOe,"getID"),mt(gOe,"uniqBy"),bOe=mt(function(e){v.records.direction=e},"setDirection"),xOe=mt(function(e){P.debug("options str",e),e=e?.trim()||"{}";try{v.records.options=JSON.parse(e)}catch(e){P.error("error while parsing gitGraph options",e.message)}},"setOptions"),TOe=mt(function(){return v.records.options},"getOptions"),kOe=mt(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags,a=(P.info("commit",t,r,i,n),P.debug("Entering commit:",t,r,i,n),vOe());r=I.sanitizeText(r,a),t=I.sanitizeText(t,a),n=n?.map(e=>I.sanitizeText(e,a)),e={id:r||v.records.seq+"-"+pOe(),message:t,seq:v.records.seq++,type:i??lOe.NORMAL,tags:n??[],parents:null==v.records.head?[]:[v.records.head.id],branch:v.records.currBranch},v.records.head=e,P.info("main branch",a.mainBranchName),v.records.commits.has(e.id)&&P.warn(`Commit ID ${e.id} already exists`),v.records.commits.set(e.id,e),v.records.branches.set(v.records.currBranch,e.id),P.debug("in pushCommit "+e.id)},"commit"),wOe=mt(function(e){var t=e.name,e=e.order,t=I.sanitizeText(t,vOe());if(v.records.branches.has(t))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 ${t}")`);v.records.branches.set(t,null!=v.records.head?v.records.head.id:null),v.records.branchConfig.set(t,{name:t,order:e}),EOe(t),P.debug("in createBranch")},"branch"),COe=mt(e=>{var t=e.branch,r=e.id,i=e.type,n=e.tags,a=vOe(),t=I.sanitizeText(t,a),r=r&&I.sanitizeText(r,a),e=v.records.branches.get(v.records.currBranch),a=v.records.branches.get(t),e=e?v.records.commits.get(e):void 0,s=a?v.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(v.records.currBranch===t)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(void 0===e||!e)throw(o=new Error(`Incorrect usage of "merge". Current branch (${v.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!v.records.branches.has(t))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist")).hash={text:"merge "+t,token:"merge "+t,expected:["branch "+t]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits")).hash={text:"merge "+t,token:"merge "+t,expected:['"commit"']},o;if(e===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(r&&v.records.commits.has(r))throw(e=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${t} ${r} ${i} `+n?.join(" "),token:`merge ${t} ${r} ${i} `+n?.join(" "),expected:[`merge ${t} ${r}_UNIQUE ${i} `+n?.join(" ")]},e;var s=a||"",o={id:r||v.records.seq+"-"+pOe(),message:`merged branch ${t} into `+v.records.currBranch,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,s],branch:v.records.currBranch,type:lOe.MERGE,customType:i,customId:!!r,tags:n??[]};v.records.head=o,v.records.commits.set(o.id,o),v.records.branches.set(v.records.currBranch,o.id),P.debug(v.records.branches),P.debug("in mergeBranch")},"merge"),SOe=mt(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent,a=(P.debug("Entering cherryPick:",t,r,i),vOe());if(t=I.sanitizeText(t,a),r=I.sanitizeText(r,a),i=i?.map(e=>I.sanitizeText(e,a)),n=I.sanitizeText(n,a),!t||!v.records.commits.has(t))throw(e=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},e;if(void 0===(e=v.records.commits.get(t))||!e)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(e.parents)||!e.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=e.branch;if(e.type===lOe.MERGE&&!n)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||!v.records.commits.has(r)){if(s===v.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=v.records.branches.get(v.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=v.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:v.records.seq+"-"+pOe(),message:`cherry-picked ${e?.message} into `+v.records.currBranch,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,e.id],branch:v.records.currBranch,type:lOe.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+e.id+(e.type===lOe.MERGE?"|parent:"+n:"")]},v.records.head=o,v.records.commits.set(o.id,o),v.records.branches.set(v.records.currBranch,o.id),P.debug(v.records.branches),P.debug("in cherryPick")}},"cherryPick"),EOe=mt(function(e){var t;if(e=I.sanitizeText(e,vOe()),!v.records.branches.has(e))throw(t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`)).hash={text:"checkout "+e,token:"checkout "+e,expected:["branch "+e]},t;v.records.currBranch=e,t=v.records.branches.get(v.records.currBranch),v.records.head=void 0!==t&&t?v.records.commits.get(t)??null:null},"checkout"),mt(fOe,"upsert"),mt(mOe,"prettyPrintCommitHistory"),_Oe=mt(function(){P.debug(v.records.commits),mOe([NOe()[0]])},"prettyPrint"),AOe=mt(function(){v.reset(),Ph()},"clear"),ROe=mt(function(){return[...v.records.branchConfig.values()].map((e,t)=>null!=e.order?e:{...e,order:parseFloat("0."+t)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),LOe=mt(function(){return v.records.branches},"getBranches"),IOe=mt(function(){return v.records.commits},"getCommits"),NOe=mt(function(){var e=[...v.records.commits.values()];return e.forEach(function(e){P.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),DOe=mt(function(){return v.records.currBranch},"getCurrentBranch"),MOe=mt(function(){return v.records.direction},"getDirection"),OOe=mt(function(){return v.records.head},"getHead"),POe={commitType:lOe,getConfig:vOe,setDirection:bOe,setOptions:xOe,getOptions:TOe,commit:kOe,branch:wOe,merge:COe,cherryPick:SOe,checkout:EOe,prettyPrint:_Oe,clear:AOe,getBranchesAsObjArray:ROe,getBranches:LOe,getCommits:IOe,getCommitsArray:NOe,getCurrentBranch:DOe,getDirection:MOe,getHead:OOe,setAccTitle:Bh,getAccTitle:$h,getAccDescription:zh,setAccDescription:Fh,setDiagramTitle:qh,getDiagramTitle:jh}}),PPe=r(()=>{sOe(),e(),hOe(),OPe(),uOe(),BOe=mt((e,t)=>{oOe(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)$Oe(r,t)},"populate"),$Oe=mt((e,t)=>{var r={Commit:mt(e=>t.commit(FOe(e)),"Commit"),Branch:mt(e=>t.branch(zOe(e)),"Branch"),Merge:mt(e=>t.merge(qOe(e)),"Merge"),Checkout:mt(e=>t.checkout(jOe(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(WOe(e)),"CherryPicking")}[e.$type];r?r(e):P.error("Unknown statement type: "+e.$type)},"parseStatement"),FOe=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?lOe[e.type]:lOe.NORMAL,tags:e.tags??void 0}),"parseCommit"),zOe=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),qOe=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?lOe[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),jOe=mt(e=>e.branch,"parseCheckout"),WOe=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),UOe={parse:mt(async e=>{e=await rOe("gitGraph",e),P.debug(e),BOe(e,POe)},"parse")}}),BPe=r(()=>{bk(),Uu(),e(),zC(),uOe(),GOe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),VOe=new Set(["redux-color","redux-dark-color"]),YOe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),HOe=mt((e,t,r=!1)=>r&&0{XOe.clear(),KOe.clear(),ZOe.clear(),JOe=0,QOe=[],ePe="LR"},"clear"),rPe=mt(e=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof e?e.split(/\\n|\n|/gi):e).forEach(e=>{var t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=e.trim(),r.appendChild(t)}),r},"drawText"),iPe=mt(e=>{let r,i,n;return n="BT"===ePe?(i=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(i=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===ePe||"BT"==ePe?KOe.get(e)?.y:KOe.get(e)?.x;void 0!==t&&i(t,n)&&(r=e,n=t)}),r},"findClosestParent"),nPe=mt(e=>{let r="",i=1/0;return e.forEach(e=>{var t=KOe.get(e).y;t<=i&&(r=e,i=t)}),r||void 0},"findClosestParentBT"),aPe=mt((e,i,t)=>{let n=t,a=t,r=[];e.forEach(e=>{var t=i.get(e);if(!t)throw new Error("Commit not found for key "+e);t.parents.length?(n=oPe(t),a=Math.max(n,a)):r.push(t),lPe(t,n)}),n=a,r.forEach(e=>{cPe(e,n,t)}),e.forEach(e=>{var t,r;(e=i.get(e))?.parents.length&&(t=nPe(e.parents),(n=KOe.get(t).y-40)<=a&&(a=n),t=XOe.get(e.branch).pos,r=n-10,KOe.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),sPe=mt(e=>{var t=iPe(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=KOe.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),oPe=mt(e=>sPe(e)+40,"calculateCommitPosition"),lPe=mt((e,t)=>{var r=XOe.get(e.branch);if(r)return r=r.pos,KOe.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),cPe=mt((e,t,r)=>{var i=XOe.get(e.branch);if(!i)throw new Error("Branch not found for commit "+e.id);i=i.pos,KOe.set(e.id,{x:i,y:t+r})},"setRootPosition"),hPe=mt((e,t,r,i,n,a)=>{var s=B().theme,o=GOe.has(s??""),l=VOe.has(s??""),s=YOe.has(s??"");a===lOe.HIGHLIGHT?(e.append("rect").attr("x",r.x-10+(o?3:0)).attr("y",r.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${t.id} commit-highlight${HOe(n,8,l)} ${i}-outer`),e.append("rect").attr("x",r.x-6+(o?2:0)).attr("y",r.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${t.id} commit${HOe(n,8,l)} ${i}-inner`)):a===lOe.CHERRY_PICK?(e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",o?7:10).attr("class",`commit ${t.id} `+i),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",s?"#000000":"#fff").attr("class",`commit ${t.id} `+i),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",s?"#000000":"#fff").attr("class",`commit ${t.id} `+i),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",s?"#000000":"#fff").attr("class",`commit ${t.id} `+i),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",s?"#000000":"#fff").attr("class",`commit ${t.id} `+i)):((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",o?7:10),s.attr("class",`commit ${t.id} commit`+HOe(n,8,l)),a===lOe.MERGE&&((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",o?5:6),s.attr("class",`commit ${i} ${t.id} commit`+HOe(n,8,l))),a===lOe.REVERSE&&(s=o?4:5,e.append("path").attr("d",`M ${r.x-s},${r.y-s}L${r.x+s},${r.y+s}M${r.x-s},${r.y+s}L${r.x+s},`+(r.y-s)).attr("class",`commit ${i} ${t.id} commit`+HOe(n,8,l))))},"drawCommitBullet"),uPe=mt((e,t,r,i,n)=>{var a,s;t.type!==lOe.CHERRY_PICK&&(t.customId&&t.type===lOe.MERGE||t.type!==lOe.MERGE)&&n.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),s=(t=e.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-s.width/2-2).attr("y",r.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===ePe||"BT"===ePe?(a.attr("x",r.x-(s.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(s.width+16)).attr("y",r.y+s.height-12)):t.attr("x",r.posWithOffset-s.width/2),n.rotateCommitLabel)&&("TB"===ePe||"BT"===ePe?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(n=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5,e.attr("transform","translate("+n+", "+t+") rotate(-45, "+i+", "+r.y+")")))},"drawCommitLabel"),dPe=mt((n,a,s,o)=>{if(0{switch(e.customType??e.type){case lOe.NORMAL:return"commit-normal";case lOe.REVERSE:return"commit-reverse";case lOe.HIGHLIGHT:return"commit-highlight";case lOe.MERGE:return"commit-merge";case lOe.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),gPe=mt((e,t,r,i)=>{var n,a={x:0,y:0};return 0{var r="BT"===ePe&&r?t:t+10,t=XOe.get(e.branch)?.pos,i="TB"===ePe||"BT"===ePe?XOe.get(e.branch)?.pos:r;if(void 0===i||void 0===t)throw new Error("Position were undefined for commit "+e.id);return e=GOe.has(B().theme??""),{x:i,y:"TB"===ePe||"BT"===ePe?r:t+(e?7:-2),posWithOffset:r}},"getCommitPosition"),mPe=mt((e,a,s,o)=>{let l=e.append("g").attr("class","commit-bullets"),c=e.append("g").attr("class","commit-labels"),h="TB"===ePe||"BT"===ePe?30:0,t=[...a.keys()],u=o.parallelCommits??!1,r=mt((e,t)=>(e=a.get(e)?.seq,t=a.get(t)?.seq,void 0!==e&&void 0!==t?e-t:0),"sortKeys"),i=t.sort(r);"BT"===ePe&&(u&&aPe(i,a,h),i=i.reverse()),i.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);u&&(h=gPe(t,ePe,h,KOe));var r,i,n,e=fPe(t,h,u);s&&(r=pPe(t),i=t.customType??t.type,n=XOe.get(t.branch)?.index??0,hPe(l,t,e,r,n,i),uPe(c,t,e,h,o),dPe(c,t,e,h)),"TB"===ePe||"BT"===ePe?KOe.set(t.id,{x:e.x,y:e.posWithOffset}):KOe.set(t.id,{x:e.posWithOffset,y:e.y}),(h="BT"===ePe&&u?h+40:h+40+10)>JOe&&(JOe=h)})},"drawCommits"),yPe=mt((t,r,e,i,n)=>{let a=(("TB"===ePe||"BT"===ePe?e.xe.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seqo(e)&&s(e))},"shouldRerouteArrow"),vPe=mt((e,t,r=0)=>{let i=e+Math.abs(e-t)/2,n;return 510<=Math.abs(e-i))?(QOe.push(i),i):(n=Math.abs(e-t),vPe(e,t-n/5,r+1))},"findLane"),bPe=mt((e,t,r,i)=>{var n,a=B().theme,a=VOe.has(a??""),s=KOe.get(t.id),o=KOe.get(r.id);if(void 0===s||void 0===o)throw new Error(`Commit positions not found for commits ${t.id} and `+r.id);let l=yPe(t,r,s,o,i),c="",h="",u=0,d=0,p=XOe.get(r.branch)?.index;r.type===lOe.MERGE&&t.id!==r.parents[0]&&(p=XOe.get(t.branch)?.index);let g;if(l?(c="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",u=10,d=10,i=s.yo.x&&(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",u=20,d=20,g=r.type===lOe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${o.y-u} ${h} ${s.x-d} ${o.y} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${o.x+u} ${s.y} ${c} ${o.x} ${s.y+d} L ${o.x} `+o.y),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} `+o.y)):"BT"===ePe?(s.xo.x&&(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",u=20,d=20,g=r.type===lOe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${o.y+u} ${c} ${s.x-d} ${o.y} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${o.x+u} ${s.y} ${h} ${o.x} ${s.y-d} L ${o.x} `+o.y),s.x===o.x&&(g=`M ${s.x} ${s.y} L ${o.x} `+o.y)):(s.yo.y&&(g=r.type===lOe.MERGE&&t.id!==r.parents[0]?`M ${s.x} ${s.y} L ${o.x-u} ${s.y} ${c} ${o.x} ${s.y-d} L ${o.x} `+o.y:`M ${s.x} ${s.y} L ${s.x} ${o.y+u} ${h} ${s.x+d} ${o.y} L ${o.x} `+o.y),s.y===o.y&&(g=`M ${s.x} ${s.y} L ${o.x} `+o.y))),void 0===g)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+HOe(p,8,a))},"drawArrow"),xPe=mt((e,r)=>{let i=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(e=>{let t=r.get(e);t.parents&&0{bPe(i,r.get(e),t,r)})})},"drawArrows"),TPe=mt((e,t,c,h)=>{let{look:u,theme:r,themeVariables:i}=B(),{dropShadow:d,THEME_COLOR_LIMIT:p}=i,g=GOe.has(r??""),f=VOe.has(r??""),m=e.append("g");t.forEach((e,t)=>{var t=HOe(t,g?p:8,f),r=XOe.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);var i="TB"===ePe||"BT"===ePe?r:g?r+6+1:r-2,n=((n=m.append("line")).attr("x1",0),n.attr("y1",i),n.attr("x2",JOe),n.attr("y2",i),n.attr("class","branch branch"+t),"TB"===ePe?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",JOe),n.attr("x2",r)):"BT"===ePe&&(n.attr("y1",JOe),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),QOe.push(i),e.name),e=rPe(n),n=m.insert("rect"),a=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t),e=(a.node().appendChild(e),e.getBBox()),s=g?0:4,o=g?16:0,l=g?12:0;"neo"===u&&n.attr("data-look","neo"),n.attr("class","branchLabelBkg label"+t).attr("style","neo"===u?"filter:"+(g?`url(#${h}-drop-shadow)`:d):"").attr("rx",s).attr("ry",s).attr("x",-e.width-4-(!0===c.rotateCommitLabel?30:0)).attr("y",-e.height/2+10).attr("width",e.width+18+o).attr("height",e.height+4+l),a.attr("transform","translate("+(-e.width-14-(!0===c.rotateCommitLabel?30:0)+o/2)+", "+(i-e.height/2-2)+")"),"TB"===ePe?(n.attr("x",r-e.width/2-10).attr("y",0),a.attr("transform","translate("+(r-e.width/2-5)+", 0)"),g&&(n.attr("transform",`translate(${-o/2-3}, ${-l-10})`),a.attr("transform","translate("+(r-e.width/2-5)+", "+(2*-l+7)+")"))):"BT"===ePe?(n.attr("x",r-e.width/2-10).attr("y",JOe),a.attr("transform","translate("+(r-e.width/2-5)+", "+JOe+")"),g&&(n.attr("transform",`translate(${-o/2-3}, ${10+l})`),a.attr("transform","translate("+(r-e.width/2-5)+", "+(JOe+2*l+4)+")"))):n.attr("transform","translate(-19, "+(i-12-l/2)+")")})},"drawBranches"),kPe=mt(function(e,t,r,i,n){return XOe.set(e,{pos:t,index:r}),t+(50+(n?40:0)+("TB"===ePe||"BT"===ePe?i.width/2:0))},"setBranchPosition"),wPe=mt(function(u,d,p,g){if(tPe(),P.debug("in gitgraph renderer",u+` `,"id:",d,p),(u=g.db).getConfig){let e=u.getConfig(),s=e.rotateCommitLabel??!1,o=(ZOe=u.getCommits(),p=u.getBranchesAsObjArray(),ePe=u.getDirection(),Q(`[id="${d}"]`)),{look:t,theme:r,themeVariables:i}=B(),{useGradient:n,gradientStart:a,gradientStop:l,filterColor:c}=i,h=(n&&((g=o.append("defs").append("linearGradient").attr("id",d+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),g.append("stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)),"neo"===t&&GOe.has(r??"")&&o.append("defs").append("filter").attr("id",d+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",c),0);p.forEach((e,t)=>{var r=rPe(e.name),i=o.append("g"),n=i.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());h=kPe(e.name,h,t,r,s),a.remove(),n.remove(),i.remove()}),mPe(o,ZOe,!1,e),e.showBranches&&TPe(o,p,e,d),xPe(o,ZOe),mPe(o,ZOe,!0,e),PC.insertTitle(o,"gitTitleText",e.titleTopMargin??0,u.getDiagramTitle()),Hh(void 0,o,e.diagramPadding,e.useMaxWidth)}else P.error("getConfig method is not available on db")},"draw"),CPe={draw:wPe}}),$Pe=r(()=>{wi(),SPe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),EPe=new Set(["redux-color","redux-dark-color"]),_Pe=new Set(["neo","neo-dark"]),APe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),RPe=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),LPe=mt(t=>{let r=t.svgId,i="";if(t.useGradient&&r)for(let e=0;e{var i,n,{theme:a,themeVariables:e}=vr(),s=e.borderColorArray,o=SPe.has(a);if(_Pe.has(a)){let t="";for(let e=0;e""+Array.from({length:r.THEME_COLOR_LIMIT},(e,t)=>t).map(e=>{var t=e%8;return` .branch-label${e} { fill: ${r["gitBranchLabel"+t]}; } .commit${e} { stroke: ${r["git"+t]}; fill: ${r["git"+t]}; } .commit-highlight${e} { stroke: ${r["gitInv"+t]}; fill: ${r["gitInv"+t]}; } .label${e} { fill: ${r["git"+t]}; } .arrow${e} { stroke: ${r["git"+t]}; } `}).join(` `),"normalTheme"),DPe=mt(e=>{var t=vr().theme,r=RPe.has(t);return` .commit-id, .commit-msg, .branch-label { fill: lightgrey; color: lightgrey; font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } ${(r?IPe:NPe)(e)} .branch { stroke-width: ${e.strokeWidth}; stroke: ${e.commitLineColor??e.lineColor}; stroke-dasharray: ${r?"4 2":"2"}; } .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${r?e.nodeBorder:e.commitLabelColor}; ${r?`font-weight:${e.noteFontWeight};`:""}} .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${r?"transparent":e.commitLabelBackground}; opacity: ${r?"":.5}; } .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} .tag-label-bkg { fill: ${r?e.mainBkg:e.tagLabelBackground}; stroke: ${r?e.nodeBorder:e.tagLabelBorder}; ${r?"filter:"+e.dropShadow:""} } .tag-hole { fill: ${e.textColor}; } .commit-merge { stroke: ${r?e.mainBkg:e.primaryColor}; fill: ${r?e.mainBkg:e.primaryColor}; } .commit-reverse { stroke: ${r?e.mainBkg:e.primaryColor}; fill: ${r?e.mainBkg:e.primaryColor}; stroke-width: ${r?e.strokeWidth:3}; } .commit-highlight-outer { } .commit-highlight-inner { stroke: ${r?e.mainBkg:e.primaryColor}; fill: ${r?e.mainBkg:e.primaryColor}; } .arrow { /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ stroke-width: ${SPe.has(t)?e.strokeWidth:8}; stroke-linecap: round; fill: none } .gitTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } `},"getStyles"),MPe=DPe}),FPe={};Vat(FPe,{diagram:()=>zPe});var zPe,qPe,jPe,WPe=r(()=>{PPe(),OPe(),BPe(),$Pe(),zPe={parser:UOe,db:POe,renderer:CPe,styles:MPe}}),UPe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],n=[1,27],a=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],b=[1,16],x=[1,19],T=[1,20],k=[1,21],w=[1,22],C=[1,23],S=[1,25],E=[1,35],i={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:i.TopAxis(),this.$=a[o].substr(8);break;case 20:i.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:i.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:i.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:i.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:i.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:i.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],i.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],null),i.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],i.setClickEvent(a[o-2],a[o],null),i.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-1],a[o]),i.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:b,30:x,31:T,33:k,35:w,36:C,37:24,38:S,40:E},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:b,30:x,31:T,33:k,35:w,36:C,37:24,38:S,40:E},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{function r(){return function(e,t,n){var a=mt(function(e){return e.add(4-e.isoWeekday(),"day")},"a"),s=((t=t.prototype).isoWeekYear=function(){return a(this).year()},t.isoWeek=function(e){var t,r,i;return this.$utils().u(e)?(r=a(this),i=this.isoWeekYear(),t=4-(i=(this.$u?n.utc:n)().year(i).startOf("year")).isoWeekday(),4{function r(){var o={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"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,e=/\d/,t=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,g={},n=mt(function(e){return(e=+e)+(68{try{if(-1<["x","X"].indexOf(t))return new Date(("X"===t?1e3:1)*e);var n=w(t)(e),a=n.year,s=n.month,o=n.day,l=n.hours,c=n.minutes,h=n.seconds,u=n.milliseconds,d=n.zone,p=n.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0{function r(){return function(e,t){var a=(t=t.prototype).format;t.format=function(e){var t,r,i=this,n=this.$locale();return this.isValid()?(t=this.$utils(),r=(e||"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(e){switch(e){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return n.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return n.ordinal(i.week(),"W");case"w":case"ww":return t.s(i.week(),"w"===e?1:2,"0");case"W":case"WW":return t.s(i.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return t.s(String(0===i.$H?24:i.$H),"k"===e?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return e}}),a.bind(this)(r)):a.bind(this)(e)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()});function HPe(r,i,e){let n=!0;for(;n;)n=!1,e.forEach(function(e){var t=new RegExp("^\\s*"+e+"\\s*$");r[0].match(t)&&(i[e]=!0,r.shift(1),n=!0)})}var XPe,KPe,ZPe,QPe,JPe,eBe,tBe,rBe,iBe,nBe,aBe,sBe,oBe,lBe,cBe,hBe,uBe,dBe,pBe,gBe,fBe,mBe,yBe,vBe,bBe,xBe,TBe,kBe,wBe,CBe,SBe,EBe,_Be,ABe,RBe,LBe,IBe,NBe,DBe,MBe,OBe,PBe,BBe,$Be,FBe,zBe,qBe,jBe,WBe,UBe,GBe,VBe,YBe,HBe,XBe,KBe,ZBe,QBe,JBe,e$e,t$e,r$e,i$e,n$e,a$e,s$e,o$e,l$e,c$e,h$e,u$e,d$e,p$e,g$e,f$e,m$e,y$e,v$e,b$e,x$e,T$e,k$e,w$e,C$e=r(()=>{XPe=j(Tk(),1),KPe=j(Ir(),1),yBe=j(GPe(),1),vBe=j(VPe(),1),bBe=j(YPe(),1),e(),Uu(),zC(),Wu(),KPe.default.extend(yBe.default),KPe.default.extend(vBe.default),KPe.default.extend(bBe.default),ZPe={friday:5,saturday:6},tBe=JPe=QPe="",rBe=[],iBe=[],nBe=new Map,aBe=[],sBe=[],cBe=["active","done","crit","milestone","vert"],uBe=lBe=oBe="",pBe=dBe=!(hBe=[]),gBe="sunday",fBe="saturday",mBe=0,yBe=mt(function(){aBe=[],sBe=[],hBe=[],r$e=[],eBe=t$e=e$e=void(KBe=0),tBe=lBe=JPe=QPe=oBe="",rBe=[],pBe=dBe=!(iBe=[]),mBe=0,nBe=new Map,uBe="",Ph(),gBe="sunday",fBe="saturday"},"clear"),vBe=mt(function(e){uBe=e},"setDiagramId"),bBe=mt(function(e){JPe=e},"setAxisFormat"),xBe=mt(function(){return JPe},"getAxisFormat"),TBe=mt(function(e){eBe=e},"setTickInterval"),kBe=mt(function(){return eBe},"getTickInterval"),wBe=mt(function(e){tBe=e},"setTodayMarker"),CBe=mt(function(){return tBe},"getTodayMarker"),SBe=mt(function(e){QPe=e},"setDateFormat"),EBe=mt(function(){dBe=!0},"enableInclusiveEndDates"),_Be=mt(function(){return dBe},"endDatesAreInclusive"),ABe=mt(function(){pBe=!0},"enableTopAxis"),RBe=mt(function(){return pBe},"topAxisEnabled"),LBe=mt(function(e){lBe=e},"setDisplayMode"),IBe=mt(function(){return lBe},"getDisplayMode"),NBe=mt(function(){return QPe},"getDateFormat"),DBe=mt(function(e){rBe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),MBe=mt(function(){return rBe},"getIncludes"),OBe=mt(function(e){iBe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),PBe=mt(function(){return iBe},"getExcludes"),BBe=mt(function(){return nBe},"getLinks"),$Be=mt(function(e){oBe=e,aBe.push(e)},"addSection"),FBe=mt(function(){return aBe},"getSections"),zBe=mt(function(){let e=o$e(),t=0;for(;!e&&t<10;)e=o$e(),t++;return sBe=r$e},"getTasks"),qBe=mt(function(e,t,r,i){var t=e.format(t.trim()),n=e.format("YYYY-MM-DD");return!i.includes(t)&&!i.includes(n)&&(!((!r.includes("weekends")||e.isoWeekday()!==ZPe[fBe]&&e.isoWeekday()!==ZPe[fBe]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(t)||r.includes(n))},"isInvalidDate"),jBe=mt(function(e){gBe=e},"setWeekday"),WBe=mt(function(){return gBe},"getWeekday"),UBe=mt(function(e){fBe=e},"setWeekend"),GBe=mt(function(t,r,i,n){if(i.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,KPe.default)(t.startTime):(0,KPe.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,KPe.default)(t.endTime):(0,KPe.default)(t.endTime,r,!0),[r,i]=VBe(e,a,r,i,n);t.endTime=r.toDate(),t.renderEndTime=i}},"checkTaskDates"),VBe=mt(function(e,t,r,i,n){let a=!1,s=null,o=t.add(1e4,"d");for(;e<=t;){if(a||(s=t.toDate()),(a=qBe(e,r,i,n))&&o<(t=t.add(1,"d")))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,"d")}return[t,s]},"fixTaskDates"),YBe=mt(function(e,t,r){if(r=r.trim(),mt(e=>"x"===(e=e.trim())||"X"===e,"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));var i=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var n of i.groups.ids.split(" "))void 0!==(n=a$e(n))&&(!e||n.endTime>e.endTime)&&(e=n);return e?e.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,KPe.default)(r,t.trim(),!0)).isValid())return i.toDate();if(P.debug("Invalid date:"+r),P.debug("With date format:"+t.trim()),void 0===(i=new Date(r))||isNaN(i.getTime())||i.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var a of n.groups.ids.split(" "))void 0!==(a=a$e(a))&&(!e||a.startTime{window.open(r,"_self")}),nBe.set(e,r))}),c$e(e,"clickable")},"setLink"),c$e=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=a$e(e))&&e.classes.push(t)})},"setClass"),h$e=mt(function(e,t,i){if("loose"===B().securityLevel&&void 0!==t){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{PC.runFunc(t,...r)})}},"setClickFun"),u$e=mt(function(t,r){hBe.push(function(){var e=uBe?uBe+"-"+t:t;null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",function(){r()})},function(){var e=uBe?uBe+"-"+t:t;null!==(e=document.querySelector(`[id="${e}-text"]`))&&e.addEventListener("click",function(){r()})})},"pushFun"),d$e=mt(function(e,t,r){e.split(",").forEach(function(e){h$e(e,t,r)}),c$e(e,"clickable")},"setClickEvent"),p$e=mt(function(t){hBe.forEach(function(e){e(t)})},"bindFunctions"),g$e={getConfig:mt(()=>B().gantt,"getConfig"),clear:yBe,setDateFormat:SBe,getDateFormat:NBe,enableInclusiveEndDates:EBe,endDatesAreInclusive:_Be,enableTopAxis:ABe,topAxisEnabled:RBe,setAxisFormat:bBe,getAxisFormat:xBe,setTickInterval:TBe,getTickInterval:kBe,setTodayMarker:wBe,getTodayMarker:CBe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,setDiagramId:vBe,setDisplayMode:LBe,getDisplayMode:IBe,setAccDescription:Fh,getAccDescription:zh,addSection:$Be,getSections:FBe,getTasks:zBe,addTask:n$e,findTaskById:a$e,addTaskOrg:s$e,setIncludes:DBe,getIncludes:MBe,setExcludes:OBe,getExcludes:PBe,setClickEvent:d$e,setLink:l$e,getLinks:BBe,bindFunctions:p$e,parseDuration:HBe,isInvalidDate:qBe,setWeekday:jBe,getWeekday:WBe,setWeekend:UBe},mt(HPe,"getTaskTags")}),S$e=qat((e,t)=>{function r(){var a,s,e,t=/\[([^\]]+)]|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,n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,o={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},l=mt(function(e){return e instanceof p},"c"),c=mt(function(e,t,r){return new p(e,r,t.$l)},"f"),h=mt(function(e){return s.p(e)+"s"},"m"),r=mt(function(e){return e<0},"l"),i=mt(function(e){return r(e)?Math.ceil(e):Math.floor(e)},"$"),u=mt(function(e){return Math.abs(e)},"y"),d=mt(function(e,t){return e?r(e)?{negative:!0,format:""+u(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},"v"),p=(mt(f,"l"),(e=f.prototype).calMilliseconds=function(){var r=this;this.$ms=Object.keys(this.$d).reduce(function(e,t){return e+(r.$d[t]||0)*o[t]},0)},e.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=i(e/31536e6),this.$d.months=i((e%=31536e6)/2628e6),this.$d.days=i((e%=2628e6)/864e5),this.$d.hours=i((e%=864e5)/36e5),this.$d.minutes=i((e%=36e5)/6e4),this.$d.seconds=i((e%=6e4)/1e3),this.$d.milliseconds=e%=1e3},e.toISOString=function(){var e=d(this.$d.years,"Y"),t=d(this.$d.months,"M"),r=+this.$d.days||0,r=(this.$d.weeks&&(r+=7*this.$d.weeks),d(r,"D")),i=d(this.$d.hours,"H"),n=d(this.$d.minutes,"M"),a=this.$d.seconds||0,a=(this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3),d(a,"S")),s=e.negative||t.negative||r.negative||i.negative||n.negative||a.negative,o=i.format||n.format||a.format?"T":"";return"P"==(s=(s?"-":"")+"P"+e.format+t.format+r.format+o+i.format+n.format+a.format)||"-P"==s?"P0D":s},e.toJSON=function(){return this.toISOString()},e.format=function(e){var e=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return e.replace(t,function(e,t){return t||String(r[e])})},e.as=function(e){return this.$ms/o[h(e)]},e.get=function(e){var t=this.$ms;return"milliseconds"===(e=h(e))?t%=1e3:t="weeks"===e?i(t/o[e]):this.$d[e],t||0},e.add=function(e,t,r){return t=t?e*o[h(t)]:(l(e)?e:c(e,this)).$ms,c(this.$ms+t*(r?-1:1),this)},e.subtract=function(e,t){return this.add(e,t,!0)},e.locale=function(e){var t=this.clone();return t.$l=e,t},e.clone=function(){return c(this.$ms,this)},e.humanize=function(e){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},e.valueOf=function(){return this.asMilliseconds()},e.milliseconds=function(){return this.get("milliseconds")},e.asMilliseconds=function(){return this.as("milliseconds")},e.seconds=function(){return this.get("seconds")},e.asSeconds=function(){return this.as("seconds")},e.minutes=function(){return this.get("minutes")},e.asMinutes=function(){return this.as("minutes")},e.hours=function(){return this.get("hours")},e.asHours=function(){return this.as("hours")},e.days=function(){return this.get("days")},e.asDays=function(){return this.as("days")},e.weeks=function(){return this.get("weeks")},e.asWeeks=function(){return this.as("weeks")},e.months=function(){return this.get("months")},e.asMonths=function(){return this.as("months")},e.years=function(){return this.get("years")},e.asYears=function(){return this.as("years")},f),g=mt(function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")},"p");function f(t,e,r){var i=this;return this.$d={},this.$l=r,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e?c(t*o[h(e)],this):("number"==typeof t?(this.$ms=t,this.parseFromMilliseconds()):"object"==typeof t?(Object.keys(t).forEach(function(e){i.$d[h(e)]=t[e]}),this.calMilliseconds()):"string"==typeof t&&(r=t.match(n))&&(e=r.slice(2).map(function(e){return null!=e?Number(e):0}),this.$d.years=e[0],this.$d.months=e[1],this.$d.weeks=e[2],this.$d.days=e[3],this.$d.hours=e[4],this.$d.minutes=e[5],this.$d.seconds=e[6],this.calMilliseconds()),this)}return function(e,t,i){s=(a=i)().$utils(),i.duration=function(e,t){var r=i.locale();return c(e,{$l:r},t)},i.isDuration=l;var r=t.prototype.add,n=t.prototype.subtract;t.prototype.add=function(e,t){return l(e)?g(this,e,1):r.bind(this)(e,t)},t.prototype.subtract=function(e,t){return l(e)?g(this,e,-1):n.bind(this)(e,t)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()}),E$e=r(()=>{f$e=j(Ir(),1),m$e=j(S$e(),1),e(),bk(),th(),Uu(),Ch(),f$e.default.extend(m$e.default),m$e=mt(function(){P.debug("Something is calling, setConf, remove the call")},"setConf"),y$e={monday:Ix,tuesday:Nx,wednesday:Dx,thursday:Mx,friday:Ox,saturday:Px,sunday:Lx},v$e=mt((e,t)=>{let r=[...e].map(()=>-1/0),i=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),n=0;for(var a of i)for(let e=0;e=r[e]){r[e]=a.endTime,a.order=e+t,e>n&&(n=e);break}return n},"getMaxIntersections"),x$e=mt(function(e,d,t,g){let f=B().gantt,r=(g.db.setDiagramId(d),B().securityLevel),i,n=("sandbox"===r&&(i=Q("#i"+d)),Q("sandbox"===r?i.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?i.nodes()[0].contentDocument:document,a=s.getElementById(d),l=(void 0===(b$e=a.parentElement.offsetWidth)&&(b$e=1200),void 0!==f.useWidth&&(b$e=f.useWidth),g.db.getTasks()),u=[];for(var o of l)u.push(o.type);u=R(u);let c={},h=2*f.topPadding;if("compact"===g.db.getDisplayMode()||"compact"===f.displayMode){var p,m,y={};for(p of l)void 0===y[p.section]?y[p.section]=[p]:y[p.section].push(p);let e=0;for(m of Object.keys(y)){var v=v$e(y[m],e)+1;e+=v,h+=v*(f.barHeight+f.barGap),c[m]=v}}else{h+=l.length*(f.barHeight+f.barGap);for(let t of u)c[t]=l.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+b$e+" "+h);let b=n.select(`[id="${d}"]`),x=MT().domain([xd(l,function(e){return e.startTime}),vd(l,function(e){return e.endTime})]).rangeRound([0,b$e-f.leftPadding-f.rightPadding]);function T(e,t){let r=e.startTime,i=t.startTime,n=0;return ie.vert===t.vert?0:e.vert?1:-1);var a=[...new Set(e.map(e=>e.order))].map(t=>e.find(e=>e.order===t));b.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(e,t){return e.order*r+i-2}).attr("width",function(){return h-f.rightPadding/2}).attr("height",r).attr("class",function(e){for(var[t,r]of u.entries())if(e.type===r)return"section section"+t%f.numberSectionStyles;return"section section0"}).enter();let s=b.append("g").selectAll("rect").data(e).enter(),o=g.db.getLinks();if(s.append("rect").attr("id",function(e){return d+"-"+e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?x(e.startTime)+n+.5*(x(e.endTime)-x(e.startTime))-.5*c:x(e.startTime)+n}).attr("y",function(e,t){return t=e.order,e.vert?f.gridLineStartPadding:t*r+i}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:x(e.renderEndTime||e.endTime)-x(e.startTime)}).attr("height",function(e){return e.vert?l.length*(f.barHeight+f.barGap)+2*f.barHeight:c}).attr("transform-origin",function(e,t){return t=e.order,(x(e.startTime)+n+.5*(x(e.endTime)-x(e.startTime))).toString()+"px "+(t*r+i+.5*c).toString()+"px"}).attr("class",function(e){let t="",r=(0r-t?r+e+1.5*f.leftPadding>h?t+n-5:r+n+5:(r-t)/2+t+n}).attr("y",function(e,t){return e.vert?f.gridLineStartPadding+l.length*(f.barHeight+f.barGap)+60:e.order*r+f.barHeight/2+(f.fontSize/2-2)+i}).attr("text-height",c).attr("class",function(e){let t=x(e.startTime),r=x(e.endTime),i=(e.milestone&&(r=t+c),this.getBBox().width),n="",a=(0r-t?r+i+1.5*f.leftPadding>h?n+" taskTextOutsideLeft taskTextOutside"+a+" "+l:n+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+i:n+" taskText taskText"+a+" "+l+" width-"+i}),"sandbox"===B().securityLevel){let a=Q("#i"+d).nodes()[0].contentDocument;s.filter(function(e){return o.has(e.id)}).each(function(e){var t=a.querySelector("#"+CSS.escape(d+"-"+e.id)),r=a.querySelector("#"+CSS.escape(d+"-"+e.id+"-text")),i=t.parentNode,n=a.createElement("a");n.setAttribute("xlink:href",o.get(e.id)),n.setAttribute("target","_top"),i.appendChild(n),n.appendChild(t),n.appendChild(r)})}}function C(s,o,l,e,c,t,h,u){if(0!==h.length||0!==u.length){let n,a;for(var{startTime:r,endTime:i}of t)(void 0===n||ra)&&(a=i);if(n&&a)if(5<(0,f$e.default)(a).diff((0,f$e.default)(n),"year"))P.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");else{let e=g.db.getDateFormat(),t=[],r=null,i=(0,f$e.default)(n);for(;i.valueOf()<=a;)g.db.isInvalidDate(i,e,h,u)?r?r.end=i:r={start:i,end:i}:r&&(t.push(r),r=null),i=i.add(1,"d");b.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",e=>d+"-exclude-"+e.start.format("YYYY-MM-DD")).attr("x",e=>x(e.start.startOf("day"))+l).attr("y",f.gridLineStartPadding).attr("width",e=>x(e.end.endOf("day"))-x(e.start.startOf("day"))).attr("height",c-o-f.gridLineStartPadding).attr("transform-origin",function(e,t){return(x(e.start)+l+.5*(x(e.end)-x(e.start))).toString()+"px "+(t*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function S(e,t,r,i){return r<=0||t[e,c[e]]);b.append("g").selectAll("text").data(a).enter().append(function(e){var t,r,i=-((e=e[0].split(I.lineBreakRegex)).length-1)/2,n=s.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",i+"em");for([t,r]of e.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{k$e=mt(e=>` .mermaid-main-font { font-family: ${e.fontFamily}; } .exclude-range { fill: ${e.excludeBkgColor}; } .section { stroke: none; opacity: 0.2; } .section0 { fill: ${e.sectionBkgColor}; } .section2 { fill: ${e.sectionBkgColor2}; } .section1, .section3 { fill: ${e.altSectionBkgColor}; opacity: 0.2; } .sectionTitle0 { fill: ${e.titleColor}; } .sectionTitle1 { fill: ${e.titleColor}; } .sectionTitle2 { fill: ${e.titleColor}; } .sectionTitle3 { fill: ${e.titleColor}; } .sectionTitle { text-anchor: start; font-family: ${e.fontFamily}; } /* Grid and axis */ .grid .tick { stroke: ${e.gridColor}; opacity: 0.8; shape-rendering: crispEdges; } .grid .tick text { font-family: ${e.fontFamily}; fill: ${e.textColor}; } .grid path { stroke-width: 0; } /* Today line */ .today { fill: none; stroke: ${e.todayLineColor}; stroke-width: 2px; } /* Task styling */ /* Default task */ .task { stroke-width: 2; } .taskText { text-anchor: middle; font-family: ${e.fontFamily}; } .taskTextOutsideRight { fill: ${e.taskTextDarkColor}; text-anchor: start; font-family: ${e.fontFamily}; } .taskTextOutsideLeft { fill: ${e.taskTextDarkColor}; text-anchor: end; } /* Special case clickable */ .task.clickable { cursor: pointer; } .taskText.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideLeft.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideRight.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } /* Specific task settings for the sections*/ .taskText0, .taskText1, .taskText2, .taskText3 { fill: ${e.taskTextColor}; } .task0, .task1, .task2, .task3 { fill: ${e.taskBkgColor}; stroke: ${e.taskBorderColor}; } .taskTextOutside0, .taskTextOutside2 { fill: ${e.taskTextOutsideColor}; } .taskTextOutside1, .taskTextOutside3 { fill: ${e.taskTextOutsideColor}; } /* Active task */ .active0, .active1, .active2, .active3 { fill: ${e.activeTaskBkgColor}; stroke: ${e.activeTaskBorderColor}; } .activeText0, .activeText1, .activeText2, .activeText3 { fill: ${e.taskTextDarkColor} !important; } /* Completed task */ .done0, .done1, .done2, .done3 { stroke: ${e.doneTaskBorderColor}; fill: ${e.doneTaskBkgColor}; stroke-width: 2; } .doneText0, .doneText1, .doneText2, .doneText3 { fill: ${e.taskTextDarkColor} !important; } /* Done task text displayed outside the bar sits against the diagram background, not against the done-task bar, so it must use the outside/contrast color. */ .doneText0.taskTextOutsideLeft, .doneText0.taskTextOutsideRight, .doneText1.taskTextOutsideLeft, .doneText1.taskTextOutsideRight, .doneText2.taskTextOutsideLeft, .doneText2.taskTextOutsideRight, .doneText3.taskTextOutsideLeft, .doneText3.taskTextOutsideRight { fill: ${e.taskTextOutsideColor} !important; } /* Tasks on the critical line */ .crit0, .crit1, .crit2, .crit3 { stroke: ${e.critBorderColor}; fill: ${e.critBkgColor}; stroke-width: 2; } .activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: ${e.critBorderColor}; fill: ${e.activeTaskBkgColor}; stroke-width: 2; } .doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: ${e.critBorderColor}; fill: ${e.doneTaskBkgColor}; stroke-width: 2; cursor: pointer; shape-rendering: crispEdges; } .milestone { transform: rotate(45deg) scale(0.8,0.8); } .milestoneText { font-style: italic; } .doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: ${e.taskTextDarkColor} !important; } /* Done-crit task text outside the bar — same reasoning as doneText above. */ .doneCritText0.taskTextOutsideLeft, .doneCritText0.taskTextOutsideRight, .doneCritText1.taskTextOutsideLeft, .doneCritText1.taskTextOutsideRight, .doneCritText2.taskTextOutsideLeft, .doneCritText2.taskTextOutsideRight, .doneCritText3.taskTextOutsideLeft, .doneCritText3.taskTextOutsideRight { fill: ${e.taskTextOutsideColor} !important; } .vert { stroke: ${e.vertLineColor}; } .vertText { font-size: 15px; text-anchor: middle; fill: ${e.vertLineColor} !important; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: ${e.taskTextDarkColor} !important; } .titleText { text-anchor: middle; font-size: 18px; fill: ${e.titleColor||e.textColor}; font-family: ${e.fontFamily}; } `,"getStyles"),w$e=k$e}),A$e={};Vat(A$e,{diagram:()=>R$e});var R$e,L$e,I$e,N$e,D$e,M$e,O$e,P$e,B$e=r(()=>{UPe(),C$e(),E$e(),_$e(),R$e={parser:jPe,db:g$e,renderer:T$e,styles:w$e}}),$$e=r(()=>{sOe(),e(),L$e={parse:mt(async e=>{e=await rOe("info",e),P.debug(e)},"parse")}}),F$e=r(()=>{I$e={version:"11.15.0"},N$e=mt(()=>I$e.version,"getVersion"),D$e={getVersion:N$e}}),z$e=r(()=>{bk(),Uu(),M$e=mt(e=>{let t=B().securityLevel,r=Q("body"),i;return"sandbox"===t&&(i=Q("#i"+e).node()?.contentDocument??document,r=Q(i.body)),r.select("#"+e)},"selectSvgElement")}),q$e=r(()=>{e(),z$e(),Ch(),O$e=mt((e,t,r)=>{P.debug(`rendering info diagram `+e),e=M$e(t),yh(e,100,400,!0),e.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"),P$e={draw:O$e}}),j$e={};Vat(j$e,{diagram:()=>W$e});var W$e,U$e,G$e,V$e,Y$e,H$e,X$e,K$e,Z$e,Q$e,J$e,eFe,tFe,rFe,iFe,nFe,aFe,sFe,oFe,lFe=r(()=>{$$e(),F$e(),q$e(),W$e={parser:L$e,db:D$e,renderer:P$e}}),cFe=r(()=>{e(),Wu(),Ti(),H$e=ir.pie,U$e={sections:new Map,showData:!1,config:H$e},G$e=U$e.sections,V$e=U$e.showData,Y$e=structuredClone(H$e),H$e=mt(()=>structuredClone(Y$e),"getConfig"),X$e=mt(()=>{G$e=new Map,V$e=U$e.showData,Ph()},"clear"),K$e=mt(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);G$e.has(e)||(G$e.set(e,t),P.debug(`added new section: ${e}, with value: `+t))},"addSection"),Z$e=mt(()=>G$e,"getSections"),Q$e=mt(e=>{V$e=e},"setShowData"),J$e=mt(()=>V$e,"getShowData"),eFe={getConfig:H$e,clear:X$e,setDiagramTitle:qh,getDiagramTitle:jh,setAccTitle:Bh,getAccTitle:$h,setAccDescription:Fh,getAccDescription:zh,addSection:K$e,getSections:Z$e,setShowData:Q$e,getShowData:J$e}}),hFe=r(()=>{sOe(),e(),hOe(),cFe(),tFe=mt((e,t)=>{oOe(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),rFe={parse:mt(async e=>{e=await rOe("pie",e),P.debug(e),tFe(e,eFe)},"parse")}}),uFe=r(()=>{iFe=mt(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; stroke-width : ${e.pieStrokeWidth}; opacity : ${e.pieOpacity}; } .pieOuterCircle{ stroke: ${e.pieOuterStrokeColor}; stroke-width: ${e.pieOuterStrokeWidth}; fill: none; } .pieTitleText { text-anchor: middle; font-size: ${e.pieTitleTextSize}; fill: ${e.pieTitleTextColor}; font-family: ${e.fontFamily}; } .slice { font-family: ${e.fontFamily}; fill: ${e.pieSectionTextColor}; font-size:${e.pieSectionTextSize}; // fill: white; } .legend text { fill: ${e.pieLegendTextColor}; font-family: ${e.fontFamily}; font-size: ${e.pieLegendTextSize}; } `,"getStyles"),nFe=iFe}),dFe=r(()=>{bk(),Uu(),e(),z$e(),Ch(),zC(),aFe=mt(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),r=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>1<=e.value/t*100);return R5().value(e=>e.value).sort(null)(r)},"createPieArcs"),sFe=mt((e,t,r,i)=>{P.debug(`rendering pie chart `+e);let n=i.db,a=B(),s=lC(n.getConfig(),a.pie),o=M$e(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[i]=OC(e.pieOuterStrokeWidth);i??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=p5().innerRadius(0).outerRadius(h),d=p5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+i/2).attr("class","pieOuterCircle"),n.getSections()),g=aFe(p),f=[e.pie1,e.pie2,e.pie3,e.pie4,e.pie5,e.pie6,e.pie7,e.pie8,e.pie9,e.pie10,e.pie11,e.pie12],m=0,y=(p.forEach(e=>{m+=e}),g.filter(e=>"0"!==(e.data.value/m*100).toFixed(0))),v=$b(f).domain([...p.keys()]),b=(l.selectAll("mySlices").data(y).enter().append("path").attr("d",u).attr("fill",e=>v(e.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(y).enter().append("text").text(e=>(e.data.value/m*100).toFixed(0)+"%").attr("transform",e=>"translate("+d.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText")),x=[...p.entries()].map(([e,t])=>({label:e,value:t})),T=l.selectAll(".legend").data(x).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*x.length/2)+")");T.append("rect").attr("width",18).attr("height",18).style("fill",e=>v(e.label)).style("stroke",e=>v(e.label)),T.append("text").attr("x",22).attr("y",14).text(e=>n.getShowData()?e.label+` [${e.value}]`:e.label),t=512+Math.max(...T.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),e=225+(i=b.node()?.getBoundingClientRect().width??0)/2,i=Math.min(0,225-i/2),t=Math.max(t,e)-i,o.attr("viewBox",i+` 0 ${t} 450`),yh(o,450,t,s.useMaxWidth)},"draw"),oFe={draw:sFe}}),pFe={};Vat(pFe,{diagram:()=>gFe});var gFe,fFe,mFe,yFe,vFe,bFe=r(()=>{hFe(),cFe(),uFe(),dFe(),gFe={parser:rFe,db:eFe,renderer:oFe,styles:nFe}}),xFe=r(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],a=[1,7],B=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],s=[55,56,57],F=[2,36],o=[1,37],l=[1,36],c=[1,38],h=[1,35],u=[1,43],d=[1,41],p=[1,45],z=[1,14],q=[1,23],j=[1,18],W=[1,19],U=[1,20],G=[1,21],V=[1,22],Y=[1,24],H=[1,25],X=[1,26],K=[1,27],Z=[1,28],Q=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],b=[1,42],x=[1,44],T=[1,63],k=[1,62],w=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],J=[1,66],ee=[1,67],te=[1,68],re=[1,69],ie=[1,70],ne=[1,71],ae=[1,72],se=[1,73],oe=[1,74],le=[1,75],ce=[1,76],he=[1,77],C=[4,5,6,7,8,9,10,11,12,13,14,15,18],S=[1,91],E=[1,92],_=[1,93],A=[1,100],R=[1,94],L=[1,97],I=[1,95],N=[1,96],D=[1,98],M=[1,99],ue=[1,103],de=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),i.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 46:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:i.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:i.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:i.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:i.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:i.setXAxisLeftText(a[o-2]),i.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",i.setXAxisLeftText(a[o-1]);break;case 53:i.setXAxisLeftText(a[o]);break;case 54:i.setYAxisBottomText(a[o-2]),i.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",i.setYAxisBottomText(a[o-1]);break;case 56:i.setYAxisBottomText(a[o]);break;case 57:i.setQuadrant1Text(a[o]);break;case 58:i.setQuadrant2Text(a[o]);break;case 59:i.setQuadrant3Text(a[o]);break;case 60:i.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:i,56:n,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:n,57:a},{18:t,26:9,27:2,28:r,55:i,56:n,57:a},e(B,[2,33],{29:10}),e($,[2,61]),e($,[2,62]),e($,[2,63]),{1:[2,30]},{1:[2,31]},e(s,F,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:o,5:l,10:c,12:h,13:u,14:d,15:p,18:z,25:q,35:j,37:W,39:U,41:G,42:V,48:Y,50:H,51:X,52:K,53:Z,54:Q,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),e(B,[2,34]),{27:46,55:i,56:n,57:a},e(s,[2,37]),e(s,F,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:o,5:l,10:c,12:h,13:u,14:d,15:p,18:z,25:q,35:j,37:W,39:U,41:G,42:V,48:Y,50:H,51:X,52:K,53:Z,54:Q,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),e(s,[2,39]),e(s,[2,40]),e(s,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(s,[2,45]),e(s,[2,46]),{18:[1,51]},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,10:c,12:h,13:u,14:d,15:p,43:57,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,44:[1,58],47:[1,59],58:61,59:60,63:m,64:y,65:v,66:b,67:x},e(w,[2,64]),e(w,[2,66]),e(w,[2,67]),e(w,[2,70]),e(w,[2,71]),e(w,[2,72]),e(w,[2,73]),e(w,[2,74]),e(w,[2,75]),e(w,[2,76]),e(w,[2,77]),e(w,[2,78]),e(w,[2,79]),e(w,[2,80]),e(w,[2,81]),e(B,[2,35]),e(s,[2,38]),e(s,[2,42]),e(s,[2,43]),e(s,[2,44]),{3:65,4:J,5:ee,6:te,7:re,8:ie,9:ne,10:ae,11:se,12:oe,13:le,14:ce,15:he,21:64},e(s,[2,53],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,49:[1,78],63:m,64:y,65:v,66:b,67:x}),e(s,[2,56],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,49:[1,79],63:m,64:y,65:v,66:b,67:x}),e(s,[2,57],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,58],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,59],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,60],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),{45:[1,80]},{44:[1,81]},e(w,[2,65]),e(w,[2,82]),e(w,[2,83]),e(w,[2,84]),{3:83,4:J,5:ee,6:te,7:re,8:ie,9:ne,10:ae,11:se,12:oe,13:le,14:ce,15:he,18:[1,82]},e(C,[2,23]),e(C,[2,1]),e(C,[2,2]),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,6]),e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,10]),e(C,[2,11]),e(C,[2,12]),e(s,[2,52],{58:31,43:84,4:o,5:l,10:c,12:h,13:u,14:d,15:p,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),e(s,[2,55],{58:31,43:85,4:o,5:l,10:c,12:h,13:u,14:d,15:p,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),{46:[1,86]},{45:[1,87]},{4:S,5:E,6:_,8:A,11:R,13:L,16:90,17:I,18:N,19:D,20:M,22:89,23:88},e(C,[2,24]),e(s,[2,51],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,54],{59:60,58:61,4:o,5:l,8:T,10:c,12:h,13:u,14:d,15:p,18:k,63:m,64:y,65:v,66:b,67:x}),e(s,[2,47],{22:89,16:90,23:101,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M}),{46:[1,102]},e(s,[2,29],{10:ue}),e(de,[2,27],{16:104,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(s,[2,49],{10:ue}),e(s,[2,48],{22:89,16:90,23:105,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M}),{4:S,5:E,6:_,8:A,11:R,13:L,16:90,17:I,18:N,19:D,20:M,22:106},e(O,[2,26]),e(s,[2,50],{10:ue}),e(de,[2,28],{16:104,4:S,5:E,6:_,8:A,11:R,13:L,17:I,18:N,19:D,20:M})],defaultActions:{8:[2,30],9:[2,31]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0 *)/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,/^(?:[^\x00-\x7F]+)/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,52],inclusive:!0}}};t.lexer=r,mt(P,"Parser"),(fFe=new((P.prototype=t).Parser=P)).parser=fFe,mFe=fFe}),TFe=r(()=>{bk(),Ti(),e(),hi(),yFe=Ot(),vFe=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{mt(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:ir.quadrantChart?.chartWidth||500,chartWidth:ir.quadrantChart?.chartHeight||500,titlePadding:ir.quadrantChart?.titlePadding||10,titleFontSize:ir.quadrantChart?.titleFontSize||20,quadrantPadding:ir.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:ir.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:ir.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:ir.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:ir.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:ir.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:ir.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:ir.quadrantChart?.pointTextPadding||5,pointLabelFontSize:ir.quadrantChart?.pointLabelFontSize||12,pointRadius:ir.quadrantChart?.pointRadius||5,xAxisPosition:ir.quadrantChart?.xAxisPosition||"top",yAxisPosition:ir.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:ir.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:ir.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:yFe.quadrant1Fill,quadrant2Fill:yFe.quadrant2Fill,quadrant3Fill:yFe.quadrant3Fill,quadrant4Fill:yFe.quadrant4Fill,quadrant1TextFill:yFe.quadrant1TextFill,quadrant2TextFill:yFe.quadrant2TextFill,quadrant3TextFill:yFe.quadrant3TextFill,quadrant4TextFill:yFe.quadrant4TextFill,quadrantPointFill:yFe.quadrantPointFill,quadrantPointTextFill:yFe.quadrantPointTextFill,quadrantXAxisTextFill:yFe.quadrantXAxisTextFill,quadrantYAxisTextFill:yFe.quadrantYAxisTextFill,quadrantTitleFill:yFe.quadrantTitleFill,quadrantInternalBorderStrokeFill:yFe.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:yFe.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,P.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){P.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){P.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,i){var n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,e={top:"top"===e&&t?n:0,bottom:"bottom"===e&&t?n:0},t=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,n={left:"left"===this.config.yAxisPosition&&r?t:0,right:"right"===this.config.yAxisPosition&&r?t:0},r=this.config.titleFontSize+2*this.config.titlePadding,t={top:i?r:0},i=this.config.quadrantPadding+n.left,r=this.config.quadrantPadding+e.top+t.top,a=this.config.chartWidth-2*this.config.quadrantPadding-n.left-n.right,s=this.config.chartHeight-2*this.config.quadrantPadding-e.top-e.bottom-t.top;return{xAxisSpace:e,yAxisSpace:n,titleSpace:t,quadrantSpace:{quadrantLeft:i,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(e,t,r,i){var{quadrantSpace:i,titleSpace:n}=i,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=i,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&t&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+a-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+i-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(e){var t,{quadrantHalfHeight:e,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:n}=e=e.quadrantSpace;for(t of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:n,width:i,height:e,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:r,y:n,width:i,height:e,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:r,y:n+e,width:i,height:e,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:r+i,y:n+e,width:i,height:e,fill:this.themeConfig.quadrant4Fill}])t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(e){let t=e.quadrantSpace,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=t,s=sx().domain([0,1]).range([i,a+i]),o=sx().domain([0,1]).range([r+n,n]);return this.data.points.map(e=>{var t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:o(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:o(e.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??"0px"}})}getBorders(e){var t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:e,quadrantHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a,quadrantWidth:s}=e=e.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-t,y1:a,x2:i+s+t,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i+s,y1:a+t,x2:i+s,y2:a+r-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-t,y1:a+r,x2:i+s+t,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i,y1:a+t,x2:i,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+n,y1:a+t,x2:i+n,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+t,y1:a+e,x2:i+s-t,y2:a+e}]}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(){var e=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),t=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,i=0{SFe=class extends Error{static{mt(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},mt(kFe,"validateHexCode"),mt(wFe,"validateNumber"),mt(CFe,"validateSizeInPixels")});function _Fe(e){return Rc(e.trim(),jFe)}function AFe(e){WFe.setData({quadrant1Text:_Fe(e.text)})}function RFe(e){WFe.setData({quadrant2Text:_Fe(e.text)})}function LFe(e){WFe.setData({quadrant3Text:_Fe(e.text)})}function IFe(e){WFe.setData({quadrant4Text:_Fe(e.text)})}function NFe(e){WFe.setData({xAxisLeftText:_Fe(e.text)})}function DFe(e){WFe.setData({xAxisRightText:_Fe(e.text)})}function MFe(e){WFe.setData({yAxisTopText:_Fe(e.text)})}function OFe(e){WFe.setData({yAxisBottomText:_Fe(e.text)})}function PFe(e){var t,r={};for(t of e){var[i,n]=t.trim().split(/\s*:\s*/);if("radius"===i){if(wFe(n))throw new SFe(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(kFe(n))throw new SFe(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(kFe(n))throw new SFe(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(CFe(n))throw new SFe(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function BFe(e,t,r,i,n){n=PFe(n),WFe.addPoints([{x:r,y:i,text:_Fe(e.text),className:t,...n}])}function $Fe(e,t){WFe.addClass(e,PFe(t))}function FFe(e){WFe.setConfig({chartWidth:e})}function zFe(e){WFe.setConfig({chartHeight:e})}function qFe(){var{themeVariables:e,quadrantChart:t}=B();return t&&WFe.setConfig(t),WFe.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}),WFe.setData({titleText:jh()}),WFe.build()}var jFe,WFe,UFe,GFe,VFe,YFe,HFe=r(()=>{Uu(),th(),Wu(),TFe(),EFe(),jFe=B(),mt(_Fe,"textSanitizer"),WFe=new vFe,mt(AFe,"setQuadrant1Text"),mt(RFe,"setQuadrant2Text"),mt(LFe,"setQuadrant3Text"),mt(IFe,"setQuadrant4Text"),mt(NFe,"setXAxisLeftText"),mt(DFe,"setXAxisRightText"),mt(MFe,"setYAxisTopText"),mt(OFe,"setYAxisBottomText"),mt(PFe,"parseStyles"),mt(BFe,"addPoint"),mt($Fe,"addClass"),mt(FFe,"setWidth"),mt(zFe,"setHeight"),mt(qFe,"getQuadrantData"),UFe=mt(function(){WFe.clear(),Ph()},"clear"),GFe={setWidth:FFe,setHeight:zFe,setQuadrant1Text:AFe,setQuadrant2Text:RFe,setQuadrant3Text:LFe,setQuadrant4Text:IFe,setXAxisLeftText:NFe,setXAxisRightText:DFe,setYAxisTopText:MFe,setYAxisBottomText:OFe,parseStyles:PFe,addPoint:BFe,addClass:$Fe,getQuadrantData:qFe,clear:UFe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh}}),XFe=r(()=>{bk(),Uu(),e(),Ch(),VFe=mt((e,t,r,i)=>{function n(e){return"top"===e?"hanging":"middle"}function a(e){return"left"===e?"start":"middle"}function s(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(n,"getDominantBaseLine"),mt(a,"getTextAnchor"),mt(s,"getTransformation");var o=B();P.debug(`Rendering quadrant chart `+e);let l=o.securityLevel,c;"sandbox"===l&&(c=Q("#i"+t));var t=(e=Q("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(yh(e,u,h,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+h+" "+u),i.db.setHeight(u),i.db.setWidth(h),i.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),h=t.append("g").attr("class","data-points"),i=t.append("g").attr("class","labels"),t=t.append("g").attr("class","title");o.title&&t.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",n(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",e=>e.x1).attr("y1",e=>e.y1).attr("x2",e=>e.x2).attr("y2",e=>e.y2).style("stroke",e=>e.strokeFill).style("stroke-width",e=>e.strokeWidth),(t=e.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",e=>e.x).attr("y",e=>e.y).attr("width",e=>e.width).attr("height",e=>e.height).attr("fill",e=>e.fill),t.append("text").attr("x",0).attr("y",0).attr("fill",e=>e.text.fill).attr("font-size",e=>e.text.fontSize).attr("dominant-baseline",e=>n(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text)).text(e=>e.text.text),i.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(e=>e.text).attr("fill",e=>e.fill).attr("font-size",e=>e.fontSize).attr("dominant-baseline",e=>n(e.horizontalPos)).attr("text-anchor",e=>a(e.verticalPos)).attr("transform",e=>s(e)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",e=>e.x).attr("cy",e=>e.y).attr("r",e=>e.radius).attr("fill",e=>e.fill).attr("stroke",e=>e.strokeColor).attr("stroke-width",e=>e.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(e=>e.text.text).attr("fill",e=>e.text.fill).attr("font-size",e=>e.text.fontSize).attr("dominant-baseline",e=>n(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text))},"draw"),YFe={draw:VFe}}),KFe={};Vat(KFe,{diagram:()=>ZFe});var ZFe,QFe,JFe,eze=r(()=>{xFe(),HFe(),XFe(),ZFe={parser:mFe,db:GFe,renderer:YFe,styles:mt(()=>"","styles")}}),tze=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,10,12,14,16,18,19,21,23],i=[2,6],n=[1,3],a=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],b=[1,36],x=[1,37],T=[1,43],k=[1,42],w=[1,47],C=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],E=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],i={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 5:i.setOrientation(a[o]);break;case 9:i.setDiagramTitle(a[o].text.trim());break;case 12:i.setLineData({text:"",type:"text"},a[o]);break;case 13:i.setLineData(a[o-1],a[o]);break;case 14:i.setBarData({text:"",type:"text"},a[o]);break;case 15:i.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:i.setXAxisTitle(a[o]);break;case 23:i.setXAxisTitle(a[o-1]);break;case 24:i.setXAxisTitle({type:"text",text:""});break;case 25:i.setXAxisBand(a[o]);break;case 26:i.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:i.setYAxisTitle(a[o]);break;case 31:i.setYAxisTitle(a[o-1]);break;case 32:i.setYAxisTitle({type:"text",text:""});break;case 33:i.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[t(r,i,{3:1,4:2,7:4,5:n,34:a,35:s,36:o}),{1:[3]},t(r,i,{4:2,7:4,3:8,5:n,34:a,35:s,36:o}),t(r,i,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(r,i,{4:2,7:4,3:21,5:n,34:a,35:s,36:o}),{1:[2,3]},t(l,[2,5]),t(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:39,13:38,24:T,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:45,15:44,27:w,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:49,17:48,24:C,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:52,17:51,24:C,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{20:[1,53]},{22:[1,54]},t(S,[2,18]),{1:[2,2]},t(S,[2,8]),t(S,[2,9]),t(E,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x}),t(E,[2,38]),t(E,[2,39]),t(_,[2,40]),t(_,[2,42]),t(_,[2,43]),t(_,[2,44]),t(_,[2,45]),t(_,[2,46]),t(_,[2,47]),t(_,[2,48]),t(_,[2,49]),t(_,[2,50]),t(_,[2,51]),t(S,[2,10]),t(S,[2,22],{30:41,29:56,24:T,27:k}),t(S,[2,24]),t(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},t(S,[2,11]),t(S,[2,30],{33:60,27:w}),t(S,[2,32]),{31:[1,61]},t(S,[2,12]),{17:62,24:C},{25:63,27:A},t(S,[2,14]),{17:65,24:C},t(S,[2,16]),t(S,[2,17]),t(_,[2,41]),t(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(S,[2,31]),{27:[1,69]},t(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(S,[2,15]),t(S,[2,26]),t(S,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},t(S,[2,33]),t(S,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/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,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],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:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(QFe=new((e.prototype=i).Parser=e)).parser=QFe,JFe=QFe});function rze(e){return"bar"===e.type}function ize(e){return"band"===e.type}function nze(e){return"linear"===e.type}var aze,sze,oze,lze,cze=r(()=>{mt(rze,"isBarPlot"),mt(ize,"isBandAxisData"),mt(nze,"isLinearAxisData")}),hze=r(()=>{F7(),aze=class{constructor(e){this.parentGroup=e}static{mt(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};var r,i={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(r of e){var a=(s=D7(n,1,r))?s.width:r.length*t,s=s?s.height:t;i.width=Math.max(i.width,a),i.height=Math.max(i.height,s)}return n.remove(),i}}}),uze=r(()=>{sze=class{constructor(e,t,r,i){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,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{mt(this,"BaseAxis")}setRange(e){this.range=e,"left"===this.axisPosition||"right"===this.axisPosition?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(){var 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()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;var r,i;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*e.width,this.outerPadding=Math.min(r.width/2,i),i=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,i<=t)&&(t-=i,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,i<=t)&&(t-=i,this.showTitle=!0),this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;var r,i;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*e.height,this.outerPadding=Math.min(r.height/2,i),(i=r.width+2*this.axisConfig.labelPadding)<=t)&&(t-=i,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,i<=t)&&(t-=i,this.showTitle=!0),this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return"left"===this.axisPosition||"right"===this.axisPosition?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(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.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(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},`+this.getScaleValue(e),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElementsForBottomAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),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 t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},`+(t+this.axisConfig.tickLength),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElementsForTopAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},`+(t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.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"}]}),r}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}}),dze=r(()=>{bk(),e(),uze(),oze=class extends sze{static{mt(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=qb().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=qb().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),P.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),pze=r(()=>{bk(),uze(),lze=class extends sze{static{mt(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=sx().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=sx().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function gze(e,t,r,i){return i=new aze(i),ize(e)?new oze(t,r,e.categories,e.title,i):new lze(t,r,[e.min,e.max],e.title,i)}var fze=r(()=>{cze(),hze(),dze(),pze(),mt(gze,"getAxis")});function mze(e,t,r,i){return i=new aze(i),new yze(i,e,t,r)}var yze,vze,bze,xze=r(()=>{hze(),yze=class{constructor(e,t,r,i){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{mt(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){var t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=e&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var 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}},mt(mze,"getChartTitleComponent")}),Tze=r(()=>{bk(),vze=class{constructor(e,t,r,i,n){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{mt(this,"LinePlot")}getDrawableElement(){var e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);return(e=("horizontal"===this.orientation?w5().y(e=>e[0]).x(e=>e[1]):w5().x(e=>e[0]).y(e=>e[1]))(e))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),kze=r(()=>{bze=class{constructor(e,t,r,i,n,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=i,this.orientation=n,this.plotIndex=a}static{mt(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=t/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:e.map(e=>({x:this.boundingRect.x,y:e[0]-r,height:t,width:e[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(e=>({x:e[0]-r,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function wze(e,t,r){return new Cze(e,t,r)}var Cze,Sze,Eze,_ze=r(()=>{Tze(),kze(),Cze=class{constructor(e,t,r){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{mt(this,"BasePlot")}setAxes(e,t){this.xAxis=e,this.yAxis=t}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");var e,t,r=[];for([e,t]of this.chartData.plots.entries())switch(t.type){case"line":var i=new vze(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...i.getDrawableElement());break;case"bar":i=new bze(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...i.getDrawableElement())}return r}},mt(wze,"getPlotComponent")}),Aze=r(()=>{fze(),xze(),_ze(),cze(),Sze=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:mze(e,t,r,i),plot:wze(e,t,r),xAxis:gze(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:gze(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{mt(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,i,n=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:n,height:a});e-=s.width,i=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=s.height})).height,t-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),t-=this.componentStore.xAxis.calculateSpace({width:e,height:t}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:e,height:t})).width,0<(e-=s.width)&&(n+=e),0rze(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,i,n,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=o.height})).height,t-=o.height,this.componentStore.xAxis.setAxisPosition("left"),e-=(o=this.componentStore.xAxis.calculateSpace({width:e,height:t})).width,i=o.width,this.componentStore.yAxis.setAxisPosition("top"),t-=(o=this.componentStore.yAxis.calculateSpace({width:e,height:t})).height,n=r+o.height,0rze(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var e,t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}}}),Rze=r(()=>{Aze(),Eze=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,i){return new Sze(e,t,r,i).getDrawableElement()}}});function Lze(){var e=Ot(),t=vr();return lC(e.xyChart,t.themeVariables.xyChart)}function Ize(){var e=vr();return lC(ir.xyChart,e.xyChart)}function Nze(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Dze(e){var t=vr();return Rc(e.trim(),t)}function Mze(e){Zze=e}function Oze(e){Qze.chartOrientation="horizontal"===e?"horizontal":"vertical"}function Pze(e){eqe.xAxis.title=Dze(e.text)}function Bze(e,t){eqe.xAxis={type:"linear",title:eqe.xAxis.title,min:e,max:t},rqe=!0}function $ze(e){eqe.xAxis={type:"band",title:eqe.xAxis.title,categories:e.map(e=>Dze(e.text))},rqe=!0}function Fze(e){eqe.yAxis.title=Dze(e.text)}function zze(e,t){eqe.yAxis={type:"linear",title:eqe.yAxis.title,min:e,max:t},iqe=!0}function qze(e){var t=Math.min(...e),e=Math.max(...e),r=nze(eqe.yAxis)?eqe.yAxis.min:1/0,i=nze(eqe.yAxis)?eqe.yAxis.max:-1/0;eqe.yAxis={type:"linear",title:eqe.yAxis.title,min:Math.min(r,t),max:Math.max(i,e)}}function jze(r){let e=[],t;if(0!==r.length&&(rqe||(i=nze(eqe.xAxis)?eqe.xAxis.min:1/0,t=nze(eqe.xAxis)?eqe.xAxis.max:-1/0,Bze(Math.min(i,1),Math.max(t,r.length))),iqe||qze(r),ize(eqe.xAxis)&&(e=eqe.xAxis.categories.map((e,t)=>[e,r[t]])),nze(eqe.xAxis))){var i=eqe.xAxis.min,n=eqe.xAxis.max,a=(n-i)/(r.length-1),s=[];for(let e=i;e<=n;e+=a)s.push(""+e);e=s.map((e,t)=>[e,r[t]])}return e}function Wze(e){return tqe[0===e?0:e%tqe.length]}function Uze(e,t){t=jze(t),eqe.plots.push({type:"line",strokeFill:Wze(Kze),strokeWidth:2,data:t}),Kze++}function Gze(e,t){t=jze(t),eqe.plots.push({type:"bar",fill:Wze(Kze),data:t}),Kze++}function Vze(){if(0===eqe.plots.length)throw Error("No Plot to render, please provide a plot with some data");return eqe.title=jh(),Eze.build(Qze,eqe,Jze,Zze)}function Yze(){return Jze}function Hze(){return Qze}function Xze(){return eqe}var Kze,Zze,Qze,Jze,eqe,tqe,rqe,iqe,nqe,aqe,sqe,oqe,lqe=r(()=>{wi(),Ti(),hi(),zC(),th(),Wu(),Rze(),cze(),Kze=0,Qze=Ize(),Jze=Lze(),eqe=Nze(),tqe=Jze.plotColorPalette.split(",").map(e=>e.trim()),iqe=rqe=!1,mt(Lze,"getChartDefaultThemeConfig"),mt(Ize,"getChartDefaultConfig"),mt(Nze,"getChartDefaultData"),mt(Dze,"textSanitizer"),mt(Mze,"setTmpSVGG"),mt(Oze,"setOrientation"),mt(Pze,"setXAxisTitle"),mt(Bze,"setXAxisRangeData"),mt($ze,"setXAxisBand"),mt(Fze,"setYAxisTitle"),mt(zze,"setYAxisRangeData"),mt(qze,"setYAxisRangeFromPlotData"),mt(jze,"transformDataWithoutCategory"),mt(Wze,"getPlotColorFromPalette"),mt(Uze,"setLineData"),mt(Gze,"setBarData"),mt(Vze,"getDrawableElem"),mt(Yze,"getChartThemeConfig"),mt(Hze,"getChartConfig"),mt(Xze,"getXYChartData"),nqe=mt(function(){Ph(),Kze=0,Qze=Ize(),eqe=Nze(),Jze=Lze(),tqe=Jze.plotColorPalette.split(",").map(e=>e.trim()),iqe=rqe=!1},"clear"),aqe={getDrawableElem:Vze,clear:nqe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh,setOrientation:Oze,setXAxisTitle:Pze,setXAxisRangeData:Bze,setXAxisBand:$ze,setYAxisTitle:Fze,setYAxisRangeData:zze,setLineData:Uze,setBarData:Gze,setTmpSVGG:Mze,getChartThemeConfig:Yze,getChartConfig:Hze,getXYChartData:Xze}}),cqe=r(()=>{e(),z$e(),Ch(),sqe=mt((e,t,r,i)=>{let n=i.db,a=n.getChartThemeConfig(),s=n.getChartConfig(),o=n.getXYChartData().plots[0].data.map(e=>e[1]);function l(e){return"top"===e?"text-before-edge":"middle"}function c(e){return"left"===e?"start":"right"===e?"end":"middle"}function h(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(l,"getDominantBaseLine"),mt(c,"getTextAnchor"),mt(h,"getTextTransformation"),P.debug(`Rendering xychart chart `+e);let u=M$e(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(yh(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),n.getDrawableElem()),f={};function m(t){let r=d,i="";for(var[n]of t.entries()){let e=d;0e.x).attr("y",e=>e.y).attr("width",e=>e.width).attr("height",e=>e.height).attr("fill",e=>e.fill).attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth),s.showDataLabel){let t=s.showDataLabelOutsideBar;if("horizontal"===s.chartOrientation){let i=function(e,t){var{data:e,label:r}=e;return t*r.length*.7<=e.width-10};i,mt(i,"fitsHorizontally");var b=(T=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0{let t=e.data,r=.7*t.height;for(;!i(e,r)&&0t?e.data.x+e.data.width+10:e.data.x+e.data.width-10,"determineLabelXPosition");v.selectAll("text").data(T).enter().append("text").attr("x",x).attr("y",e=>e.data.y+e.data.height/2).attr("text-anchor",t?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",b+"px").text(e=>e.label)}else{let n=function(e,t,r){var{data:e,label:i}=e,i=t*i.length*.7,n=e.x+e.width/2;return e.x<=n-i/2&&n+i/2<=e.x+e.width&&e.y+r+t<=e.y+e.height};n,mt(n,"fitsInBar");var T,x=(T=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0{let{data:t,label:r}=e,i=t.width/(.7*r.length);for(;!n(e,i,10)&&0t?e.data.y-10:e.data.y+10,"determineLabelYPosition");v.selectAll("text").data(T).enter().append("text").attr("x",e=>e.data.x+e.data.width/2).attr("y",k).attr("text-anchor","middle").attr("dominant-baseline",t?"auto":"hanging").attr("fill",a.dataLabelColor).attr("font-size",b+"px").text(e=>e.label)}}break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",e=>e.fill).attr("font-size",e=>e.fontSize).attr("dominant-baseline",e=>l(e.verticalPos)).attr("text-anchor",e=>c(e.horizontalPos)).attr("transform",e=>h(e)).text(e=>e.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",e=>e.path).attr("fill",e=>e.fill||"none").attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth)}}},"draw"),oqe={draw:sqe}}),hqe={};Vat(hqe,{diagram:()=>uqe});var uqe,dqe,pqe,gqe,fqe,mqe,yqe,vqe=r(()=>{tze(),lqe(),cqe(),uqe={parser:JFe,db:aqe,renderer:oqe}}),bqe=r(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],B=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],s=[2,7],o=[1,26],l=[1,27],c=[1,28],h=[1,29],u=[1,33],d=[1,34],p=[1,35],g=[1,36],f=[1,37],m=[1,38],y=[1,24],v=[1,31],b=[1,32],x=[1,30],T=[1,39],k=[1,40],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],C=[1,61],S=[89,90],$=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],F=[27,29],z=[1,70],q=[1,71],j=[1,72],W=[1,73],U=[1,74],G=[1,75],V=[1,76],E=[1,83],_=[1,80],Y=[1,84],H=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],ee=[1,91],te=[1,92],re=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[63,64],ie=[1,101],ne=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],R=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],L=[1,110],I=[1,106],N=[1,107],D=[1,108],M=[1,109],O=[1,111],ae=[1,116],se=[1,117],oe=[1,114],le=[1,115],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 4:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(a[o-3],a[o-4]);break;case 22:i.addRequirement(a[o-5],a[o-6]),i.setClass([a[o-5]],a[o-3]);break;case 23:i.setNewReqId(a[o-2]);break;case 24:i.setNewReqText(a[o-2]);break;case 25:i.setNewReqRisk(a[o-2]);break;case 26:i.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(a[o-3]);break;case 43:i.addElement(a[o-5]),i.setClass([a[o-5]],a[o-3]);break;case 44:i.setNewElementType(a[o-2]);break;case 45:i.setNewElementDocRef(a[o-2]);break;case 48:i.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:i.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 58:i.setClass(a[o-1],a[o]);break;case 59:i.setClass([a[o-2]],a[o]);break;case 60:case 62:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 65:this.$=[a[o]];break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(B,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},e(B,[2,4]),e(B,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:43,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:44,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:45,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:46,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:47,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:48,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:49,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{4:17,5:a,7:50,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:k},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(w,[2,17]),e(w,[2,18]),e(w,[2,19]),e(w,[2,20]),{30:60,33:62,75:C,89:T,90:k},{30:63,33:62,75:C,89:T,90:k},{30:64,33:62,75:C,89:T,90:k},e(S,[2,29]),e(S,[2,30]),e(S,[2,31]),e(S,[2,32]),e(S,[2,33]),e(S,[2,34]),e($,[2,81]),e($,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(F,[2,79]),e(F,[2,80]),{27:[1,67],29:[1,68]},e(F,[2,85]),e(F,[2,86]),{62:69,65:z,66:q,67:j,68:W,69:U,70:G,71:V},{62:77,65:z,66:q,67:j,68:W,69:U,70:G,71:V},{30:78,33:62,75:C,89:T,90:k},{73:79,75:E,76:_,78:81,79:82,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,60]),e(re,[2,62]),{73:93,75:E,76:_,78:81,79:82,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},{30:94,33:62,75:C,76:_,89:T,90:k},{5:[1,95]},{30:96,33:62,75:C,89:T,90:k},{5:[1,97]},{30:98,33:62,75:C,89:T,90:k},{63:[1,99]},e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(A,[2,54]),e(A,[2,55]),e(A,[2,56]),{64:[1,100]},e(w,[2,59],{76:_}),e(w,[2,64],{76:ie}),{33:103,75:[1,102],89:T,90:k},e(ne,[2,65],{79:104,75:E,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(R,[2,67]),e(R,[2,69]),e(R,[2,70]),e(R,[2,71]),e(R,[2,72]),e(R,[2,73]),e(R,[2,74]),e(R,[2,75]),e(R,[2,76]),e(R,[2,77]),e(R,[2,78]),e(w,[2,57],{76:ie}),e(w,[2,58],{76:_}),{5:L,28:105,31:I,34:N,36:D,38:M,40:O},{27:[1,112],76:_},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:_},{33:119,89:T,90:k},{33:120,89:T,90:k},{75:E,78:121,79:82,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,61]),e(re,[2,63]),e(R,[2,68]),e(w,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:L,28:126,31:I,34:N,36:D,38:M,40:O},e(w,[2,28]),{5:[1,127]},e(w,[2,42]),{32:[1,128]},{32:[1,129]},{5:ae,40:se,56:130,57:oe,59:le},e(w,[2,47]),{5:[1,131]},e(w,[2,48]),e(w,[2,49]),e(ne,[2,66],{79:104,75:E,80:Y,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:T,90:k},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(w,[2,27]),{5:L,28:145,31:I,34:N,36:D,38:M,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(w,[2,46]),{5:ae,40:se,56:152,57:oe,59:le},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(w,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(w,[2,43]),{5:L,28:159,31:I,34:N,36:D,38:M,40:O},{5:L,28:160,31:I,34:N,36:D,38:M,40:O},{5:L,28:161,31:I,34:N,36:D,38:M,40:O},{5:L,28:162,31:I,34:N,36:D,38:M,40:O},{5:ae,40:se,56:163,57:oe,59:le},{5:ae,40:se,56:164,57:oe,59:le},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(w,[2,26]),e(w,[2,44]),e(w,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],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,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};t.lexer=B,mt(P,"Parser"),(dqe=new((P.prototype=t).Parser=P)).parser=dqe,pqe=dqe}),xqe=r(()=>{Uu(),e(),Wu(),gqe=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Bh,this.getAccTitle=$h,this.setAccDescription=Fh,this.getAccDescription=zh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getConfig=mt(()=>B().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{mt(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),P.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,r){this.relations.push({type:e,src:t,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ph()}setCssStyle(e,t){for(var r of e){var i,n=this.requirements.get(r)??this.elements.get(r);if(!t||!n)return;for(i of t)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(e,t){for(var r of e){var i=this.requirements.get(r)??this.elements.get(r);if(i)for(var n of t)i.classes.push(n),(n=this.classes.get(n)?.styles)&&i.cssStyles.push(...n)}}defineClass(e,i){for(let t of e){let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),i&&i.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.requirements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...i.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...i.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){var e,t,r,i=B(),n=[],a=[];for(e of this.requirements.values()){var s=e;s.id=e.name,s.cssStyles=e.cssStyles,s.cssClasses=e.classes.join(" "),s.shape="requirementBox",s.look=i.look,s.colorIndex=n.length,n.push(s)}for(t of this.elements.values()){var o=t;o.shape="requirementBox",o.look=i.look,o.id=t.name,o.cssStyles=t.cssStyles,o.cssClasses=t.classes.join(" "),o.colorIndex=n.length,n.push(o)}for(r of this.relations){var l=r.type===this.Relationships.CONTAINS,l={id:r.src+`-${r.dst}-0`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",l?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:l?"normal":"dashed",arrowTypeStart:l?"requirement_contains":"",arrowTypeEnd:l?"":"requirement_arrow",look:i.look,labelType:"markdown"};a.push(l)}return{nodes:n,edges:a,other:{},config:i,direction:this.getDirection()}}}}),Tqe=r(()=>{wi(),fqe=mt(t=>{var{themeVariables:e,look:r}=vr(),{bkgColorArray:i,borderColorArray:n}=e;if(!n?.length)return"";let a="";for(let e=0;e{var{look:t,themeVariables:r}=vr(),r=r.requirementEdgeLabelBackground;return` ${fqe(e)} marker { fill: ${e.relationColor}; stroke: ${e.relationColor}; } marker.cross { stroke: ${e.lineColor}; } svg { font-family: ${e.fontFamily}; font-size: ${e.fontSize}; } .reqBox { fill: ${e.requirementBackground}; fill-opacity: 1.0; stroke: ${e.requirementBorderColor}; stroke-width: ${e.requirementBorderSize}; } .reqTitle, .reqLabel{ fill: ${e.requirementTextColor}; } .reqLabelBox { fill: ${e.relationLabelBackground}; fill-opacity: 1.0; } .req-title-line { stroke: ${e.requirementBorderColor}; stroke-width: ${e.requirementBorderSize}; } .relationshipLine { stroke: ${e.relationColor}; stroke-width: ${"neo"===t?e.strokeWidth:"1px"}; } .relationshipLabel { fill: ${e.relationLabelColor}; } .edgeLabel { background-color: ${e.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.relationLabelColor}; } .divider { stroke: ${e.nodeBorder}; stroke-width: 1; } .label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .labelBkg { background-color: ${r??e.edgeLabelBackground}; } `},"getStyles"),yqe=mqe}),kqe={};Vat(kqe,{draw:()=>wqe});var wqe,Cqe=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),wqe=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing requirement diagram (unified)",t);var{securityLevel:n,state:a,layout:s,look:o}=B(),l=i.db.getData(),n=tI(t,n);l.type=i.type,l.layoutAlgorithm=Bue(s),l.nodeSpacing=a?.nodeSpacing??50,l.rankSpacing=a?.rankSpacing??50,l.markers="neo"===o?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],l.diagramId=t,await Pue(l,n),PC.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),Sqe={};Vat(Sqe,{diagram:()=>Eqe});var Eqe,_qe,Aqe,Rqe,Lqe,Iqe,Nqe,Dqe,Mqe,Oqe,Pqe,Bqe,$qe,Fqe,zqe,qqe,jqe,Wqe,Uqe,Gqe,Vqe,Yqe,Hqe,Xqe,Kqe,Zqe,Qqe,Jqe,eje,tje,rje,ije,nje,aje,sje,oje,lje,cje,hje,uje,dje,pje,gje,fje,mje,yje,vje,bje,xje,Tje,kje,wje,Cje,Sje,Eje,_je,Aje=r(()=>{bqe(),xqe(),Tqe(),Cqe(),Eqe={parser:pqe,get db(){return new gqe},renderer:kqe,styles:yqe}}),Rje=r(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,2],B=[1,3],$=[1,4],r=[2,4],i=[1,9],n=[1,11],a=[1,12],s=[1,14],o=[1,15],l=[1,17],c=[1,18],h=[1,19],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],b=[1,33],x=[1,34],T=[1,35],k=[1,36],w=[1,37],C=[1,38],S=[1,39],E=[1,40],_=[1,42],A=[1,43],R=[1,44],L=[1,45],I=[1,46],N=[1,47],D=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],F=[1,74],z=[1,80],q=[1,81],j=[1,82],W=[1,83],U=[1,84],G=[1,85],V=[1,86],Y=[1,87],H=[1,88],X=[1,89],K=[1,90],Z=[1,91],Q=[1,92],J=[1,93],ee=[1,94],te=[1,95],re=[1,96],ie=[1,97],ne=[1,98],ae=[1,99],se=[1,100],oe=[1,101],le=[1,102],ce=[1,103],he=[1,104],ue=[1,105],de=[2,78],pe=[4,5,17,51,53,54],ge=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],fe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ve=[5,52],M=[70,71,72,73],O=[1,151],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement: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:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,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],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.apply(a[o]),a[o];case 4:case 10:this.$=[];break;case 5:case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 12:case 13:this.$=a[o];break;case 8:case 9:case 14:this.$=[];break;case 16:a[o].type="createParticipant",this.$=a[o];break;case 17:a[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 30:i.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 31:i.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 32:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 33:case 34:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 35:a[o-1].unshift({type:"loopStart",loopText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"rectStart",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"optStart",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"altStart",altText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 42:a[o-1].unshift({type:"breakStart",breakText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 44:this.$=a[o-3].concat([{type:"option",optionText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 46:this.$=a[o-3].concat([{type:"and",parText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.PAR_AND},a[o]]);break;case 48:this.$=a[o-3].concat([{type:"else",altText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.ALT_ELSE},a[o]]);break;case 49:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 50:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 51:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 52:case 57:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 53:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 54:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 55:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 56:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 58:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 59:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 60:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 63:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 66:this.$=[a[o-2],a[o]];break;case 67:this.$=a[o];break;case 68:this.$=i.PLACEMENT.LEFTOF;break;case 69:this.$=i.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 71:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 72:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:i.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:i.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor}];break;case 73:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o],activate:!1,centralConnection:i.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:i.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-4].actor}];break;case 74:this.$=[a[o-5],a[o-1],{type:"addMessage",from:a[o-5].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:i.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:i.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor},{type:"centralConnectionReverse",signalType:i.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-5].actor}];break;case 75:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 76:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 77:this.$=a[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:a[o]};break;case 79:this.$=i.LINETYPE.SOLID_OPEN;break;case 80:this.$=i.LINETYPE.DOTTED_OPEN;break;case 81:this.$=i.LINETYPE.SOLID;break;case 82:this.$=i.LINETYPE.SOLID_TOP;break;case 83:this.$=i.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=i.LINETYPE.STICK_TOP;break;case 85:this.$=i.LINETYPE.STICK_BOTTOM;break;case 86:this.$=i.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=i.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=i.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=i.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=i.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=i.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=i.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=i.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=i.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=i.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=i.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=i.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=i.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=i.LINETYPE.DOTTED;break;case 100:this.$=i.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=i.LINETYPE.SOLID_CROSS;break;case 102:this.$=i.LINETYPE.DOTTED_CROSS;break;case 103:this.$=i.LINETYPE.SOLID_POINT;break;case 104:this.$=i.LINETYPE.DOTTED_POINT;break;case 105:this.$=i.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:t,5:B,6:$},{1:[3]},{3:5,4:t,5:B,6:$},{3:6,4:t,5:B,6:$},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},e(D,[2,5]),{9:48,13:13,14:s,15:o,18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},e(D,[2,7]),e(D,[2,8]),e(D,[2,9]),e(D,[2,15]),{13:49,51:C,53:S,54:E},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:N},{23:56,73:N},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(D,[2,30]),e(D,[2,31]),{33:[1,62]},{35:[1,63]},e(D,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:F},{23:75,55:76,73:F},{23:77,73:N},{69:78,72:[1,79],78:z,79:q,80:j,81:W,82:U,83:G,84:V,85:Y,86:H,87:X,88:K,89:Z,90:Q,91:J,92:ee,93:te,94:re,95:ie,96:ne,97:ae,98:se,99:oe,100:le,101:ce,102:he,103:ue},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:N},{23:111,73:N},{23:112,73:N},{23:113,73:N},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],de),e(D,[2,6]),e(D,[2,16]),e(pe,[2,10],{11:114}),e(D,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(D,[2,22]),{5:[1,118]},{5:[1,119]},e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,29]),e(D,[2,32]),e(D,[2,33]),e(ge,r,{7:120}),e(ge,r,{7:121}),e(ge,r,{7:122}),e(fe,r,{41:123,7:124}),e(me,r,{43:125,7:126}),e(me,r,{7:126,43:127}),e(ye,r,{46:128,7:129}),e(ge,r,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(ve,de,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:N},{69:146,78:z,79:q,80:j,81:W,82:U,83:G,84:V,85:Y,86:H,87:X,88:K,89:Z,90:Q,91:J,92:ee,93:te,94:re,95:ie,96:ne,97:ae,98:se,99:oe,100:le,101:ce,102:he,103:ue},e(M,[2,79]),e(M,[2,80]),e(M,[2,81]),e(M,[2,82]),e(M,[2,83]),e(M,[2,84]),e(M,[2,85]),e(M,[2,86]),e(M,[2,87]),e(M,[2,88]),e(M,[2,89]),e(M,[2,90]),e(M,[2,91]),e(M,[2,92]),e(M,[2,93]),e(M,[2,94]),e(M,[2,95]),e(M,[2,96]),e(M,[2,97]),e(M,[2,98]),e(M,[2,99]),e(M,[2,100]),e(M,[2,101]),e(M,[2,102]),e(M,[2,103]),e(M,[2,104]),{23:147,73:N},{23:149,60:148,73:N},{73:[2,68]},{73:[2,69]},{58:150,104:O},{58:152,104:O},{58:153,104:O},{58:154,104:O},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:C,53:S,54:E},{5:[1,160]},e(D,[2,20]),e(D,[2,21]),e(D,[2,23]),e(D,[2,24]),{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,161],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,162],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,163],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{17:[1,164]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,47],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,50:[1,165],51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{17:[1,166]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,45],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,49:[1,167],51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,43],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,48:[1,170],51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,171],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:k,47:w,51:C,53:S,54:E,56:_,61:A,62:R,63:L,64:I,73:N},{16:[1,172]},e(D,[2,50]),{16:[1,173]},e(D,[2,55]),e(ve,[2,76]),{76:[1,174]},{16:[1,175]},e(D,[2,52]),{16:[1,176]},e(D,[2,57]),e(D,[2,53]),{23:177,73:N},{23:178,73:N},{23:179,73:N},{58:180,104:O},{23:181,72:[1,182],73:N},{58:183,104:O},{58:184,104:O},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(D,[2,17]),e(pe,[2,11]),{13:186,51:C,53:S,54:E},e(pe,[2,13]),e(pe,[2,14]),e(D,[2,19]),e(D,[2,35]),e(D,[2,36]),e(D,[2,37]),e(D,[2,38]),{16:[1,187]},e(D,[2,39]),{16:[1,188]},e(D,[2,40]),e(D,[2,41]),{16:[1,189]},e(D,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:O},{58:196,104:O},{58:197,104:O},{5:[2,75]},{58:198,104:O},{23:199,73:N},{5:[2,58]},{5:[2,59]},{23:200,73:N},e(pe,[2,12]),e(fe,r,{7:124,41:201}),e(me,r,{7:126,43:202}),e(ye,r,{7:129,46:203}),e(D,[2,49]),e(D,[2,54]),e(ve,[2,77]),e(D,[2,51]),e(D,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:O},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/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,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,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],inclusive:!0}}};t.lexer=B,mt(P,"Parser"),(_qe=new((P.prototype=t).Parser=P)).parser=_qe,Aqe=_qe}),Lje=r(()=>{Uu(),k_(),e(),dOe(),th(),Wu(),Rqe={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,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},Lqe={FILLED:0,OPEN:1},Iqe={LEFTOF:0,RIGHTOF:1,OVER:2},Nqe={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},Dqe=class{constructor(){this.state=new cOe(()=>({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})),this.setAccTitle=Bh,this.setAccDescription=Fh,this.setDiagramTitle=qh,this.getAccTitle=$h,this.getAccDescription=zh,this.getDiagramTitle=jh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(B().wrap),this.LINETYPE=Rqe,this.ARROWTYPE=Lqe,this.PLACEMENT=Iqe}static{mt(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,i,n){let a=this.state.records.currentBox,s,o;if(void 0!==n&&(o=n.includes(` `)?n+` `:`{ `+n+` }`,s=T_(o,{schema:x_})),i=s?.type??i,!s?.alias||r&&r.text!==t||(r={text:s.alias,wrap:r?.wrap,type:i}),n=this.state.records.actors.get(e)){if(this.state.records.currentBox&&n.box&&this.state.records.currentBox!==n.box)throw new Error(`A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=n.box||this.state.records.currentBox,n.box=a,n&&t===n.name&&null==r)return}null==r?.text&&(r={text:t,type:i}),null!=i&&null!=r.text||(r={text:t,type:i}),this.state.records.actors.set(e,{box:a,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor&&(n=this.state.records.actors.get(this.state.records.prevActor))&&(n.nextActor=e),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s;return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:n,centralConnection:a??0}),!0}hasAtLeastOneBox(){return 0e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(void 0===e)return{};e=e.trim();var t=null!==/^:?wrap:/.exec(e)||null===/^:?nowrap:/.exec(e)&&void 0;return{cleanedText:(void 0===t?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:B().sequence?.wrap??!1}clear(){this.state.reset(),Ph()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return P.debug("parseMessage: "+JSON.stringify(t)),t}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",i=t?.[2]?t[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",i=e.trim()):((n=(new Option).style).color=r,n.color!==r&&(r="transparent",i=e.trim()));var{wrap:n,cleanedText:e}=this.extractWrap(i);return{text:e?Rc(e,B()):void 0,color:r,wrap:n}}addNote(e,t,r){var i={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},e=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e[0],to:e[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(t,r){t=this.getActor(t);try{let e=Rc(r.text,B());e=(e=e.replace(/=/g,"=")).replace(/&/g,"&");var i=JSON.parse(e);this.insertLinks(t,i)}catch(e){P.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=Rc(s.text,B()),r=t.indexOf("@"),i=(t=(t=t.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),n=t.slice(r+1).trim();e[i]=n,this.insertLinks(a,e)}catch(e){P.error("error while parsing actor link text",e)}}insertLinks(e,t){if(null==e.links)e.links=t;else for(var r in t)e.links[r]=t[r]}addProperties(e,t){e=this.getActor(e);try{var r=Rc(t.text,B()),i=JSON.parse(r);this.insertProperties(e,i)}catch(e){P.error("error while parsing actor properties text",e)}}insertProperties(e,t){if(null==e.properties)e.properties=t;else for(var r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){e=this.getActor(e),t=document.getElementById(t.text);try{var r=t.innerHTML,i=JSON.parse(r);i.properties&&this.insertProperties(e,i.properties),i.links&&this.insertLinks(e,i.links)}catch(e){P.error("error while parsing actor details text",e)}}getActorProperty(e,t){if(void 0!==e?.properties)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.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");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":Bh(e.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType)}}getConfig(){return B().sequence}}}),Ije=r(()=>{Uu(),Mqe=mt(e=>{var t=e.dropShadow??"none",r=B().look;return`.actor { stroke: ${e.actorBorder}; fill: ${e.actorBkg}; stroke-width: ${e.strokeWidth??1}; } rect.actor.outer-path[data-look="neo"] { filter: ${t}; } rect.note[data-look="neo"] { stroke:${e.noteBorderColor}; fill:${e.noteBkgColor}; filter: ${t}; } text.actor > tspan { fill: ${e.actorTextColor}; stroke: none; } .actor-line { stroke: ${e.actorLineColor}; } .innerArc { stroke-width: 1.5; stroke-dasharray: none; } .messageLine0 { stroke-width: 1.5; stroke-dasharray: none; stroke: ${e.signalColor}; } .messageLine1 { stroke-width: 1.5; stroke-dasharray: 2, 2; stroke: ${e.signalColor}; } [id$="-arrowhead"] path { fill: ${e.signalColor}; stroke: ${e.signalColor}; } .sequenceNumber { fill: ${e.sequenceNumberColor}; } [id$="-sequencenumber"] { fill: ${e.signalColor}; } [id$="-crosshead"] path { fill: ${e.signalColor}; stroke: ${e.signalColor}; } .messageText { fill: ${e.signalTextColor}; stroke: none; } .labelBox { stroke: ${e.labelBoxBorderColor}; fill: ${e.labelBoxBkgColor}; filter: ${"neo"===r?t:"none"}; } .labelText, .labelText > tspan { fill: ${e.labelTextColor}; stroke: none; } .loopText, .loopText > tspan { fill: ${e.loopTextColor}; stroke: none; } .sectionTitle, .sectionTitle > tspan { fill: ${e.loopTextColor}; stroke: none; } .loopLine { stroke-width: 2px; stroke-dasharray: 2, 2; stroke: ${e.labelBoxBorderColor}; fill: ${e.labelBoxBorderColor}; } .note { //stroke: #decc93; stroke: ${e.noteBorderColor}; fill: ${e.noteBkgColor}; } .noteText, .noteText > tspan { fill: ${e.noteTextColor}; stroke: none; ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""} } .activation0 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .activation1 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .activation2 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .actorPopupMenu { position: absolute; } .actorPopupMenuPanel { position: absolute; fill: ${e.actorBkg}; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); } .actor-man circle, line { fill: ${e.actorBkg}; stroke-width: 2px; } g rect.rect { filter: ${t}; stroke: ${e.nodeBorder}; } `},"getStyles"),Oqe=Mqe}),Nje=r(()=>{function t(e,t,r,i,n,a,s){g(t.append("text").attr("x",r).attr("y",i).style("text-anchor","start").text(e),s)}function l(e,t,r,i,n,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=e.split(I.lineBreakRegex);for(let e=0;er?o.width:r);if((e=l.append("rect")).attr("class","actorPopupMenuPanel"+n),e.attr("x",o.x),e.attr("y",o.height),e.attr("fill",o.fill),e.attr("stroke",o.stroke),e.attr("width",c),e.attr("height",o.height),e.attr("rx",o.rx),e.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,Pqe.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),kje(i)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},i),u+=30}}return e.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),Gqe=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Vqe=mt(async function(i,n,a=null){var s=i.append("foreignObject"),o=await Yc(n.text,vr()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===n.class)(i=i.node().firstChild).setAttribute("height",o.height+2*n.textMargin),i=i.getBBox(),s.attr("x",Math.round(i.x+i.width/2-o.width/2)).attr("y",Math.round(i.y+i.height/2-o.height/2));else if(a){let{startx:e,stopx:t,starty:r}=a;e>t&&(i=e,e=t,t=i),s.attr("x",Math.round(e+Math.abs(e-t)/2-o.width/2)),"loopText"===n.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),Yqe=mt(function(e,t){let r=0,i=0,n=t.text.split(I.lineBreakRegex),[a,s]=OC(t.fontSize),o=[],l=0,c=mt(()=>t.y,"yfunc");if(void 0!==t.valign&&void 0!==t.textMargin&&0Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":c=mt(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":c=mt(()=>Math.round(t.y+(r+i+2*t.textMargin)-t.textMargin),"yfunc")}if(void 0!==t.anchor&&void 0!==t.textMargin&&void 0!==t.width)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle"}for(var[h,u]of n.entries()){void 0!==t.textMargin&&0===t.textMargin&&void 0!==a&&(l=h*a),(h=e.append("text")).attr("x",t.x),h.attr("y",c()),void 0!==t.anchor&&h.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),void 0!==t.fontFamily&&h.style("font-family",t.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==t.fontWeight&&h.style("font-weight",t.fontWeight),void 0!==t.fill&&h.attr("fill",t.fill),void 0!==t.class&&h.attr("class",t.class),void 0!==t.dy?h.attr("dy",t.dy):0!==l&&h.attr("dy",l);var d,u=u||dC;(t.tspan?((d=h.append("tspan")).attr("x",t.x),void 0!==t.fill&&d.attr("fill",t.fill),d):h).text(u),void 0!==t.valign&&void 0!==t.textMargin&&0{r.select&&e.forEach(e=>{var e=i.get(e),t=r.select("#actor"+e.actorCnt);!n.mirrorActors&&e.stopy?t.attr("y2",e.stopy+e.height/2):n.mirrorActors&&t.attr("y2",e.stopy)})},"fixLifeLineHeights"),Zqe=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u}=h,d=e=e.append("g").lower(),o=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&d.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),d=e.append("g"),t.actorCnt=Xqe,null!=t.links&&d.attr("id","root-"+Xqe),"neo"===l&&d.attr("data-look","neo")),K3()),s="actor",e=(t.properties?.class?s=t.properties.class:o.fill="#eaeaea",s+=i?" "+Fqe:" "+$qe,o.x=t.x,o.y=a,o.width=t.width,o.height=t.height,o.class=s,o.rx=3,o.ry=3,o.name=t.name,"neo"===l&&(o.rx=6,o.ry=6),Wqe(d,o)),a=n.get(t.name)??0;jqe.has(c)&&(e.style("stroke",u[a%u.length]),e.style("fill",h[a%u.length])),"neo"===l&&e.attr("filter","url(#drop-shadow)"),t.rectData=o,t.properties?.icon&&("@"===(s=t.properties.icon.trim()).charAt(0)?X3(d,o.x+o.width-20,o.y+10,s.substr(1)):H3(d,o.x+o.width-20,o.y+10,s)),i||(d.attr("data-et","participant"),d.attr("data-type","participant"),d.attr("data-id",t.name)),Tje(r,Uc(t.description))(t.description,d,o.x,o.y,o.width,o.height,{class:"actor "+zqe},r);let p=t.height;return e.node&&(n=e.node().getBBox(),t.height=n.height,p=n.height),p},"drawActorTypeParticipant"),Qqe=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u}=h,d=e=e.append("g").lower(),o=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&d.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),d=e.append("g"),t.actorCnt=Xqe,null!=t.links&&d.attr("id","root-"+Xqe),"neo"===l&&d.attr("data-look","neo")),K3()),s="actor",e=(t.properties?.class?s=t.properties.class:o.fill="#eaeaea",s+=i?" "+Fqe:" "+$qe,o.x=t.x,o.y=a,o.width=t.width,o.height=t.height,o.class=s,o.name=t.name,{...o,x:o.x+-6,y:o.y+6,class:"actor"}),a=Wqe(d,o),s=Wqe(d,e),e=(t.rectData=o,"neo"===l&&d.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);jqe.has(c)&&(a.style("stroke",u[e%u.length]),a.style("fill",h[e%u.length]),s.style("stroke",u[e%u.length]),s.style("fill",h[e%u.length])),t.properties?.icon&&("@"===(l=t.properties.icon.trim()).charAt(0)?X3(d,o.x+o.width-20,o.y+10,l.substr(1)):H3(d,o.x+o.width-20,o.y+10,l)),Tje(r,Uc(t.description))(t.description,d,o.x-6,o.y+6,o.width,o.height,{class:"actor "+zqe},r);let p=t.height;return a.node&&(n=a.node().getBBox(),t.height=n.height,p=n.height),i||(d.attr("data-et","participant"),d.attr("data-type","collections"),d.attr("data-id",t.name)),p},"drawActorTypeCollections"),Jqe=mt(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height,{look:l,theme:c,themeVariables:h}=r,{bkgColorArray:u,borderColorArray:d}=h,p=e.append("g").lower(),g=p,f=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=p.append("g"),t.actorCnt=Xqe,null!=t.links&&g.attr("id","root-"+Xqe),"neo"===l&&g.attr("data-look","neo")),K3()),m="actor";t.properties?.class?m=t.properties.class:f.fill="#eaeaea",m+=i?" "+Fqe:" "+$qe,g.attr("class",m),f.x=t.x,f.y=a,f.width=t.width,f.height=t.height,f.name=t.name;var y=(e=f.height/2)/(2.5+f.height/50),v=g.append("g"),b=g.append("g"),x=`M ${f.x},${f.y+e} a ${y},${e} 0 0 0 0,${f.height} h ${f.width-2*y} a ${y},${e} 0 0 0 0,-${f.height} Z `,x=(v.append("path").attr("d",x),b.append("path").attr("d",`M ${f.x},${f.y+e} a ${y},${e} 0 0 0 0,`+f.height),v.attr("transform",`translate(${y}, ${-f.height/2})`),b.attr("transform",`translate(${f.width-y}, ${-f.height/2})`),t.rectData=f,"neo"===l&&v.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);jqe.has(c)&&(v.style("stroke",d[x%d.length]),v.style("fill",u[x%d.length]),b.style("stroke",d[x%d.length]),b.style("fill",u[x%d.length])),t.properties?.icon&&(e=t.properties.icon.trim(),y=f.x+f.width-20,n=f.y+10,"@"===e.charAt(0)?X3(g,y,n,e.substr(1)):H3(g,y,n,e)),Tje(r,Uc(t.description))(t.description,g,f.x,f.y,f.width,f.height,{class:"actor "+zqe},r);let T=t.height,k=v.select("path:last-child");return k.node()&&(b=k.node().getBBox(),t.height=b.height,T=b.height),i||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),T},"drawActorTypeQueue"),eje=mt(function(e,t,r,i,n,a){var s=i?t.stopy:t.starty,o=t.x+t.width/2,l=s+75,{look:c,theme:h,themeVariables:u}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p,actorBkg:g}=u,f=e.append("g").lower(),m=(i||(Xqe++,f.append("line").attr("id","actor"+Xqe).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Xqe),e.append("g")),y=qqe;return m.attr("class",y+=i?" "+Fqe:" "+$qe),m.attr("name",t.name),(f=K3()).x=t.x,f.y=s,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",l=t.x+t.width/2,o=s+32,m.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),m.append("circle").attr("cx",l).attr("cy",o).attr("r",22).attr("filter","neo"===c?"url(#drop-shadow)":""),m.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${l}, ${o-22})`),e=a.get(t.name)??0,jqe.has(h)?(m.style("stroke",d[e%d.length]),m.style("fill",u[e%d.length])):(m.style("stroke",p),m.style("fill",g)),s=m.node().getBBox(),t.height=s.height+2*(r?.sequence?.labelBoxHeight??0),Tje(r,Uc(t.description))(t.description,m,f.x,f.y+22+(i?5:12),f.width,f.height,{class:"actor "+qqe},r),i||(m.attr("data-et","participant"),m.attr("data-type","control"),m.attr("data-id",t.name)),t.height},"drawActorTypeControl"),tje=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+75,{look:l,theme:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u}=h,d=e.append("g").lower(),p=e.append("g"),g="actor";return p.attr("class",g+=i?" "+Fqe:" "+$qe),p.attr("name",t.name),(e=K3()).x=t.x,e.y=a,e.fill="#eaeaea",e.width=t.width,e.height=t.height,e.class="actor",g=t.x+t.width/2,a+=i?10:25,p.append("circle").attr("cx",g).attr("cy",a).attr("r",22).attr("width",t.width).attr("height",t.height),p.append("line").attr("x1",g-22).attr("x2",g+22).attr("y1",a+22).attr("y2",a+22).attr("stroke-width",2),"neo"===l&&p.attr("filter","url(#drop-shadow)"),g=n.get(t.name)??0,jqe.has(c)&&(p.style("stroke",u[g%u.length]),p.style("fill",h[g%u.length])),a=p.node().getBBox(),t.height=a.height+(r?.sequence?.labelBoxHeight??0),i||(Xqe++,d.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Xqe),Tje(r,Uc(t.description))(t.description,p,e.x,e.y+(i?15:30),e.width,e.height,{class:"actor "+qqe},r),i?p.attr("transform","translate(0, 22)"):(p.attr("transform","translate(0, 6)"),p.attr("data-et","participant"),p.attr("data-type","entity"),p.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),rje=mt(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+t.height+2*r.boxTextMargin,{theme:l,themeVariables:c,look:h}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p}=c,g=e.append("g").lower(),f=g,m=(i||(Xqe++,Object.keys(t.links||{}).length&&!r.forceMenus&&f.attr("onclick",Gqe(`actor${Xqe}_popup`)).attr("cursor","pointer"),f.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),f=g.append("g"),t.actorCnt=Xqe,null!=t.links&&f.attr("id","root-"+Xqe),"neo"===h&&f.attr("data-look","neo")),K3()),y="actor";t.properties?.class?y=t.properties.class:m.fill="#eaeaea",y+=i?" "+Fqe:" "+$qe,m.x=t.x,m.y=a,m.width=t.width,m.height=t.height,m.class=y,m.name=t.name,m.x=t.x,m.y=a;var e=m.width/3,v=m.width/3,b=(T=e/2)/(2.5+e/50),x=f.append("g"),T=(x.attr("class",y),` M ${m.x},${m.y+b} a ${T},${b} 0 0 0 ${e},0 a ${T},${b} 0 0 0 -${e},0 l 0,${v-2*b} a ${T},${b} 0 0 0 ${e},0 l 0,-${v-2*b} `),v=(x.append("path").attr("d",T),"neo"===h&&x.attr("filter","url(#drop-shadow)"),n.get(t.name)??0);return jqe.has(l)?(x.style("stroke",d[v%d.length]),x.style("fill",u[v%d.length])):x.style("stroke",p),x.attr("transform",`translate(${e}, ${b})`),t.rectData=m,Tje(r,Uc(t.description))(t.description,f,m.x,m.y+35,m.width,m.height,{class:"actor "+zqe},r),(T=x.select("path:last-child")).node()&&(n=T.node().getBBox(),t.height=n.height+(r.sequence.labelBoxHeight??0)),i||(f.attr("data-et","participant"),f.attr("data-type","database"),f.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),ije=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,l=e.append("g").lower(),{look:c,theme:h,themeVariables:u}=r,{bkgColorArray:u,borderColorArray:d,actorBorder:p}=u,e=(i||(Xqe++,l.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Xqe),e.append("g")),g=qqe;return e.attr("class",g+=i?" "+Fqe:" "+$qe),e.attr("name",t.name),(l=K3()).x=t.x,l.y=a,l.fill="#eaeaea",l.width=t.width,l.height=t.height,l.class="actor",e.append("line").attr("id","actor-man-torso"+Xqe).attr("x1",t.x+t.width/2-55).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),e.append("line").attr("id","actor-man-arms"+Xqe).attr("x1",t.x+t.width/2-55).attr("y1",a+2).attr("x2",t.x+t.width/2-55).attr("y2",a+22),e.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",22),"neo"===c&&e.attr("filter","url(#drop-shadow)"),o=n.get(t.name)??0,jqe.has(h)?(e.style("stroke",d[o%d.length]),e.style("fill",u[o%d.length])):e.style("stroke",p),s=e.node().getBBox(),t.height=s.height+(r.sequence.labelBoxHeight??0),Tje(r,Uc(t.description))(t.description,e,l.x,l.y+15,l.width,l.height,{class:"actor "+qqe},r),e.attr("transform","translate(0,21)"),i||(e.attr("data-et","participant"),e.attr("data-type","boundary"),e.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),nje=mt(function(e,t,r,i,n){var a=i?t.stopy:t.starty,s=t.x+t.width/2,o=a+80,{look:l,theme:c,themeVariables:h}=r,{bkgColorArray:h,borderColorArray:u,actorBorder:d}=h,p=e.append("g").lower(),g=(i||(Xqe++,p.append("line").attr("id","actor"+Xqe).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Xqe),e.append("g")),f=qqe;return g.attr("class",f+=i?" "+Fqe:" "+$qe),g.attr("name",t.name),i||g.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name),p="neo"===l?.5:1,o="neo"===l?a+30*(1-p):a,g.append("line").attr("id","actor-man-torso"+Xqe).attr("x1",s).attr("y1",o+25*p).attr("x2",s).attr("y2",o+45*p),g.append("line").attr("id","actor-man-arms"+Xqe).attr("x1",s-Bqe/2*p).attr("y1",o+33*p).attr("x2",s+Bqe/2*p).attr("y2",o+33*p),g.append("line").attr("x1",s-Bqe/2*p).attr("y1",o+60*p).attr("x2",s).attr("y2",o+45*p),g.append("line").attr("x1",s).attr("y1",o+45*p).attr("x2",s+(Bqe/2-2)*p).attr("y2",o+60*p),(e=g.append("circle")).attr("cx",t.x+t.width/2),e.attr("cy",o+10*p),e.attr("r",15*p),e.attr("width",t.width*p),e.attr("height",t.height*p),i=g.node().getBBox(),t.height=i.height,(a=K3()).x=t.x,a.y=o,a.fill="#eaeaea",a.width=t.width,a.height=t.height/p,a.class="actor",a.rx=3,a.ry=3,s=n.get(t.name)??0,jqe.has(c)?(g.style("stroke",u[s%u.length]),g.style("fill",h[s%u.length])):g.style("stroke",d),Tje(r,Uc(t.description))(t.description,g,a.x,o+35*p-("neo"===l?10:0),a.width,a.height,{class:"actor "+qqe},r),t.height},"drawActorTypeActor"),aje=mt(async function(e,t,r,i,n,a,s){var o=s??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case"actor":return nje(e,t,r,i,o);case"participant":return Zqe(e,t,r,i,o);case"boundary":return ije(e,t,r,i,o);case"control":return eje(e,t,r,i,n,o);case"entity":return tje(e,t,r,i,o);case"database":return rje(e,t,r,i,o);case"collections":return Qqe(e,t,r,i,o);case"queue":return Jqe(e,t,r,i,o)}},"drawActor"),sje=mt(function(e,t,r){e=e.append("g"),hje(e,t),t.name&&Tje(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),oje=mt(function(e){return e.append("g")},"anchorElement"),lje=mt(function(e,t,r,i,n,a,s){var{theme:i,themeVariables:o}=i,{bkgColorArray:o,borderColorArray:l,mainBkg:c}=o,h=K3(),u=t.anchored,d=t.actor,n=(h.x=t.startx,h.y=t.starty,h.class="activation"+n%3,h.width=t.stopx-t.startx,h.height=r-t.starty,Wqe(u,h)),r=(s??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(d)??0;jqe.has(i)&&(n.style("stroke",l[r%l.length]),n.style("fill",o[r%l.length]??c))},"drawActivation"),cje=mt(async function(e,t,r,i,n){let{boxMargin:a,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:c,messageFontSize:h,messageFontWeight:u}=i,d=e.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),p=mt(function(e,t,r,i){return d.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("class","loopLine")},"drawLoopLine"),g=(p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),void 0!==t.sections&&t.sections.forEach(function(e){p(t.startx,e.y,t.stopx,e.y).style("stroke-dasharray","3, 3")}),Z3());g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(l??0,50),g.height=o+("neo"===i.look?15:0)||20,g.textMargin=s,g.class="labelText",Hqe(d,g),(g=bje()).text=t.title,g.x=t.startx+l/2+(t.stopx-t.startx)/2,g.y=t.starty+a+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.wrap=!0;var f=Uc(g.text)?await Vqe(d,g,t):Yqe(d,g);if(void 0!==t.sectionTitles)for(var[m,y]of Object.entries(t.sectionTitles))y.message&&(g.text=y.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[m].y+a+s,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=c,g.fontSize=h,g.fontWeight=u,g.wrap=t.wrap,Uc(g.text)?(t.starty=t.sections[m].y,await Vqe(d,g,t)):Yqe(d,g),y=Math.round(f.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t)),t.sections[m].height+=y-(a+s));return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),hje=mt(function(e,t){V3(e,t)},"drawBackgroundRect"),uje=mt(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),dje=mt(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),pje=mt(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),gje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),fje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),mje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),yje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),vje=mt(function(e,t){t=t.theme,e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color","redux"===t||"redux-color"===t?"#000000":"#FFFFFF")},"insertDropShadow"),bje=mt(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"),xje=mt(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(i,"byText"),mt(c,"byTspan"),mt(n,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),Tje=function(e,t=!1){return t?a:"fo"===e.textPlacement?n:"old"===e.textPlacement?i:c},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),kje=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},wje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),Cje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),Sje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),Eje=mt(function(e,t){e.append("defs").append("marker").attr("id",t+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),_je={drawRect:Wqe,drawText:Yqe,drawLabel:Hqe,drawActor:aje,drawBox:sje,drawPopup:Uqe,anchorElement:oje,drawActivation:lje,drawLoop:cje,drawBackgroundRect:hje,insertArrowHead:gje,insertArrowFilledHead:fje,insertSequenceNumber:mje,insertArrowCrossHead:yje,insertDatabaseIcon:uje,insertComputerIcon:dje,insertClockIcon:pje,getTextObj:bje,getNoteRect:xje,fixLifeLineHeights:Kqe,sanitizeUrl:Pqe.sanitizeUrl,insertDropShadow:vje,insertSolidTopArrowHead:wje,insertSolidBottomArrowHead:Cje,insertStickTopArrowHead:Sje,insertStickBottomArrowHead:Eje}});async function Dje(e,t){q.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=t,a=I.splitBreaks(n).length,s=Uc(n),n=s?await Gc(n,B()):PC.calculateTextDimensions(n,zje($));s||(s=n.height/a,t.height+=s,q.bumpVerticalPos(s));let o,l=n.height-10,c=n.width;return r===i?(o=q.getVerticalPos()+l,$.rightAngles||(l+=$.boxMargin,o=q.getVerticalPos()+l),l+=30,a=I.getMax(c/2,$.width/2),q.insert(r-a,q.getVerticalPos()-10+l,i+a,q.getVerticalPos()+30+l)):(l+=$.boxMargin,o=q.getVerticalPos()+l,q.insert(r,o-10,i,o)),q.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function Mje(e,t,r,i,n){q.bumpVerticalPos(r);let a=i;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=zje($),t.message=PC.wrapLabel(`[${t.message}]`,r-2*$.wrapPadding,e),t.width=r,t.wrap=!0,r=PC.calculateTextDimensions(t.message,e),e=I.getMax(r.height,$.labelBoxHeight),a=i+e,P.debug(e+" - "+t.message)),n(t),q.bumpVerticalPos(a)}function Oje(r,i,e,t,n,a,s){function o(e,t){e.x{var t,r=zje($),r=(t=e.actorKeys.reduce((e,t)=>e+(i.get(t).width+(i.get(t).margin||0)),0)+8*$.boxMargin-2*$.boxTextMargin,e.wrap&&(e.name=PC.wrapLabel(e.name,t-2*$.wrapPadding,r)),PC.calculateTextDimensions(e.name,r)),r=(c=I.getMax(r.height,c),I.getMax(t,r.width+2*$.wrapPadding));e.margin=$.boxTextMargin,te.textMaxHeight=c),I.getMax(r,$.height)}var $,q,$je,Fje,zje,qje,jje,Wje,Uje,Gje,Vje,Yje,Hje,Xje,Kje,Zje,Qje,Jje,eWe,tWe,rWe,iWe,nWe,aWe,sWe=r(()=>{bk(),Nje(),e(),th(),th(),kk(),Uu(),Lr(),zC(),Ch(),Lje(),$={},q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:mt(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(e=>e.height||0))+(0===this.loops.length?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.messages.length?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.notes.length?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:mt(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:mt(function(e){this.boxes.push(e)},"addBox"),addActor:mt(function(e){this.actors.push(e)},"addActor"),addLoop:mt(function(e){this.loops.push(e)},"addLoop"),addMessage:mt(function(e){this.messages.push(e)},"addMessage"),addNote:mt(function(e){this.notes.push(e)},"addNote"),lastActor:mt(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:mt(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:mt(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:mt(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:mt(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,Yje(B())},"init"),updateVal:mt(function(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:mt(function(i,n,a,s){let o=this,l=0;function e(r){return mt(function(e){l++;var t=o.sequenceItems.length-l+1;o.updateVal(e,"starty",n-t*$.boxMargin,Math.min),o.updateVal(e,"stopy",s+t*$.boxMargin,Math.max),o.updateVal(q.data,"startx",i-t*$.boxMargin,Math.min),o.updateVal(q.data,"stopx",a+t*$.boxMargin,Math.max),"activation"!==r&&(o.updateVal(e,"startx",i-t*$.boxMargin,Math.min),o.updateVal(e,"stopx",a+t*$.boxMargin,Math.max),o.updateVal(q.data,"starty",n-t*$.boxMargin,Math.min),o.updateVal(q.data,"stopy",s+t*$.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e()),this.activations.forEach(e("activation"))},"updateBounds"),insert:mt(function(e,t,r,i){var n=I.getMin(e,r),e=I.getMax(e,r),r=I.getMin(t,i),t=I.getMax(t,i);this.updateVal(q.data,"startx",n,Math.min),this.updateVal(q.data,"starty",r,Math.min),this.updateVal(q.data,"stopx",e,Math.max),this.updateVal(q.data,"stopy",t,Math.max),this.updateBounds(n,r,e,t)},"insert"),newActivation:mt(function(e,t,r){var r=r.get(e.from),i=Hje(e.from).length||0,r=r.x+r.width/2+(i-1)*$.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+$.activationWidth,stopy:void 0,actor:e.from,anchored:_je.anchorElement(t)})},"newActivation"),endActivation:mt(function(e){return e=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from),this.activations.splice(e,1)[0]},"endActivation"),createLoop:mt(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:mt(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:mt(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:mt(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:mt(function(e){var t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:mt(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:mt(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=I.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return{bounds:this.data,models:this.models}},"getBounds")},$je=mt(async function(e,t,r){q.bumpVerticalPos($.boxMargin),t.height=$.boxMargin,t.starty=q.getVerticalPos();var i=K3(),r=(i.x=t.startx,i.y=t.starty,i.width=t.width||$.width,i.class="note",(e=e.append("g")).attr("data-et","note"),e.attr("data-id","i"+r),_je.drawRect(e,i)),e=((n=Z3()).x=t.startx,n.y=t.starty,n.width=i.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=$.noteFontFamily,n.fontSize=$.noteFontSize,n.fontWeight=$.noteFontWeight,n.anchor=$.noteAlign,n.textMargin=$.noteMargin,n.valign="center",Uc(n.text)?await Vqe(e,n):Yqe(e,n)),n=Math.round(e.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));r.attr("height",n+2*$.noteMargin),t.height+=n+2*$.noteMargin,q.bumpVerticalPos(n+2*$.noteMargin),t.stopy=t.starty+n+2*$.noteMargin,t.stopx=t.startx+i.width,q.insert(t.startx,t.starty,t.stopx,t.stopy),q.models.addNote(t)},"drawNote"),Fje=mt(function(e,t,r,i,n,a,s){let o=i.db.getActors(),l=o.get(t.from),c=o.get(t.to),h=r.sequenceVisible,u=l.x+l.width/2,d=c.x+c.width/2,p=u<=d,g=tWe(t,i),f=e.append("g"),m=mt((e,t)=>(e=e?16.5:-16.5,t?-e:e),"getCircleOffset"),y=mt(e=>{f.append("circle").attr("cx",e).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:v,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(h)switch(t.centralConnection){case v:g&&(d+=m(p,!0));break;case b:g||(u+=m(p,!1));break;case x:g?d+=m(p,!0):u+=m(p,!1)}switch(t.centralConnection){case v:y(d);break;case b:y(u);break;case x:y(u),y(d)}},"drawCentralConnection"),zje=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),qje=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),jje=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(Dje,"boundMessage"),Wje=mt(async function(h,u,d,p,g,f){var{startx:m,stopx:y,starty:e,message:t,type:v,sequenceIndex:b,sequenceVisible:r}=u,i=PC.calculateTextDimensions(t,zje($)),n=Z3();n.x=Math.min(m,y),n.y=e+10,n.width=Math.abs(y-m),n.class="messageText",n.dy="1em",n.text=t,n.fontFamily=$.messageFontFamily,n.fontSize=$.messageFontSize,n.fontWeight=$.messageFontWeight,n.anchor=$.messageAlign,n.valign="center",n.textMargin=$.wrapPadding,n.tspan=!1,Uc(n.text)?await Vqe(h,n,{startx:m,stopx:y,starty:d}):Yqe(h,n);let a=i.width,x,T=(m===y?(e=r||$.showSequenceNumbers,t=tWe(g,p),n=rWe(g,p),i=m+(e&&(t||n)?10:0),x=$.rightAngles?h.append("path").attr("d",`M ${i},${d} H ${m+I.getMax($.width/2,a/2)} V ${d+25} H `+m):h.append("path").attr("d","M "+i+","+d+" C "+(i+60)+","+(d-10)+" "+(m+60)+","+(d+30)+" "+m+","+(d+20))):((x=h.append("line")).attr("x1",m),x.attr("y1",d),x.attr("x2",y),x.attr("y2",d)),Jje(g,p)&&Fje(h,g,u,p,m,y,d),v===p.db.LINETYPE.DOTTED||v===p.db.LINETYPE.DOTTED_CROSS||v===p.db.LINETYPE.DOTTED_POINT||v===p.db.LINETYPE.DOTTED_OPEN||v===p.db.LINETYPE.BIDIRECTIONAL_DOTTED||v===p.db.LINETYPE.SOLID_TOP_DOTTED||v===p.db.LINETYPE.SOLID_BOTTOM_DOTTED||v===p.db.LINETYPE.STICK_TOP_DOTTED||v===p.db.LINETYPE.STICK_BOTTOM_DOTTED||v===p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0"),x.attr("data-et","message"),x.attr("data-id","i"+u.id),x.attr("data-from",u.from),x.attr("data-to",u.to),"");if($.arrowMarkerAbsolute&&(T=Oc(!0)),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),v!==p.db.LINETYPE.SOLID_TOP&&v!==p.db.LINETYPE.SOLID_TOP_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-solidTopArrowHead)"),v!==p.db.LINETYPE.SOLID_BOTTOM&&v!==p.db.LINETYPE.SOLID_BOTTOM_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-solidBottomArrowHead)"),v!==p.db.LINETYPE.STICK_TOP&&v!==p.db.LINETYPE.STICK_TOP_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-stickTopArrowHead)"),v!==p.db.LINETYPE.STICK_BOTTOM&&v!==p.db.LINETYPE.STICK_BOTTOM_DOTTED||x.attr("marker-end","url("+T+"#"+f+"-stickBottomArrowHead)"),v!==p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&v!==p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-solidBottomArrowHead)"),v!==p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&v!==p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-solidTopArrowHead)"),v!==p.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&v!==p.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-stickBottomArrowHead)"),v!==p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&v!==p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||x.attr("marker-start","url("+T+"#"+f+"-stickTopArrowHead)"),v!==p.db.LINETYPE.SOLID&&v!==p.db.LINETYPE.DOTTED||x.attr("marker-end","url("+T+"#"+f+"-arrowhead)"),v!==p.db.LINETYPE.BIDIRECTIONAL_SOLID&&v!==p.db.LINETYPE.BIDIRECTIONAL_DOTTED||(x.attr("marker-start","url("+T+"#"+f+"-arrowhead)"),x.attr("marker-end","url("+T+"#"+f+"-arrowhead)")),v!==p.db.LINETYPE.SOLID_POINT&&v!==p.db.LINETYPE.DOTTED_POINT||x.attr("marker-end","url("+T+"#"+f+"-filled-head)"),v!==p.db.LINETYPE.SOLID_CROSS&&v!==p.db.LINETYPE.DOTTED_CROSS||x.attr("marker-end","url("+T+"#"+f+"-crosshead)"),r||$.showSequenceNumbers){let e=v===p.db.LINETYPE.BIDIRECTIONAL_SOLID||v===p.db.LINETYPE.BIDIRECTIONAL_DOTTED,t=v===p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||v===p.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||v===p.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_TOP_REVERSE||v===p.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||v===p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||v===p.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r=Jje(g,p),i=m,n=y,a=void(e?(mn&&(n=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),Yje=mt(function(e){Ee($,e),e.fontFamily&&($.actorFontFamily=$.noteFontFamily=$.messageFontFamily=e.fontFamily),e.fontSize&&($.actorFontSize=$.noteFontSize=$.messageFontSize=e.fontSize),e.fontWeight&&($.actorFontWeight=$.noteFontWeight=$.messageFontWeight=e.fontWeight)},"setConf"),Hje=mt(function(t){return q.activations.filter(function(e){return e.actor===t})},"actorActivations"),Xje=mt(function(e,t){return t=t.get(e),[(e=Hje(e)).reduce(function(e,t){return I.getMin(e,t.startx)},t.x+t.width/2-1),e.reduce(function(e,t){return I.getMax(e,t.stopx)},t.x+t.width/2+1)]},"activationBounds"),mt(Mje,"adjustLoopHeightForWrap"),mt(Oje,"adjustCreatedDestroyedData"),Kje=mt(async function(i,e,O,n){var{securityLevel:t,sequence:r,look:a}=B();$=r;let s;"sandbox"===t&&(s=Q("#i"+e));var r=Q("sandbox"===t?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===t?s.nodes()[0].contentDocument:document;q.init(),P.debug(n.db);let l="sandbox"===t?r.select(`[id="${e}"]`):Q(`[id="${e}"]`),c=n.db.getActors(),h=n.db.getCreatedActors(),u=n.db.getDestroyedActors(),d=n.db.getBoxes(),p=n.db.getActorKeys(),g=n.db.getMessages(),f=n.db.getDiagramTitle(),m=n.db.hasAtLeastOneBox(),y=n.db.hasAtLeastOneBoxWithTitle(),v=await Pje(c,g,n);if($.height=await Bje(c,v,d),_je.insertComputerIcon(l,e),_je.insertDatabaseIcon(l,e),_je.insertClockIcon(l,e),m&&(q.bumpVerticalPos($.boxMargin),y)&&q.bumpVerticalPos(d[0].textMaxHeight),!0===$.hideUnusedParticipants){let t=new Set;g.forEach(e=>{t.add(e.from),t.add(e.to)}),p=p.filter(e=>t.has(e))}let b=new Map(p.map((e,t)=>[c.get(e)?.name??e,t]));Uje(l,c,h,p,0,g,!1);var x,T,k,w=await nWe(g,c,v,n);function C(e,t){var r=q.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),_je.drawActivation(l,r,t,$,Hje(e.from).length,n,b),q.insert(r.startx,t-10,r.stopx,t)}_je.insertArrowHead(l,e),_je.insertArrowCrossHead(l,e),_je.insertArrowFilledHead(l,e),_je.insertSequenceNumber(l,e),_je.insertSolidTopArrowHead(l,e),_je.insertSolidBottomArrowHead(l,e),_je.insertStickTopArrowHead(l,e),_je.insertStickBottomArrowHead(l,e),"neo"===a&&_je.insertDropShadow(l,$),mt(C,"activeEnd");let S=1,E=1,_=[],A=[],R=0;for(x of g){let e,t,r;switch(x.type){case n.db.LINETYPE.NOTE:q.resetVerticalPos(),t=x.noteModel,await $je(l,t,x.id);break;case n.db.LINETYPE.ACTIVE_START:case n.db.LINETYPE.CENTRAL_CONNECTION:case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:q.newActivation(x,l,c);break;case n.db.LINETYPE.ACTIVE_END:C(x,q.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.LOOP_END:e=q.endLoop(),await _je.drawLoop(l,e,"loop",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.RECT_START:Mje(w,x,$.boxMargin,$.boxMargin,e=>q.newLoop(void 0,e.message));break;case n.db.LINETYPE.RECT_END:e=q.endLoop(),A.push(e),q.models.addLoop(e),q.bumpVerticalPos(e.stopy-q.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.OPT_END:e=q.endLoop(),await _je.drawLoop(l,e,"opt",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.ALT_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.ALT_ELSE:Mje(w,x,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>q.addSectionToLoop(e));break;case n.db.LINETYPE.ALT_END:e=q.endLoop(),await _je.drawLoop(l,e,"alt",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e)),q.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Mje(w,x,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>q.addSectionToLoop(e));break;case n.db.LINETYPE.PAR_END:e=q.endLoop(),await _je.drawLoop(l,e,"par",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.AUTONUMBER:S=x.message.start||S,E=x.message.step||E,x.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.CRITICAL_OPTION:Mje(w,x,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>q.addSectionToLoop(e));break;case n.db.LINETYPE.CRITICAL_END:e=q.endLoop(),await _je.drawLoop(l,e,"critical",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;case n.db.LINETYPE.BREAK_START:Mje(w,x,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>q.newLoop(e));break;case n.db.LINETYPE.BREAK_END:e=q.endLoop(),await _je.drawLoop(l,e,"break",$,x),q.bumpVerticalPos(e.stopy-q.getVerticalPos()),q.models.addLoop(e);break;default:try{(r=x.msgModel).starty=q.getVerticalPos(),r.sequenceIndex=S,r.sequenceVisible=n.db.showSequenceNumbers(),r.id=x.id,r.from=x.from,r.to=x.to;var L=await Dje(l,r);Oje(x,r,L,R,c,h,u),_.push({messageModel:r,lineStartY:L,msg:x}),q.models.addMessage(r)}catch(i){P.error("error while drawing message",i)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,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(x.type)&&(S=Math.round(100*(S+E))/100),R++}P.debug("createdActors",h),P.debug("destroyedActors",u),await Gje(l,c,p,!1,e,n,b);for(T of _)await Wje(l,T.messageModel,T.lineStartY,n,T.msg,e);$.mirrorActors&&await Gje(l,c,p,!0,e,n,b),A.forEach(e=>_je.drawBackgroundRect(l,e)),Kqe(l,c,p,$);for(k of q.models.boxes){k.height=q.getVerticalPos()-k.y,q.insert(k.x,k.y,k.x+k.width,k.height);var I=2*$.boxMargin;k.startx=k.x-I,k.starty=k.y-.25*I,k.stopx=k.startx+k.width+2*I,k.stopy=k.starty+k.height+.75*I,k.stroke="rgb(0,0,0, 0.5)",_je.drawBox(l,k,$)}m&&q.bumpVerticalPos($.boxMargin),t=Vje(l,c,p,o),void 0===(r=q.getBounds().bounds).startx&&(r.startx=0),void 0===r.starty&&(r.starty=0),void 0===r.stopx&&(r.stopx=0),void 0===r.stopy&&(r.stopy=0);let N=r.stopy-r.starty,D=(Nl?-e:e,"adjustValue"),e.from===e.to?h=c:(e.activate&&!t&&(h+=i($.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(h+=i(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(c-=i(3))),t=[n,a,s,o],r=Math.abs(c-h),e.wrap&&e.message&&(e.message=PC.wrapLabel(e.message,I.getMax(r+2*$.wrapPadding,$.width),zje($))),i=PC.calculateTextDimensions(e.message,zje($)),{width:I.getMax(e.wrap?0:i.width+2*$.wrapPadding,r+2*$.wrapPadding,$.width),height:0,startx:c,stopx:h,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,t),toBounds:Math.max.apply(null,t)}},"buildMessageModel"),nWe=mt(async function(e,i,t,n){let a={},s=[],o,l,c;for(let r of e){switch(r.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:s.push({id:r.id,msg:r.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:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));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:o=s.pop(),a[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:var h=i.get(r.from||r.to.actor),u=Hje(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*$.activationWidth/2,stopx:h+$.activationWidth,actor:r.from,enabled:!0};q.activations.push(u);break;case n.db.LINETYPE.ACTIVE_END:h=q.activations.map(e=>e.actor).lastIndexOf(r.from),q.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Qje(r,i,n),r.noteModel=l,s.forEach(e=>{(o=e).from=I.getMin(o.from,l.startx),o.to=I.getMax(o.to,l.startx+l.width),o.width=I.getMax(o.width,Math.abs(o.from-o.to))-$.labelBoxWidth})):(c=iWe(r,i,n),(r.msgModel=c).startx&&c.stopx&&0{var t;o=e,c.startx===c.stopx?(e=i.get(r.from),t=i.get(r.to),o.from=I.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=I.getMax(t.x+c.width/2,t.x+e.width/2,o.to),o.width=I.getMax(o.width,Math.abs(o.to-o.from))-$.labelBoxWidth):(o.from=I.getMin(c.startx,o.from),o.to=I.getMax(c.stopx,o.to),o.width=I.getMax(o.width,c.width)-$.labelBoxWidth)}))}return q.activations=[],P.debug("Loop type widths:",a),a},"calculateLoopBounds"),aWe={bounds:q,drawActors:Gje,drawActorsPopup:Vje,setConf:Yje,draw:Kje}}),oWe={};Vat(oWe,{diagram:()=>lWe});var lWe,cWe,hWe,uWe,dWe,pWe,gWe,fWe,mWe,yWe,vWe,bWe,xWe,TWe,kWe,wWe=r(()=>{Rje(),Lje(),Ije(),Uu(),sWe(),lWe={parser:Aqe,get db(){return new Dqe},renderer:aWe,styles:Oqe,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Gh({sequence:{wrap:e.wrap}}))},"init")}}),CWe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,18],P=[1,19],B=[1,20],i=[1,41],$=[1,26],n=[1,42],F=[1,24],z=[1,25],a=[1,32],s=[1,33],q=[1,34],o=[1,45],j=[1,35],W=[1,36],U=[1,37],G=[1,38],V=[1,27],Y=[1,28],H=[1,29],X=[1,30],K=[1,31],l=[1,44],c=[1,46],h=[1,43],u=[1,47],Z=[1,9],d=[1,8,9],p=[1,58],g=[1,59],f=[1,60],m=[1,61],y=[1,62],Q=[1,63],J=[1,64],v=[1,8,9,41],ee=[1,77],b=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],x=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],T=[13,60,86,100,102,103],k=[13,60,73,74,86,100,102,103],te=[13,60,68,69,70,71,72,86,100,102,103],w=[1,103],C=[1,121],S=[1,117],E=[1,113],_=[1,119],A=[1,114],R=[1,115],L=[1,116],I=[1,118],N=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],D=[12,39],ne=[1,8,9,39,41,44,46],M=[1,8,9,22],ae=[1,153],se=[1,8,9,61],O=[1,8,9,22,50,60,61,82,86,87,88,89,90],x={trace:mt(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,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:i.addRelation(a[o]);break;case 20:a[o-1].title=i.cleanupLabel(a[o]),i.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[o-3],a[o-1][0],a[o-1][1]),i.popNamespace();break;case 35:i.addClassesToNamespace(a[o-4],a[o-1][0],a[o-1][1]),i.popNamespace();break;case 36:this.$=i.addNamespace(a[o]);break;case 37:this.$=i.addNamespace(a[o-1],a[o]);break;case 38:this.$=[[a[o]],[]];break;case 39:this.$=[[a[o-1]],[]];break;case 40:a[o][0].unshift(a[o-2]),this.$=a[o];break;case 41:this.$=[[],[a[o]]];break;case 42:this.$=[[],[a[o-1]]];break;case 43:a[o][1].unshift(a[o-2]),this.$=a[o];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[o];break;case 48:i.setCssClass(a[o-2],a[o]);break;case 49:i.addMembers(a[o-3],a[o-1]);break;case 51:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 52:i.addAnnotation(a[o-3],a[o-1]);break;case 53:i.addAnnotation(a[o-6],a[o-4]),i.addMembers(a[o-6],a[o-1]);break;case 54:i.addAnnotation(a[o-5],a[o-3]);break;case 55:this.$=a[o],i.addClass(a[o]);break;case 56:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 60:i.addAnnotation(a[o],a[o-2]);break;case 61:case 74:this.$=[a[o]];break;case 62:a[o].push(a[o-1]),this.$=a[o];break;case 63:break;case 64:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 65:case 66:break;case 67:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 69:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 70:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 71:this.$=i.addNote(a[o],a[o-1]);break;case 72:this.$=i.addNote(a[o]);break;case 73:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 75:this.$=a[o-2].concat([a[o]]);break;case 76:i.setDirection("TB");break;case 77:i.setDirection("BT");break;case 78:i.setDirection("RL");break;case 79:i.setDirection("LR");break;case 80:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 81:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 82:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 84:this.$=i.relationType.AGGREGATION;break;case 85:this.$=i.relationType.EXTENSION;break;case 86:this.$=i.relationType.COMPOSITION;break;case 87:this.$=i.relationType.DEPENDENCY;break;case 88:this.$=i.relationType.LOLLIPOP;break;case 89:this.$=i.lineType.LINE;break;case 90:this.$=i.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 92:case 98:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 93:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 94:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 95:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 96:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 99:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 100:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 101:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 102:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 103:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 104:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 105:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 106:i.setCssClass(a[o-1],a[o]);break;case 107:this.$=[a[o]];break;case 108:a[o-2].push(a[o]),this.$=a[o-2];break;case 110:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:P,37:B,38:22,42:i,43:23,46:$,48:n,51:F,52:z,54:a,56:s,57:q,60:o,62:j,63:W,64:U,65:G,75:V,76:Y,78:H,82:X,83:K,86:l,100:c,102:h,103:u},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Z,[2,5],{8:[1,48]}),{8:[1,49]},t(d,[2,19],{22:[1,50]}),t(d,[2,21]),t(d,[2,22]),t(d,[2,23]),t(d,[2,24]),t(d,[2,25]),t(d,[2,26]),t(d,[2,27]),t(d,[2,28]),t(d,[2,29]),t(d,[2,30]),{34:[1,51]},{36:[1,52]},t(d,[2,33]),t(d,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:p,69:g,70:f,71:m,72:y,73:Q,74:J}),{39:[1,65]},t(v,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(d,[2,65]),t(d,[2,66]),{16:69,60:o,86:l,100:c,102:h},{16:39,17:40,19:70,60:o,86:l,100:c,102:h,103:u},{16:39,17:40,19:71,60:o,86:l,100:c,102:h,103:u},{16:39,17:40,19:72,60:o,86:l,100:c,102:h,103:u},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:o,86:l,100:c,102:h,103:u},{13:ee,55:76},{58:78,60:[1,79]},t(d,[2,76]),t(d,[2,77]),t(d,[2,78]),t(d,[2,79]),t(b,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:o,86:l,100:c,102:h,103:u}),t(b,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:o,86:l,100:c,102:h,103:u},{16:39,17:40,19:87,60:o,86:l,100:c,102:h,103:u},t(x,[2,133]),t(x,[2,134]),t(x,[2,135]),t(x,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Z,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:r,35:P,37:B,42:i,46:$,48:n,51:F,52:z,54:a,56:s,57:q,60:o,62:j,63:W,64:U,65:G,75:V,76:Y,78:H,82:X,83:K,86:l,100:c,102:h,103:u}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:P,37:B,38:22,42:i,43:23,46:$,48:n,51:F,52:z,54:a,56:s,57:q,60:o,62:j,63:W,64:U,65:G,75:V,76:Y,78:H,82:X,83:K,86:l,100:c,102:h,103:u},t(d,[2,20]),t(d,[2,31]),t(d,[2,32]),{13:[1,91],16:39,17:40,19:90,60:o,86:l,100:c,102:h,103:u},{53:92,66:56,67:57,68:p,69:g,70:f,71:m,72:y,73:Q,74:J},t(d,[2,64]),{67:93,73:Q,74:J},t(T,[2,83],{66:94,68:p,69:g,70:f,71:m,72:y}),t(k,[2,84]),t(k,[2,85]),t(k,[2,86]),t(k,[2,87]),t(k,[2,88]),t(te,[2,89]),t(te,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:n,54:a,56:s},{16:100,60:o,86:l,100:c,102:h},{41:[1,102],45:101,51:w},{16:104,60:o,86:l,100:c,102:h},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:C,50:S,59:110,60:E,82:_,84:111,85:112,86:A,87:R,88:L,89:I,90:N},{60:[1,122]},{13:ee,55:123},t(v,[2,72]),t(v,[2,138]),{22:C,50:S,59:124,60:E,61:[1,125],82:_,84:111,85:112,86:A,87:R,88:L,89:I,90:N},t(re,[2,74]),{16:39,17:40,19:126,60:o,86:l,100:c,102:h,103:u},t(b,[2,16]),t(b,[2,17]),t(b,[2,18]),{11:127,12:ie,39:[2,36]},t(D,[2,9],{16:85,17:86,15:130,18:[1,129],60:o,86:l,100:c,102:h,103:u}),t(D,[2,10]),t(ne,[2,55],{11:131,12:ie}),t(Z,[2,7]),{9:[1,132]},t(M,[2,67]),{16:39,17:40,19:133,60:o,86:l,100:c,102:h,103:u},{13:[1,135],16:39,17:40,19:134,60:o,86:l,100:c,102:h,103:u},t(T,[2,82],{66:136,68:p,69:g,70:f,71:m,72:y}),t(T,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:n,54:a,56:s},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(v,[2,48],{39:[1,142]}),{41:[1,143]},t(v,[2,50]),{41:[2,61],45:144,51:w},{47:[1,145]},{16:39,17:40,19:146,60:o,86:l,100:c,102:h,103:u},t(d,[2,91],{13:[1,147]}),t(d,[2,93],{13:[1,149],77:[1,148]}),t(d,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(d,[2,105],{61:ae}),t(se,[2,107],{85:154,22:C,50:S,60:E,82:_,86:A,87:R,88:L,89:I,90:N}),t(O,[2,109]),t(O,[2,111]),t(O,[2,112]),t(O,[2,113]),t(O,[2,114]),t(O,[2,115]),t(O,[2,116]),t(O,[2,117]),t(O,[2,118]),t(O,[2,119]),t(d,[2,106]),t(v,[2,71]),t(d,[2,73],{61:ae}),{60:[1,155]},t(b,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:o,86:l,100:c,102:h,103:u},t(D,[2,12]),t(ne,[2,56]),{1:[2,4]},t(M,[2,69]),t(M,[2,68]),{16:39,17:40,19:158,60:o,86:l,100:c,102:h,103:u},t(T,[2,80]),t(v,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:n,54:a,56:s},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:n,54:a,56:s},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:n,54:a,56:s},{45:163,51:w},t(v,[2,49]),{41:[2,62]},t(v,[2,52],{39:[1,164]}),t(d,[2,60]),t(d,[2,92]),t(d,[2,94]),t(d,[2,95],{77:[1,165]}),t(d,[2,98]),t(d,[2,99],{13:[1,166]}),t(d,[2,101],{13:[1,168],77:[1,167]}),{22:C,50:S,60:E,82:_,84:169,85:112,86:A,87:R,88:L,89:I,90:N},t(O,[2,110]),t(re,[2,75]),{14:[1,170]},t(D,[2,11]),t(M,[2,70]),t(v,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:w},t(d,[2,96]),t(d,[2,100]),t(d,[2,102]),t(d,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:C,50:S,60:E,82:_,86:A,87:R,88:L,89:I,90:N}),t(ne,[2,8]),t(v,[2,51]),{41:[1,175]},t(v,[2,54]),t(d,[2,104]),t(v,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0>)/,/^(?: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,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,97,98],inclusive:!0}}};x.lexer=r,mt(e,"Parser"),(cWe=new((e.prototype=x).Parser=e)).parser=cWe,hWe=cWe}),SWe=r(()=>{Uu(),th(),uWe=["#","+","~","-",""],dWe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=Rc(e,B()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+$c(this.id);"method"===this.memberType&&(e+=`(${$c(this.parameters.trim())})`,this.returnType)&&(e+=" : "+$c(this.returnType)),e=e.trim();var t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e))&&(n=r[1]?r[1].trim():"",uWe.includes(n)&&(this.visibility=n),this.id=r[2],this.parameters=r[3]?r[3].trim():"",t=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===t)&&(n=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(n))&&(t=n,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=e.length,n=e.substring(0,1),i=e.substring(r-1),uWe.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(t=i),this.id=e.substring(""===this.visibility?0:1,""===t?r:r-1)),this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,i,n=(this.visibility?"\\"+this.visibility:"")+$c(this.id)+("method"===this.memberType?`(${$c(this.parameters)})`+(this.returnType?" : "+$c(this.returnType):""):"");this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),EWe=r(()=>{bk(),e(),Uu(),th(),zC(),Wu(),kk(),SWe(),An(),pWe="classId-",gWe=0,fWe=mt(e=>I.sanitizeText(e,B()),"sanitizeText"),mWe=class c{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=mt(e=>{let i=Q3();Q(e).select("svg").selectAll("g").filter(function(){return null!==Q(this).attr("title")}).on("mouseover",e=>{var t=Q(e.currentTarget),r=t.attr("title");r&&(e=e.currentTarget.getBoundingClientRect(),i.transition().duration(200).style("opacity",".9"),i.html(_n.sanitize(r)).style("left",window.scrollX+e.left+e.width/2+"px").style("top",window.scrollY+e.bottom+4+"px"),t.classed("hover",!0))}).on("mouseout",e=>{i.transition().duration(500).style("opacity",0),Q(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Bh,this.getAccTitle=$h,this.setAccDescription=Fh,this.getAccDescription=zh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getConfig=mt(()=>B().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{mt(this,"ClassDB")}splitClassNameAndType(e){let t=I.sanitizeText(e,B()),r="",i=t;return 0`:"")}addClass(e){var e=I.sanitizeText(e,B()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=I.sanitizeText(e,B()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`<${t}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:pWe+e+"-"+gWe}),gWe++)}addInterface(e,t){e={id:"interface"+this.interfaces.length,label:e,classId:t},this.interfaces.push(e)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){var t,e=I.sanitizeText(e,B());if(this.classes.has(e))return t=this.classes.get(e).domId,this.diagramId?this.diagramId+"-"+t:t;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",Ph()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){return this.notes.get("number"==typeof e?"note"+e:e)}getNotes(){return this.notes}addRelation(e){P.debug("Adding relation: "+JSON.stringify(e));var t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1!==this.relationType.LOLLIPOP||t.includes(e.relation.type2)?e.relation.type2!==this.relationType.LOLLIPOP||t.includes(e.relation.type1)?(this.addClass(e.id1),this.addClass(e.id2)):(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2="interface"+(this.interfaces.length-1)):(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1="interface"+(this.interfaces.length-1)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=I.sanitizeText(e.relationTitle1.trim(),B()),e.relationTitle2=I.sanitizeText(e.relationTitle2.trim(),B()),this.relations.push(e)}addAnnotation(e,t){e=this.splitClassNameAndType(e).className,this.classes.get(e).annotations.push(t)}addMember(e,t){this.addClass(e),e=this.splitClassNameAndType(e).className,e=this.classes.get(e),"string"==typeof t&&((t=t.trim()).startsWith("<<")&&t.endsWith(">>")?e.annotations.push(fWe(t.substring(2,t.length-2))):0this.addMember(t,e)))}addNote(e,t){var r=this.notes.size,t={id:"note"+r,class:t,text:e,index:r};return this.notes.set(t.id,t),t.id}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),fWe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=pWe+t),(e=this.classes.get(t))&&(e.cssClasses+=" "+r)})}defineClass(e,i){for(let t of e){let r=this.styleClasses.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.styleClasses.set(t,r)),i&&i.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.classes.forEach(e=>{e.cssClasses.includes(t)&&e.styles.push(...i.flatMap(e=>e.split(",")))})}}setTooltip(e,t){e.split(",").forEach(e=>{void 0!==t&&(this.classes.get(e).tooltip=fWe(t))})}getTooltip(e,t){return(t&&this.namespaces.has(t)?this.namespaces.get(t):this).classes.get(e).tooltip}setLink(e,r,i){let n=B();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=pWe+t),(e=this.classes.get(t))&&(e.link=PC.formatUrl(r,n),"sandbox"===n.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof i?fWe(i):"_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFunc(e,t,r),this.classes.get(e).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,i,n){if(e=I.sanitizeText(e,B()),"loose"===B().securityLevel&&void 0!==i){let t=e;if(this.classes.has(t)){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{var e=this.lookUpDomId(t);null!==(e=document.querySelector(`[id="${e}"]`))&&e.addEventListener("click",()=>{PC.runFunc(i,...r)},!1)})}}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){return(t=t.at(-1))?t+"."+e:e}static getAncestorIds(e){var t=e.split("."),r=new Array(t.length);r[0]=t[0];for(let e=1;e{nde(),yWe=mt(e=>`g.classGroup text { fill: ${e.nodeBorder||e.classText}; stroke: none; font-family: ${e.fontFamily}; font-size: 10px; .title { font-weight: bolder; } } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .cluster rect { fill: ${e.clusterBkg}; stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } .nodeLabel, .edgeLabel { color: ${e.classText}; } .noteLabel .nodeLabel, .noteLabel .edgeLabel { color: ${e.noteTextColor}; } .edgeLabel .label rect { fill: ${e.mainBkg}; } .label text { fill: ${e.classText}; } .labelBkg { background: ${e.mainBkg}; } .edgeLabel .label span { background: ${e.mainBkg}; } .classTitle { font-weight: bolder; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; } .divider { stroke: ${e.nodeBorder}; stroke-width: 1; } g.clickable { cursor: pointer; } g.classGroup rect { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } g.classGroup line { stroke: ${e.nodeBorder}; stroke-width: 1; } .classLabel .box { stroke: none; stroke-width: 0; fill: ${e.mainBkg}; opacity: 0.5; } .classLabel .label { fill: ${e.nodeBorder}; font-size: 10px; } .relation { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth}; fill: none; } .dashed-line{ stroke-dasharray: 3; } .dotted-line{ stroke-dasharray: 1 2; } [id$="-compositionStart"], .composition { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-compositionEnd"], .composition { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-dependencyStart"], .dependency { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-dependencyEnd"], .dependency { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-extensionStart"], .extension { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-extensionEnd"], .extension { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-aggregationStart"], .aggregation { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-aggregationEnd"], .aggregation { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-lollipopStart"], .lollipop { fill: ${e.mainBkg} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } [id$="-lollipopEnd"], .lollipop { fill: ${e.mainBkg} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } .edgeTerminals { font-size: 11px; line-height: initial; } .classTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } .edgeLabel[data-look="neo"] { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } ${Hue()} `,"getStyles"),vWe=yWe}),AWe=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),bWe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),xWe=mt(function(e,t){return t.db.getClasses()},"getClasses"),TWe=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing class diagram (v3)",t);var{securityLevel:n,state:a,layout:s}=B(),o=(i.db.setDiagramId(t),i.db.getData()),n=tI(t,n);o.type=i.type,o.layoutAlgorithm=Bue(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Pue(o,n),PC.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),kWe={getClasses:xWe,draw:TWe,getDir:bWe}}),RWe={};Vat(RWe,{diagram:()=>LWe});var LWe,IWe=r(()=>{CWe(),EWe(),_We(),AWe(),LWe={parser:hWe,get db(){return new mWe},renderer:kWe,styles:vWe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),NWe={};Vat(NWe,{diagram:()=>DWe});var DWe,MWe,OWe,PWe,BWe,$We,FWe,zWe,qWe,jWe,WWe,UWe,GWe,VWe,YWe,HWe,XWe,KWe,ZWe,QWe,JWe,eUe,tUe,rUe,iUe,nUe,aUe,sUe,oUe,lUe,cUe,hUe,uUe,dUe,pUe,gUe,fUe=r(()=>{CWe(),EWe(),_We(),AWe(),DWe={parser:hWe,get db(){return new mWe},renderer:kWe,styles:vWe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),mUe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,2],i=[1,3],n=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],b=[1,27],x=[1,28],T=[1,29],k=[1,30],w=[1,31],C=[1,32],S=[1,35],E=[1,36],_=[1,37],A=[1,38],R=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],N=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r={trace:mt(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,"--\x3e":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,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",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:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"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],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=i.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=i.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:i,6:n},{1:[3]},{3:5,4:r,5:i,6:n},{3:6,4:r,5:i,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(I,[2,44],{58:[1,56]}),t(I,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:R},t(L,[2,17]),t(N,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(I,[2,46]),t(I,[2,47]),t(L,[2,15]),t(L,[2,19]),t(N,a,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,81],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:k,45:w,48:C,51:S,52:E,53:_,54:A,57:R},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0>)/i,/^(?:.*<>)/i,/^(?:.*<>)/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,/^(?:\})/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]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],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:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};r.lexer=i,mt(e,"Parser"),(MWe=new((e.prototype=r).Parser=e)).parser=MWe,OWe=MWe}),yUe=r(()=>{BWe="root",$We="relation",FWe="classDef",zWe="style",qWe="applyClass",jWe="default",UWe="fill:none",GWe="fill: #333",VWe="markdown",YWe="normal",HWe="rect",XWe="rectWithTitle",KWe="stateStart",ZWe="stateEnd",QWe=WWe="divider",JWe="roundedWithTitle",tUe="noteGroup",iUe=(rUe="statediagram")+"-state",aUe=(nUe="transition")+" note-edge",sUe=rUe+"-note",oUe=rUe+"-cluster",lUe=rUe+"-cluster-alt",uUe=PWe="state",pUe=(dUe="----")+(hUe=eUe="note"),gUe=""+dUe+(cUe="parent")});function vUe(e="",t=0,r="",i=dUe){return i=null!==r&&0"!==t.id&&""!==t.id&&(t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(e=>{(e=r.get(e))&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...e.styles])})),(i=e.find(e=>e.id===t.id))?Object.assign(i,t):e.push(t))}function xUe(e){return e?.classes?.join(" ")??""}function TUe(e){return e?.styles??[]}var kUe,wUe,CUe,SUe,EUe,_Ue,AUe,RUe,LUe,IUe,NUe,DUe,MUe,OUe,PUe,BUe,$Ue,FUe,zUe,qUe,jUe,WUe,UUe,GUe,VUe,YUe,HUe,XUe,KUe,ZUe,QUe,JUe,eGe,tGe,rGe,iGe,nGe,aGe=r(()=>{Uu(),e(),th(),yUe(),kUe=new Map,wUe=0,mt(vUe,"stateDomId"),CUe=mt((r,e,i,n,a,s,o,l)=>{P.trace("items",e),e.forEach(e=>{switch(e.stmt){case PWe:case jWe:EUe(r,e,i,n,a,s,o,l);break;case $We:EUe(r,e.state1,i,n,a,s,o,l),EUe(r,e.state2,i,n,a,s,o,l);var t={id:"edge"+wUe,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"neo"===o?"arrow_barb_neo":"arrow_barb",style:UWe,labelStyle:"",label:I.sanitizeText(e.description??"",B()),arrowheadStyle:GWe,labelpos:"c",labelType:VWe,thickness:YWe,classes:nUe,look:o};a.push(t),wUe++}})},"setupDoc"),SUe=mt((e,t="TB")=>{let r=t;if(e.doc)for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),mt(bUe,"insertOrUpdateNode"),mt(xUe,"getClassesFromDbInfo"),mt(TUe,"getStylesFromDbInfo"),EUe=mt((r,i,e,n,a,t,s,o)=>{var l=i.id,c=e.get(l),h=xUe(c),u=TUe(c),d=B();if(P.info("dataFetcher parsedItem",i,c,u),"root"!==l){let e=HWe;if(!0===i.start?e=KWe:!1===i.start&&(e=ZWe),i.type!==jWe&&(e=i.type),kUe.get(l)||kUe.set(l,{id:l,shape:e,description:I.sanitizeText(l,d),cssClasses:h+" "+iUe,cssStyles:u}),c=kUe.get(l),i.description&&(Array.isArray(c.description)?(c.shape=XWe,c.description.push(i.description)):c.description?.length&&0{kUe.clear(),wUe=0},"reset")}),sGe=r(()=>{Uu(),e(),fI(),Jue(),ede(),zC(),yUe(),AUe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),RUe=mt(function(e,t){return t.db.getClasses()},"getClasses"),LUe=mt(async function(e,t,r,i){P.info("REF0:"),P.info("Drawing state diagram (v2)",t);var{securityLevel:n,state:a,layout:s}=B();i.db.extract(i.db.getRootDocV2());let o=i.db.getData(),l=tI(t,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,"neo"===B().look?o.markers=["barbNeo"]:o.markers=["barb"],o.diagramId=t,await Pue(o,l);try{("function"==typeof i.db.getLinks?i.db.getLinks():new Map).forEach((a,e)=>{let s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(s){let e=l.node()?.querySelectorAll("g"),t,r,i,n;e?.forEach(e=>{e.textContent?.trim()===s&&(t=e)}),t?(r=t.parentNode)?(i=document.createElementNS("http://www.w3.org/2000/svg","a"),n=a.url.replace(/^"+|"+$/g,""),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n),i.setAttribute("target","_blank"),a.tooltip&&(n=a.tooltip.replace(/^"+|"+$/g,""),i.setAttribute("title",n)),r.replaceChild(i,t),i.appendChild(t),P.info("🔗 Wrapped node in
tag for:",s,a.url)):P.warn("⚠️ Node has no parent, cannot wrap:",s):P.warn("⚠️ Could not find node matching text:",s)}else P.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){P.error("❌ Error injecting clickable links:",e)}PC.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),$ue(l,8,rUe,a?.useMaxWidth??!0)},"draw"),IUe={getClasses:RUe,draw:LUe,getDir:AUe}}),oGe=r(()=>{Uu(),e(),zC(),th(),Wu(),aGe(),sGe(),yUe(),NUe={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},DUe=mt(()=>new Map,"newClassesList"),MUe=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),OUe=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),PUe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=DUe(),this.documents={root:MUe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=$h,this.setAccTitle=Bh,this.getAccDescription=zh,this.setAccDescription=Fh,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{mt(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(var t of Array.isArray(e)?e:e.doc)switch(t.stmt){case PWe:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case $We:this.addRelation(t.state1,t.state2,t.description);break;case FWe:this.addStyleClass(t.id.trim(),t.classes);break;case zWe:this.handleStyleDef(t);break;case qWe:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),i=B();_Ue(),EUe(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,i.look,this.classes);for(r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&0e.replace(/;/g,"")?.trim()))}}setRootDoc(e){P.info("Setting root doc",e),this.rootDoc=e,1===this.version?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(r,i,e){if(i.stmt===$We)this.docTranslator(r,i.state1,!0),this.docTranslator(r,i.state2,!1);else if(i.stmt===PWe&&(i.id===NUe.START_NODE?(i.id=r.id+(e?"_start":"_end"),i.start=e):i.id=i.id.trim()),(i.stmt===BWe||i.stmt===PWe)&&i.doc){let e=[],t=[];for(var n of i.doc){var a;n.type===WWe?((a=OUe(n)).doc=OUe(t),e.push(a),t=[]):t.push(n)}0this.docTranslator(i,e,!0))}}getRootDocV2(){return this.docTranslator({id:BWe,stmt:BWe},{id:BWe,stmt:BWe,doc:this.rootDoc},!0),{id:BWe,doc:this.rootDoc}}addState(e,t=jWe,r=void 0,i=void 0,n=void 0,a=void 0,s=void 0,o=void 0){let l=e?.trim();if(this.currentDocument.states.has(l)){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.doc||(e.doc=r),e.type||(e.type=t)}else P.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:PWe,id:l,descriptions:[],type:t,doc:r,note:n,classes:[],styles:[],textStyles:[]});if(i&&(P.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(l,e.trim()))),n){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.note=n,e.note.text=I.sanitizeText(e.note.text,B())}a&&(P.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(P.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(P.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:MUe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=DUe(),e||(this.links=new Map,Ph())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){P.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),P.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===NUe.START_NODE?(this.startEndCount++,""+NUe.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=jWe){return e===NUe.START_NODE?NUe.START_TYPE:t}endIdIfNeeded(e=""){return e===NUe.END_NODE?(this.startEndCount++,""+NUe.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=jWe){return e===NUe.END_NODE?NUe.END_TYPE:t}addRelationObjs(e,t,r=""){var i=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(i,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:I.sanitizeText(r,B())})}addRelation(e,t,r){var i,n;"object"==typeof e&&"object"==typeof t?this.addRelationObjs(e,t,r):"string"==typeof e&&"string"==typeof t&&(i=this.startIdIfNeeded(e.trim()),e=this.startTypeIfNeeded(e),n=this.endIdIfNeeded(t.trim()),t=this.endTypeIfNeeded(t),this.addState(i,e),this.addState(n,t),this.currentDocument.relations.push({id1:i,id2:n,relationTitle:r?I.sanitizeText(r,B()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(I.sanitizeText(t,B()))}cleanupLabel(e){return(e.startsWith(":")?e.slice(2):e).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(e,t=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let r=this.classes.get(e);t&&r&&t.split(NUe.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(NUe.COLOR_KEYWORD).exec(e)&&(e=t.replace(NUe.FILL_KEYWORD,NUe.BG_FILL).replace(NUe.COLOR_KEYWORD,NUe.FILL_KEYWORD),r.textStyles.push(e)),r.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,r){e.split(",").forEach(e=>{let t=this.getState(e);t||(e=e.trim(),this.addState(e),t=this.getState(e)),t?.classes?.push(r)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>"dir"===e.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(e){var t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return(e.startsWith(":")?e.slice(1):e).trim()}getData(){var e=B();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:AUe(this.getRootDocV2())}}getConfig(){return B().state}}}),lGe=r(()=>{BUe=mt(e=>` defs [id$="-barbEnd"] { fill: ${e.transitionColor}; stroke: ${e.transitionColor}; } g.stateGroup text { fill: ${e.nodeBorder}; stroke: none; font-size: 10px; } g.stateGroup text { fill: ${e.textColor}; stroke: none; font-size: 10px; } g.stateGroup .state-title { font-weight: bolder; fill: ${e.stateLabelColor}; } g.stateGroup rect { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } g.stateGroup line { stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth||1}; } .transition { stroke: ${e.transitionColor}; stroke-width: ${e.strokeWidth||1}; fill: none; } .stateGroup .composit { fill: ${e.background}; border-bottom: 1px } .stateGroup .alt-composit { fill: #e0e0e0; border-bottom: 1px } .state-note { stroke: ${e.noteBorderColor}; fill: ${e.noteBkgColor}; text { fill: ${e.noteTextColor}; stroke: none; font-size: 10px; } } .stateLabel .box { stroke: none; stroke-width: 0; fill: ${e.mainBkg}; opacity: 0.5; } .edgeLabel .label rect { fill: ${e.labelBackgroundColor}; opacity: 0.5; } .edgeLabel { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } .edgeLabel .label text { fill: ${e.transitionLabelColor||e.tertiaryTextColor}; } .label div .edgeLabel { color: ${e.transitionLabelColor||e.tertiaryTextColor}; } .stateLabel text { fill: ${e.stateLabelColor}; font-size: 10px; font-weight: bold; } .node circle.state-start { fill: ${e.specialStateColor}; stroke: ${e.specialStateColor}; } .node .fork-join { fill: ${e.specialStateColor}; stroke: ${e.specialStateColor}; } .node circle.state-end { fill: ${e.innerEndBackground}; stroke: ${e.background}; stroke-width: 1.5 } .end-state-inner { fill: ${e.compositeBackground||e.background}; // stroke: ${e.background}; stroke-width: 1.5 } .node rect { fill: ${e.stateBkg||e.mainBkg}; stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: ${e.strokeWidth||1}px; } .node polygon { fill: ${e.mainBkg}; stroke: ${e.stateBorder||e.nodeBorder};; stroke-width: ${e.strokeWidth||1}px; } [id$="-barbEnd"] { fill: ${e.lineColor}; } .statediagram-cluster rect { fill: ${e.compositeTitleBackground}; stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: ${e.strokeWidth||1}px; } .cluster-label, .nodeLabel { color: ${e.stateLabelColor}; // line-height: 1; } .statediagram-cluster rect.outer { rx: 5px; ry: 5px; } .statediagram-state .divider { stroke: ${e.stateBorder||e.nodeBorder}; } .statediagram-state .title-state { rx: 5px; ry: 5px; } .statediagram-cluster.statediagram-cluster .inner { fill: ${e.compositeBackground||e.background}; } .statediagram-cluster.statediagram-cluster-alt .inner { fill: ${e.altBackground||"#efefef"}; } .statediagram-cluster .inner { rx:0; ry:0; } .statediagram-state rect.basic { rx: 5px; ry: 5px; } .statediagram-state rect.divider { stroke-dasharray: 10,10; fill: ${e.altBackground||"#efefef"}; } .note-edge { stroke-dasharray: 5; } .statediagram-note rect { fill: ${e.noteBkgColor}; stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note rect { fill: ${e.noteBkgColor}; stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note text { fill: ${e.noteTextColor}; } .statediagram-note .nodeLabel { color: ${e.noteTextColor}; } .statediagram .edgeLabel { color: red; // ${e.noteTextColor}; } [id$="-dependencyStart"], [id$="-dependencyEnd"] { fill: ${e.lineColor}; stroke: ${e.lineColor}; stroke-width: ${e.strokeWidth||1}; } .statediagramTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } [data-look="neo"].statediagram-cluster rect { fill: ${e.mainBkg}; stroke: ${e.useGradient?"url("+e.svgId+"-gradient)":e.stateBorder||e.nodeBorder}; stroke-width: ${e.strokeWidth??1}; } [data-look="neo"].statediagram-cluster rect.outer { rx: ${e.radius}px; ry: ${e.radius}px; filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${e.svgId}-drop-shadow)`):"none"} } `,"getStyles"),$Ue=BUe}),cGe=r(()=>{bk(),oGe(),zC(),th(),Uu(),e(),FUe=mt(e=>e.append("circle").attr("class","start-state").attr("r",B().state.sizeUnit).attr("cx",B().state.padding+B().state.sizeUnit).attr("cy",B().state.padding+B().state.sizeUnit),"drawStartState"),zUe=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",B().state.textHeight).attr("class","divider").attr("x2",2*B().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),qUe=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*B().state.padding).attr("y",B().state.textHeight+2*B().state.padding).attr("font-size",B().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",B().state.padding).attr("y",B().state.padding).attr("width",r.width+2*B().state.padding).attr("height",r.height+2*B().state.padding).attr("rx",B().state.radius),t},"drawSimpleState"),jUe=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*B().state.padding).text(t),r||e.attr("dy",B().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*B().state.padding).attr("y",B().state.textHeight+1.3*B().state.padding).attr("font-size",B().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),n=i.height,a=e.append("text").attr("x",B().state.padding).attr("y",n+.4*B().state.padding+B().state.dividerMargin+B().state.textHeight).attr("class","state-description"),s=!0,o=!0;t.descriptions.forEach(function(e){s||(r(a,e,o),o=!1),s=!1});var t=e.append("line").attr("x1",B().state.padding).attr("y1",B().state.padding+n+B().state.dividerMargin/2).attr("y2",B().state.padding+n+B().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,i.width);return t.attr("x2",c+3*B().state.padding),e.insert("rect",":first-child").attr("x",B().state.padding).attr("y",B().state.padding).attr("width",c+2*B().state.padding).attr("height",l.height+n+2*B().state.padding).attr("rx",B().state.radius),e},"drawDescrState"),WUe=mt((e,t,r)=>{let i=B().state.padding,n=2*B().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",B().state.titleShift).attr("font-size",B().state.fontSize).attr("class","state-title").text(t.id),c=l.node().getBBox().width+n,h=Math.max(c,s);h===s&&(h+=n);let u,d=e.node().getBBox();return t.doc,u=o-i,s(e.append("circle").attr("class","end-state-outer").attr("r",B().state.sizeUnit+B().state.miniPadding).attr("cx",B().state.padding+B().state.sizeUnit+B().state.miniPadding).attr("cy",B().state.padding+B().state.sizeUnit+B().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",B().state.sizeUnit).attr("cx",B().state.padding+B().state.sizeUnit+2).attr("cy",B().state.padding+B().state.sizeUnit+2)),"drawEndState"),GUe=mt((e,t)=>{let r=B().state.forkWidth,i=B().state.forkHeight;return t.parentId&&(t=r,r=i,i=t),e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",B().state.padding).attr("y",B().state.padding)},"drawForkJoinState"),VUe=mt((e,t,r,i)=>{let n=0,a=i.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),e.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).split(I.lineBreakRegex),l=1.25*B().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),n+=l,h.attr("x",t+B().state.noteMargin),h.attr("y",r+n+1.25*B().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),YUe=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",B().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=VUe(e,0,0,t);return r.attr("height",t+2*B().state.noteMargin),r.attr("width",e+2*B().state.noteMargin),r},"drawNote"),HUe=mt(function(e,t){var r={id:i=t.id,label:t.id,width:0,height:0},e=e.append("g").attr("id",i).attr("class","stateGroup"),i=("start"===t.type&&FUe(e),"end"===t.type&&UUe(e),"fork"!==t.type&&"join"!==t.type||GUe(e,t),"note"===t.type&&YUe(t.note.text,e),"divider"===t.type&&zUe(e),"default"===t.type&&0===t.descriptions.length&&qUe(e,t),"default"===t.type&&0!Number.isNaN(e.y));let e=h.points,t=w5().x(function(e){return e.x}).y(function(e){return e.y}).curve(F5),r=c.append("path").attr("d",t(e)).attr("id","edge"+XUe).attr("class","transition"),i="";if(B().state.arrowMarkerAbsolute&&(i=Oc(!0)),r.attr("marker-end","url("+i+"#"+d(PUe.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:i}=PC.calcLabelPosition(h.points),n=I.getRows(u.title),a=0,s=[],o=0,l=0;for(let e=0;e<=n.length;e++){var p=t.append("text").attr("text-anchor","middle").text(n[e]).attr("x",r).attr("y",i+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),P.info(g.x,r,i+a),0===a&&(a=p.node().getBBox().height,P.info("Title height",a,i)),s.push(p)}let e=a*n.length;if(1e.attr("y",i+t*a-r)),e=a*n.length}d=t.node().getBBox(),t.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-B().state.padding/2).attr("y",i-e/2-B().state.padding/2-3.5).attr("width",o+B().state.padding).attr("height",e+B().state.padding),P.info(d)}XUe++},"drawEdge")}),hGe=r(()=>{bk(),bZ(),sH(),e(),th(),cGe(),Uu(),Ch(),QUe={},JUe=mt(function(){},"setConf"),eGe=mt(function(e){e.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"),tGe=mt(function(e,t,r,i){ZUe=B().state;let n=B().securityLevel,a;"sandbox"===n&&(a=Q("#i"+t));var s=Q("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===n?a.nodes()[0].contentDocument:document,e=(P.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),l=(eGe(e),i.db.getRootDoc()),t=e.append("g").attr("id",t+"-root"),l=(iGe(l,t,void 0,!1,s,o,i),ZUe.padding),s=(t=e.node().getBBox()).width+2*l;yh(e,o=t.height+2*l,1.75*s,ZUe.useMaxWidth),e.attr("viewBox",`${t.x-ZUe.padding} ${t.y-ZUe.padding} `+s+" "+o)},"draw"),rGe=mt(e=>e?e.length*ZUe.fontSizeFactor:1,"getLabelWidth"),iGe=mt((e,t,r,i,n,a,s)=>{let o=new nH({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let t=e.parentElement,r=0,i=0;t&&(t.parentElement&&(r=t.parentElement.getBBox().width),i=parseInt(t.getAttribute("data-x-shift"),10),Number.isNaN(i))&&(i=0),e.setAttribute("x1",0-i+8),e.setAttribute("x2",r-i-8)})):P.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(P.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),KUe(t,o.edge(e),o.edge(e).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*ZUe.padding,v.height=d.height+2*ZUe.padding,P.debug("Doc rendered",v,o),v},"renderDoc"),nGe={setConf:JUe,draw:tGe}}),uGe={};Vat(uGe,{diagram:()=>dGe});var dGe,pGe=r(()=>{mUe(),oGe(),lGe(),hGe(),dGe={parser:OWe,get db(){return new PUe(1)},renderer:nGe,styles:$Ue,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),gGe={};Vat(gGe,{diagram:()=>fGe});var fGe,mGe,yGe,vGe,bGe,xGe,TGe,kGe,wGe,CGe,SGe,EGe,_Ge,AGe,RGe,LGe,IGe,NGe,DGe,MGe,OGe,PGe,BGe,$Ge,FGe,zGe,qGe,jGe,WGe,UGe,GGe,VGe=r(()=>{mUe(),oGe(),lGe(),sGe(),fGe={parser:OWe,get db(){return new PUe(2)},renderer:IUe,styles:$Ue,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),YGe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,18],i=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],i={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:i.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:a,16:s,17:o,18:l},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:i,12:n,14:a,16:s,17:o,18:l},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,16]},{15:[1,17]},t(r,[2,11]),t(r,[2,12]),{19:[1,18]},t(r,[2,4]),t(r,[2,9]),t(r,[2,10]),t(r,[2,13])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{Uu(),Wu(),vGe="",bGe=[],xGe=[],TGe=[],kGe=mt(function(){bGe.length=0,xGe.length=0,vGe="",TGe.length=0,Ph()},"clear"),wGe=mt(function(e){vGe=e,bGe.push(e)},"addSection"),CGe=mt(function(){return bGe},"getSections"),SGe=mt(function(){let e=RGe(),t=0;for(;!e&&t<100;)e=RGe(),t++;return xGe.push(...TGe),xGe},"getTasks"),EGe=mt(function(){let t=[];return xGe.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),_Ge=mt(function(e,t){let r=t.substr(1).split(":"),i=0;t=(1===r.length?(i=Number(r[0]),[]):(i=Number(r[0]),r[1].split(","))).map(e=>e.trim()),t={section:vGe,type:vGe,people:t,task:e,score:i},TGe.push(t)},"addTask"),AGe=mt(function(e){e={section:vGe,type:vGe,description:e,task:e,classes:[]},xGe.push(e)},"addTaskOrg"),RGe=mt(function(){let e=mt(function(e){return TGe[e].processed},"compileTask"),t=!0;for(var[r,i]of TGe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),LGe=mt(function(){return EGe()},"getActors"),IGe={getConfig:mt(()=>B().journey,"getConfig"),clear:kGe,setDiagramTitle:qh,getDiagramTitle:jh,setAccTitle:Bh,getAccTitle:$h,setAccDescription:Fh,getAccDescription:zh,addSection:wGe,getSections:CGe,getTasks:SGe,addTask:_Ge,addTaskOrg:AGe,getActors:LGe}}),XGe=r(()=>{nde(),NGe=mt(e=>`.label { font-family: ${e.fontFamily}; color: ${e.textColor}; } .mouth { stroke: #666; } line { stroke: ${e.textColor} } .legend { fill: ${e.textColor}; font-family: ${e.fontFamily}; } .label text { fill: #333; } .label { color: ${e.textColor} } .face { ${e.faceColor?"fill: "+e.faceColor:"fill: #FFF8DC"}; stroke: #999; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePath .path { stroke: ${e.lineColor}; stroke-width: 1.5px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; rect { opacity: 0.5; } text-align: center; } .cluster rect { } .cluster text { fill: ${e.titleColor}; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .task-type-0, .section-type-0 { ${e.fillType0?"fill: "+e.fillType0:""}; } .task-type-1, .section-type-1 { ${e.fillType0?"fill: "+e.fillType1:""}; } .task-type-2, .section-type-2 { ${e.fillType0?"fill: "+e.fillType2:""}; } .task-type-3, .section-type-3 { ${e.fillType0?"fill: "+e.fillType3:""}; } .task-type-4, .section-type-4 { ${e.fillType0?"fill: "+e.fillType4:""}; } .task-type-5, .section-type-5 { ${e.fillType0?"fill: "+e.fillType5:""}; } .task-type-6, .section-type-6 { ${e.fillType0?"fill: "+e.fillType6:""}; } .task-type-7, .section-type-7 { ${e.fillType0?"fill: "+e.fillType7:""}; } .actor-0 { ${e.actor0?"fill: "+e.actor0:""}; } .actor-1 { ${e.actor1?"fill: "+e.actor1:""}; } .actor-2 { ${e.actor2?"fill: "+e.actor2:""}; } .actor-3 { ${e.actor3?"fill: "+e.actor3:""}; } .actor-4 { ${e.actor4?"fill: "+e.actor4:""}; } .actor-5 { ${e.actor5?"fill: "+e.actor5:""}; } ${Hue()} `,"getStyles"),DGe=NGe}),KGe=r(()=>{function t(e,t,r,i,n,a,s,o){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(//gi);for(let e=0;e{var t=r.actors[e].color,t={cx:s,cy:r.y,r:7,fill:t,stroke:"#000",title:e,pos:r.actors[e].position};PGe(a,t),s+=10}),WGe(t)(r.task,a,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),jGe=mt(function(e,t){V3(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),WGe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},UGe=mt(function(e,t){zGe=-1,e.append("defs").append("marker").attr("id",t+"-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"),GGe={drawRect:MGe,drawCircle:PGe,drawSection:FGe,drawText:BGe,drawLabel:$Ge,drawTask:qGe,drawBackgroundRect:jGe,initGraphics:UGe}});function ZGe(s){let i=B().journey,o=i.maxLabelWidth,l=(eVe=0,60);Object.keys(JGe).forEach(t=>{var e=JGe[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:JGe[t].position};GGe.drawCircle(s,e);let n=s.append("text").attr("visibility","hidden").text(t),r=n.node().getBoundingClientRect().width,a=(n.remove(),[]);if(r<=o)a=[t];else{let e=t.split(" "),i="";n=s.append("text").attr("visibility","hidden"),e.forEach(t=>{var e=i?i+" "+t:t;if(n.text(e),n.node().getBoundingClientRect().width>o){if(i&&a.push(i),i=t,n.text(t),n.node().getBoundingClientRect().width>o){let e="";for(var r of t)e+=r,n.text(e+"-"),n.node().getBoundingClientRect().width>o&&(a.push(e.slice(0,-1)+"-"),e=r);i=e}}else i=e}),i&&a.push(i),n.remove()}a.forEach((e,t)=>{t={x:40,y:l+7+20*t,fill:"#666",text:e,textMargin:i.boxTextMargin??5},e=GGe.drawText(s,t).node().getBoundingClientRect().width,eVei.leftMargin-e&&(eVe=e)}),l+=Math.max(20,20*a.length)})}var QGe,JGe,eVe,tVe,rVe,iVe,nVe,aVe,sVe,oVe,lVe,cVe=r(()=>{bk(),KGe(),Uu(),Ch(),QGe=mt(function(t){Object.keys(t).forEach(function(e){tVe[e]=t[e]})},"setConf"),JGe={},eVe=0,mt(ZGe,"drawActorLegend"),tVe=B().journey,rVe=0,iVe=mt(function(e,t,r,i){let n=B(),a=n.journey.titleColor,s=n.journey.titleFontSize,o=n.journey.titleFontFamily,l=n.securityLevel,c;"sandbox"===l&&(c=Q("#i"+t));var h,u=Q("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(nVe.init(),u.select("#"+t)),d=(GGe.initGraphics(u,t),i.db.getTasks()),p=i.db.getDiagramTitle(),i=i.db.getActors();for(h in JGe)delete JGe[h];let g=0;i.forEach(e=>{JGe[e]={color:tVe.actorColours[g%tVe.actorColours.length],position:g},g++}),ZGe(u),rVe=tVe.leftMargin+eVe,nVe.insert(0,0,rVe,50*Object.keys(JGe).length),oVe(u,d,0,t);var i=nVe.getBounds(),d=(p&&u.append("text").text(p).attr("x",rVe).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),i.stopy-i.starty+2*tVe.diagramMarginY),f=rVe+i.stopx+2*tVe.diagramMarginX,t=(yh(u,d,f,tVe.useMaxWidth),u.append("line").attr("x1",rVe).attr("y1",4*tVe.height).attr("x2",f-rVe-4).attr("y2",4*tVe.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)"),p?70:0);u.attr("viewBox",i.startx+` -25 ${f} `+(d+t)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",d+t+25)},"draw"),nVe={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:mt(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:mt(function(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:mt(function(i,n,a,s){let o=B().journey,l=this,c=0;function e(r){return mt(function(e){c++;var t=l.sequenceItems.length-c+1;l.updateVal(e,"starty",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(nVe.data,"startx",i-t*o.boxMargin,Math.min),l.updateVal(nVe.data,"stopx",a+t*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(e,"startx",i-t*o.boxMargin,Math.min),l.updateVal(e,"stopx",a+t*o.boxMargin,Math.max),l.updateVal(nVe.data,"starty",n-t*o.boxMargin,Math.min),l.updateVal(nVe.data,"stopy",s+t*o.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e())},"updateBounds"),insert:mt(function(e,t,r,i){var n=Math.min(e,r),e=Math.max(e,r),r=Math.min(t,i),t=Math.max(t,i);this.updateVal(nVe.data,"startx",n,Math.min),this.updateVal(nVe.data,"starty",r,Math.min),this.updateVal(nVe.data,"stopx",e,Math.max),this.updateVal(nVe.data,"stopy",t,Math.max),this.updateBounds(n,r,e,t)},"insert"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return this.data},"getBounds")},aVe=tVe.sectionFills,sVe=tVe.sectionColours,oVe=mt(function(e,i,t,r){let n=B().journey,a="",s=2*n.height+n.diagramMarginY,o=t+s,l=0,c="#CCC",h="black",u=0;for(var[d,p]of i.entries()){if(a!==p.section){c=aVe[l%aVe.length],u=l%aVe.length,h=sVe[l%sVe.length];let t=0,r=p.section;for(let e=d;e(JGe[t]&&(e[t]=JGe[t]),e),{}),p.x=d*n.taskMargin+d*n.width+rVe,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=c,p.num=u,p.actors=g,GGe.drawTask(e,p,n,r),nVe.insert(p.x,p.y,p.x+p.width+n.taskMargin,450)}},"drawTasks"),lVe={setConf:QGe,draw:iVe}}),hVe={};Vat(hVe,{diagram:()=>uVe});var uVe,dVe,pVe,gVe=r(()=>{YGe(),HGe(),XGe(),cVe(),uVe={parser:yGe,db:IGe,renderer:lVe,styles:DGe,init:mt(e=>{lVe.setConf(e.journey),IGe.clear()},"init")}}),fVe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,11,13,14,15,17,19,20,23,24],i=[1,12],n=[1,13],a=[1,14],s=[1,15],o=[1,16],l=[1,19],c=[1,20],i={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 3:i.setDirection("LR");break;case 4:i.setDirection("TD");break;case 5:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:this.$=a[o];break;case 9:case 10:this.$=[];break;case 11:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 18:i.addTask(a[o],0,""),this.$=a[o];break;case 19:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(r,[2,5],{5:6}),t(r,[2,2]),t(r,[2,3]),t(r,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:i,15:n,17:a,19:s,20:o,21:17,22:18,23:l,24:c},t(r,[2,10],{1:[2,1]}),t(r,[2,6]),{12:21,14:i,15:n,17:a,19:s,20:o,21:17,22:18,23:l,24:c},t(r,[2,8]),t(r,[2,9]),t(r,[2,11]),{16:[1,22]},{18:[1,23]},t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,7]),t(r,[2,12]),t(r,[2,13])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0IVe,addSection:()=>_Ve,addTask:()=>LVe,addTaskOrg:()=>NVe,clear:()=>CVe,default:()=>MVe,getCommonDb:()=>wVe,getDirection:()=>EVe,getSections:()=>AVe,getTasks:()=>RVe,setDirection:()=>SVe});var yVe,vVe,bVe,xVe,TVe,kVe,wVe,CVe,SVe,EVe,_Ve,AVe,RVe,LVe,IVe,NVe,DVe,MVe,OVe=r(()=>{Wu(),yVe="",vVe=0,bVe="LR",xVe=[],TVe=[],kVe=[],wVe=mt(()=>Ih,"getCommonDb"),CVe=mt(function(){xVe.length=0,TVe.length=0,yVe="",kVe.length=0,bVe="LR",Ph()},"clear"),SVe=mt(function(e){bVe=e},"setDirection"),EVe=mt(function(){return bVe},"getDirection"),_Ve=mt(function(e){yVe=e,xVe.push(e)},"addSection"),AVe=mt(function(){return xVe},"getSections"),RVe=mt(function(){let e=DVe(),t=0;for(;!e&&t<100;)e=DVe(),t++;return TVe.push(...kVe),TVe},"getTasks"),LVe=mt(function(e,t,r){e={id:vVe++,section:yVe,type:yVe,task:e,score:t||0,events:r?[r]:[]},kVe.push(e)},"addTask"),IVe=mt(function(e){kVe.find(e=>e.id===vVe-1).events.push(e)},"addEvent"),NVe=mt(function(e){e={section:yVe,type:yVe,description:e,task:e,classes:[]},TVe.push(e)},"addTaskOrg"),DVe=mt(function(){let e=mt(function(e){return kVe[e].processed},"compileTask"),t=!0;for(var[r,i]of kVe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),MVe={clear:CVe,getCommonDb:wVe,getDirection:EVe,setDirection:SVe,addSection:_Ve,getSections:AVe,getTasks:RVe,addTask:LVe,addTaskOrg:NVe,addEvent:IVe}});function PVe(e,o){e.each(function(){var t,r=Q(this),i=r.text().split(/(\s+|
)/).reverse(),n=[],a=r.attr("y"),e=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",e+"em");for(let e=0;eo||"
"===t)&&(n.pop(),s.text(n.join(" ").trim()),n="
"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var BVe,$Ve,FVe,zVe,qVe,jVe,WVe,UVe,GVe,VVe,YVe,HVe,XVe,KVe,ZVe,QVe,JVe,eYe,tYe,rYe,iYe,nYe,aYe,sYe,oYe,lYe,cYe,hYe,uYe,dYe,pYe=r(()=>{function t(e,t,r,i,n,a,s,o){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(//gi);for(let e=0;e/gi," "),i=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),void 0!==t.class&&e.attr("class",t.class),e.append("tspan"));return i.attr("x",t.x+2*t.textMargin),i.text(r),e},"drawText"),jVe=mt(function(e,t){function r(e,t,r,i,n){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+i-n)+" "+(e+r-1.2*n)+","+(t+i)+" "+e+","+(t+i)}mt(r,"genPoints");var i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,qVe(e,t)},"drawLabel"),WVe=mt(function(e,t,r){var e=e.append("g"),i=HVe();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,$Ve(e,i),XVe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),UVe=-1,GVe=mt(function(e,t,r,i){var n=t.x+r.width/2,e=e.append("g");UVe++,e.append("line").attr("id",i+"-task"+UVe).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),FVe(e,{cx:n,cy:300+30*(5-t.score),score:t.score}),(i=HVe()).x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="task task-type-"+t.num,i.rx=3,i.ry=3,$Ve(e,i),XVe(r)(t.task,e,i.x,i.y,i.width,i.height,{class:"task"},r,t.colour)},"drawTask"),VVe=mt(function(e,t){$Ve(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),YVe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),HVe=mt(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),XVe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},KVe=mt(function(e,t){BVe=0,UVe=-1,e.append("defs").append("marker").attr("id",t+"-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"),mt(PVe,"wrap"),ZVe=mt(function(e,t,r,i,n,a=!1){var{theme:s,look:o}=i,l=s?.includes("redux"),r=r%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,c=e.append("g"),h=(t.section=r,c.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),c.append("g")),u=c.append("g"),d=u.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(PVe,t.width).node().getBBox(),p=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return t.height=d.height+1.1*p*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,u.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),l&&u.attr("transform",`translate(${t.width/2}, ${a?t.padding/2+3:t.padding})`),JVe(h,t,r,n,i),"neo"===o&&(c.attr("data-look","neo"),l)&&(d=s.includes("dark"),u=(p=Q(e.node()?.ownerSVGElement??e.node())).attr("id")??"",p.select("#"+(a=u?u+"-drop-shadow":"drop-shadow")).empty()&&((h=p.select("defs")).empty()?p.append("defs"):h).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",d?"0.2":"0.06").attr("flood-color",d?"#FFFFFF":"#000000")),t},"drawNode"),QVe=mt(function(e,t,r){var i=(e=e.append("g")).append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(PVe,t.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.remove(),i.height+1.1*r*.5+t.padding},"getVirtualNodeHeight"),JVe=mt(function(e,t,r,i,n){var a=0<(a=(n=n.theme)?.includes("redux")?0:5)?`M0 ${t.height-5} v${10-t.height} q0,-${a},${a},-${a} h${t.width-10} q${a},0,${a},${a} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",i+"-node-"+BVe++).attr("class","node-bkg node-"+t.type).attr("d",a),n?.includes("redux")||e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),eYe={drawRect:$Ve,drawCircle:zVe,drawSection:WVe,drawText:qVe,drawLabel:jVe,drawTask:GVe,drawBackgroundRect:VVe,getTextObj:YVe,getNoteRect:HVe,initGraphics:KVe,drawNode:ZVe,getVirtualNodeHeight:QVe}}),gYe=r(()=>{bk(),pYe(),e(),Uu(),Ch(),tYe=mt(function(e,n,t,r){let a=B(),{look:i,theme:s,themeVariables:o}=a,{useGradient:l,gradientStart:c,gradientStop:h}=o,u=a.timeline?.leftMargin??50,d=(P.debug("timeline",r.db),a.securityLevel),p,g=("sandbox"===d&&(p=Q("#i"+n)),Q("sandbox"===d?p.nodes()[0].contentDocument.body:"body").select("#"+n)),f=(g.append("g"),r.db.getTasks()),m=r.db.getCommonDb().getDiagramTitle();P.debug("task",f),eYe.initGraphics(g,n);var y,v,r=r.db.getSections();P.debug("sections",r);let b=0,x=0,T,k=50+u,w=50,C=0,S=!0,E=(r.forEach(function(e){e={number:C,descr:e,section:C,width:150,padding:20,maxHeight:b},e=eYe.getVirtualNodeHeight(g,e,a),P.debug("sectionHeight before draw",e),b=Math.max(b,e+20)}),0),_=0;P.debug("tasks.length",f.length);for([y,v]of f.entries()){var A,R={number:y,descr:v,section:v.section,width:150,padding:20,maxHeight:x},R=eYe.getVirtualNodeHeight(g,R,a);P.debug("taskHeight before draw",R),x=Math.max(x,R+20),E=Math.max(E,v.events.length);let e=0;for(A of v.events){var L={descr:A,section:v.section,number:v.section,width:150,padding:20,maxHeight:50};e+=eYe.getVirtualNodeHeight(g,L,a)}0{var e=f.filter(e=>e.section===t),r={number:C,descr:t,section:C,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:b},i=(P.debug("sectionNode",r),g.append("g")),r=eYe.drawNode(i,r,C,a,n);P.debug("sectionNode output",r),i.attr("transform",`translate(${k}, 50)`),w+=b+50,0{},"setConf"),draw:tYe}}),fYe=r(()=>{pYe(),e(),Uu(),Ch(),z$e(),zC(),aYe=mt(function(e,t,r,i){let a=B(),n=a.timeline?.leftMargin??50,s=(P.debug("timeline",i.db),M$e(t)),o=(s.append("g"),i.db.getTasks()),l=i.db.getCommonDb().getDiagramTitle();P.debug("task",o),eYe.initGraphics(s);var c,h,t=i.db.getSections();P.debug("sections",t);let u=0,d=0,p=50+n,g=50,f=g,m=p,y=m+230,v=0,b=t&&0{var e=o.filter(e=>e.section===t),r={number:v,descr:t,section:v,width:T,padding:5,maxHeight:u},i=(P.debug("sectionNode",r),s.append("g")),r=eYe.drawNode(i,r,v,a),n=(P.debug("sectionNode output",r),x-230),i=(i.attr("transform",`translate(${n}, ${g})`),g+r.height+20),n=(0{},"setConf"),draw:aYe}}),mYe=r(()=>{ai(),wi(),cYe=mt(t=>{let e=vr().theme,r=e?.includes("dark"),i=e?.includes("color"),n=t.svgId?.replace(/^#/,"")??"",a=n?`url(#${n}-drop-shadow)`:t.dropShadow??"none",s="";for(let e=0;e{let r="";for(let e=0;e{let e=vr().theme,r=e?.includes("redux"),i="neutral"===e,n=t.svgId?.replace(/^#/,"")??"",a="";if(t.useGradient&&n&&t.THEME_COLOR_LIMIT&&!i)for(let e=0;ebYe});var vYe,bYe,xYe,TYe,kYe=r(()=>{fVe(),OVe(),gYe(),fYe(),mYe(),vYe={setConf:mt(()=>{},"setConf"),draw:mt((e,t,r,i)=>("TD"===(i?.db?.getDirection?.()??"LR")?lYe:nYe).draw(e,t,r,i),"draw")},bYe={db:mVe,renderer:vYe,parser:pVe,styles:dYe}}),wYe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 17:case 21:i.decorateNode({class:a[o]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:i.decorateNode({icon:a[o]});break;case 25:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:i,9:22,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(g,[2,14],{7:f,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(g,[2,13],{7:f,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{SYe=[];for(let e=0;e<256;++e)SYe.push((e+256).toString(16).slice(1));mt(CYe,"unsafeStringify")});function _Ye(){return crypto.getRandomValues(AYe)}var AYe,RYe=r(()=>{AYe=new Uint8Array(16),mt(_Ye,"rng")});function LYe(e,t,r){return t||e||!crypto.randomUUID?IYe(e,t,r):crypto.randomUUID()}function IYe(e,t,r){var i=(e=e||{}).random??e.rng?.()??_Ye();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=i[e];return t}return CYe(i)}var NYe,DYe,MYe,OYe,PYe,BYe,$Ye,FYe,zYe,qYe,jYe=r(()=>{RYe(),EYe(),mt(LYe,"v4"),mt(IYe,"_v4"),NYe=LYe}),WYe=r(()=>{jYe()}),UYe=r(()=>{F7(),zC(),DYe=12}),GYe=r(()=>{Uu(),WYe(),th(),e(),Ti(),wi(),UYe(),MYe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},OYe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=MYe,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{mt(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;0<=e;e--)if(this.nodes[e].level{var t=(r.theme?.toLowerCase()??"").includes("redux");switch(e){case MYe.CIRCLE:return"mindmapCircle";case MYe.RECT:return"rect";case MYe.ROUNDED_RECT:return"rounded";case MYe.CLOUD:return"cloud";case MYe.BANG:return"bang";case MYe.HEXAGON:return"hexagon";case MYe.DEFAULT:return t?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:n,cssStyles:[],look:r.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(a),e.children)for(var s of e.children)this.flattenNodes(s,t)}generateEdges(t,r){if(t.children){var i,n=B();for(i of t.children){let e="edge";void 0!==i.section&&(e+=" section-edge-"+i.section);var a=t.level+1,a=(e+=" edge-depth-"+a,{id:`edge_${t.id}_`+i.id,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:e,depth:t.level,section:i.section});r.push(a),this.generateEdges(i,r)}}}getData(){var e=this.getMindmap(),t=B(),r=t;if(void 0===Er().layout&&(r.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:r};P.debug("getData: mindmapRoot",e,t),this.assignSections(e);var i,n=[],a=(this.flattenNodes(e,t=[]),this.generateEdges(e,n),P.debug(`getData: processed ${t.length} nodes and ${n.length} edges`),new Map);for(i of t)a.set(i.id,{shape:i.shape,width:i.width,height:i.height,padding:i.padding});return{nodes:t,edges:n,config:r,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+NYe()}}getLogger(){return P}}}),VYe=r(()=>{e(),fI(),Jue(),ede(),Ti(),wi(),PYe=mt(async(e,t,r,i)=>{P.debug(`Rendering mindmap diagram `+e);var n=(e=i.db).getData(),a=tI(t,n.config.securityLevel);n.type=i.type,n.layoutAlgorithm=Bue(n.config.layout,{fallback:"cose-bilkent"}),n.diagramId=t,e.getMindmap()&&(n.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape?(e.width=0,e.padding=10):"hexagon"===e.shape&&(e.width=0,e.height=0)}),await Pue(n,a),i=vr().themeVariables,{useGradient:t,gradientStart:e,gradientStop:i}=i,t&&e&&i&&(t=a.attr("id"),(t=a.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("stop").attr("offset","0%").attr("stop-color",e).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",i).attr("stop-opacity",1)),$ue(a,n.config.mindmap?.padding??ir.mindmap.padding,"mindmapDiagram",n.config.mindmap?.useMaxWidth??ir.mindmap.useMaxWidth))},"draw"),BYe={draw:PYe}}),YYe=r(()=>{ai(),$Ye=mt(t=>{let{theme:r,look:i}=t,n="";for(let e=0;e{let n="";for(let e=0;e{var t=e.theme,r=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return` .edge { stroke-width: 3; } ${$Ye(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .section-root span { color: ${t?.includes("redux")?e.nodeBorder:e.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .mindmap-node-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } [data-look="neo"].mindmap-node { filter: ${i}; } [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { fill: ${t?.includes("redux")?e.mainBkg:e.git0}; } [data-look="neo"].mindmap-node.section-root .text-inner-tspan { fill: ${t?.includes("redux")?e.nodeBorder:e["cScaleLabel"+("neutral"===t?1:0)]}; } ${e.useGradient&&r&&e.mainBkg?FYe(e.THEME_COLOR_LIMIT,r,e.mainBkg):""} `},"getStyles"),qYe=zYe}),HYe={};Vat(HYe,{diagram:()=>XYe});var XYe,KYe,ZYe,QYe,JYe,eHe,tHe,rHe,iHe,nHe,aHe,sHe,oHe,lHe,cHe,hHe,uHe,dHe,pHe,gHe,fHe,mHe,yHe,vHe,bHe,xHe=r(()=>{wYe(),GYe(),VYe(),YYe(),XYe={get db(){return new OYe},renderer:BYe,parser:TYe,styles:qYe}}),THe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],b=[1,6,7,11,13,16,17,20,23],x=[1,38],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o-1].id),i.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 18:case 23:i.decorateNode({class:a[o]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",a[o-1].id),i.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:i.decorateNode({icon:a[o]});break;case 27:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:i,9:22,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),t(p,[2,19]),t(p,[2,21],{15:30,24:g}),t(p,[2,22]),t(p,[2,23]),t(f,[2,25]),t(f,[2,26]),t(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(m,[2,14],{7:y,11:v}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:x}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(b,[2,11]),t(b,[2,12]),t(p,[2,15],{24:x}),t(f,[2,30]),{22:[1,41]},t(f,[2,27]),t(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",t.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",t.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};r.lexer=c,mt(e,"Parser"),(KYe=new((e.prototype=r).Parser=e)).parser=KYe,ZYe=KYe}),kHe=r(()=>{Uu(),th(),e(),Ti(),k_(),QYe=[],JYe=[],eHe=0,tHe={},rHe=mt(()=>{QYe=[],JYe=[],eHe=0,tHe={}},"clear"),iHe=mt(e=>{if(0===QYe.length)return null;let t=QYe[0].level,r=null;for(let e=QYe.length-1;0<=e;e--)if(QYe[e].level===t&&(r=r||QYe[e]),QYe[e].levele.parentId===t.id)){var s={id:n.id,parentId:t.id,label:Rc(n.label??"",i),labelType:"markdown",isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:"kanbanItem",level:n.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:B()}},"getData"),sHe=mt((e,t,r,i,n)=>{let a=B(),s=a.mindmap?.padding??ir.mindmap.padding;switch(i){case oHe.ROUNDED_RECT:case oHe.RECT:case oHe.HEXAGON:s*=2}if(i={id:Rc(t,a)||"kbn"+eHe++,level:e,label:Rc(r,a),width:a.mindmap?.maxNodeWidth??ir.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(` `)?n+` `:`{ `+n+` }`,(t=T_(n,{schema:x_})).shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(i.shape=t?.shape),t?.label&&(i.label=t?.label),t?.icon&&(i.icon=t?.icon.toString()),t?.assigned&&(i.assigned=t?.assigned.toString()),t?.ticket&&(i.ticket=t?.ticket.toString()),t?.priority&&(i.priority=t?.priority)}(r=iHe(e))?i.parentId=r.id||"kbn"+eHe++:JYe.push(i),QYe.push(i)},"addNode"),oHe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},lHe=mt((e,t)=>{switch(P.debug("In get type",e,t),e){case"[":return oHe.RECT;case"(":return")"===t?oHe.ROUNDED_RECT:oHe.CLOUD;case"((":return oHe.CIRCLE;case")":return oHe.CLOUD;case"))":return oHe.BANG;case"{{":return oHe.HEXAGON;default:return oHe.DEFAULT}},"getType"),cHe=mt((e,t)=>{tHe[e]=t},"setElementForId"),hHe=mt(e=>{var t,r;e&&(t=B(),r=QYe[QYe.length-1],e.icon&&(r.icon=Rc(e.icon,t)),e.class)&&(r.cssClasses=Rc(e.class,t))},"decorateNode"),uHe=mt(e=>{switch(e){case oHe.DEFAULT:return"no-border";case oHe.RECT:return"rect";case oHe.ROUNDED_RECT:return"rounded-rect";case oHe.CIRCLE:return"circle";case oHe.CLOUD:return"cloud";case oHe.BANG:return"bang";case oHe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),dHe=mt(()=>P,"getLogger"),pHe=mt(e=>tHe[e],"getElementById"),gHe={clear:rHe,addNode:sHe,getSections:nHe,getData:aHe,nodeType:oHe,getType:lHe,setElementForId:cHe,decorateNode:hHe,type2Str:uHe,getLogger:dHe,getElementById:pHe}}),wHe=r(()=>{Uu(),e(),z$e(),Ch(),Ti(),yI(),MN(),fHe=mt(async(e,t,r,i)=>{P.debug(`Rendering kanban diagram `+e);var n,a=i.db.getData(),s=B(),e=(s.htmlLabels=!1,M$e(t));for(n of a.nodes)n.domId=t+"-"+n.id;var o,l=e.append("g"),c=(l.attr("class","sections"),e.append("g"));c.attr("class","items");let h=a.nodes.filter(e=>e.isGroup),u=0,d=[],p=25;for(o of h){var g=s?.kanban?.sectionWidth||200,g=(u+=1,o.x=g*u+10*(u-1)/2,o.width=g,o.y=0,o.height=3*g,o.rx=5,o.ry=5,o.cssClasses=o.cssClasses+" section-"+u,await hI(l,o));p=Math.max(p,g?.labelBBox?.height),d.push(g)}let f=0;for(let n of h){var m,y=d[f];f+=1;let e=s?.kanban?.sectionWidth||200,t=3*-e/2+p,r=t,i=a.nodes.filter(e=>e.parentId===n.id);for(m of i){if(m.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");m.x=n.x,m.width=e-15;var v=(await kN(c,m,{config:s})).node().getBBox();m.y=r+v.height/2,await EN(m),r=m.y+v.height/2+5}var y=y.cluster.select("rect"),b=Math.max(r-t+30,50)+(p-25);y.attr("height",b)}vh(void 0,e,s.mindmap?.padding??ir.kanban.padding,s.mindmap?.useMaxWidth??ir.kanban.useMaxWidth)},"draw"),mHe={draw:fHe}}),CHe=r(()=>{ai(),nde(),yHe=mt(r=>{let t="";for(let e=0;e(r.darkMode?L:R)(e,t),"adjuster");for(let e=0;e` .edge { stroke-width: 3; } ${yHe(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .cluster-label, .label { color: ${e.textColor}; fill: ${e.textColor}; } .kanban-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } ${Hue()} `,"getStyles"),bHe=vHe}),SHe={};Vat(SHe,{diagram:()=>EHe});var EHe,_He,AHe,RHe,LHe,IHe,NHe,DHe,MHe,OHe,PHe,BHe,$He,FHe,zHe,qHe=r(()=>{THe(),kHe(),wHe(),CHe(),EHe={db:gHe,renderer:mHe,parser:ZYe,styles:bHe}}),jHe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,9],i=[1,10],n=[1,5,10,12],n={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 7:var l=i.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=i.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());i.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:i},{15:18,16:7,17:8,18:r,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:r,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{Uu(),th(),Wu(),RHe=[],LHe=[],IHe=new Map,NHe=mt(()=>{RHe=[],LHe=[],IHe=new Map,Ph()},"clear"),DHe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},MHe=mt((e,t,r)=>{RHe.push(new DHe(e,t,r))},"addLink"),OHe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},PHe=mt(e=>{e=I.sanitizeText(e,B());let t=IHe.get(e);return void 0===t&&(t=new OHe(e),IHe.set(e,t),LHe.push(t)),t},"findOrCreateNode"),BHe=mt(()=>LHe,"getNodes"),$He=mt(()=>RHe,"getLinks"),FHe=mt(()=>({nodes:LHe.map(e=>({id:e.ID})),links:RHe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),zHe={nodesMap:IHe,getConfig:mt(()=>B().sankey,"getConfig"),getNodes:BHe,getLinks:$He,getGraph:FHe,addLink:MHe,findOrCreateNode:PHe,getAccTitle:$h,setAccTitle:Bh,getAccDescription:zh,setAccDescription:Fh,getDiagramTitle:jh,setDiagramTitle:qh,clear:NHe}});function UHe(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i{mt(UHe,"max")});function VHe(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i>e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var YHe=r(()=>{mt(VHe,"min")});function HHe(t,r){let i=0;if(void 0===r)for(var e of t)(e=+e)&&(i+=e);else{let e=-1;for(var n of t)(n=+r(n,++e,t))&&(i+=n)}return i}var XHe=r(()=>{mt(HHe,"sum")}),KHe=r(()=>{GHe(),YHe(),XHe()});function ZHe(e){return e.target.depth}function QHe(e){return e.depth}function JHe(e,t){return t-1-e.height}function eXe(e,t){return e.sourceLinks.length?e.depth:t-1}function tXe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?VHe(e.sourceLinks,ZHe)-1:0}var rXe=r(()=>{KHe(),mt(ZHe,"targetDepth"),mt(QHe,"left"),mt(JHe,"right"),mt(eXe,"justify"),mt(tXe,"center")});function iXe(e){return function(){return e}}var nXe=r(()=>{mt(iXe,"constant")});function aXe(e,t){return oXe(e.source,t.source)||e.index-t.index}function sXe(e,t){return oXe(e.target,t.target)||e.index-t.index}function oXe(e,t){return e.y0-t.y0}function lXe(e){return e.value}function cXe(e){return e.index}function hXe(e){return e.nodes}function uXe(e){return e.links}function dXe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function pXe({nodes:e}){for(var r of e){let e=r.y0,t=e;for(var i of r.sourceLinks)i.y0=e+i.width/2,e+=i.width;for(var n of r.targetLinks)n.y1=t+n.width/2,t+=n.width}}function gXe(){let o=0,l=0,c=1,h=1,u=24,n=8,d,p=cXe,g=eXe,f,m,t=hXe,r=uXe,a=6;function i(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),b(e),k(e),pXe(e),e}function s({nodes:r,links:e}){for(var[t,i]of r.entries())i.index=t,i.sourceLinks=[],i.targetLinks=[];var n,a,s=new Map(r.map((e,t)=>[p(e,t,r),e]));for([n,a]of e.entries()){a.index=n;let{source:e,target:t}=a;"object"!=typeof e&&(e=a.source=dXe(s,e)),"object"!=typeof t&&(t=a.target=dXe(s,t)),e.sourceLinks.push(a),t.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:e}){for(var t of e)t.value=void 0===t.fixedValue?Math.max(HHe(t.sourceLinks,lXe),HHe(t.targetLinks,lXe)):t.fixedValue}function v({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(var a of r){a.depth=n;for(var{target:s}of a.sourceLinks)i.add(s)}if(++n>t)throw new Error("circular link");r=i,i=new Set}}function b({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(var a of r){a.height=n;for(var{source:s}of a.targetLinks)i.add(s)}if(++n>t)throw new Error("circular link");r=i,i=new Set}}function x({nodes:e}){var t,r=UHe(e,e=>e.depth)+1,i=(c-o-u)/(r-1),n=new Array(r);for(t of e){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,t,r))));t.layer=a,t.x0=o+a*i,t.x1=t.x0+u,n[a]?n[a].push(t):n[a]=[t]}if(f)for(var s of n)s.sort(f);return n}function T(e){var r,i=VHe(e,e=>(h-l-(e.length-1)*d)/HHe(e,lXe));for(r of e){let t=l;for(var n of r){n.y0=t,n.y1=t+n.value*i,t=n.y1+d;for(var a of n.sourceLinks)a.width=a.value*i}t=(h-t+d)/(r.length+1);for(let e=0;ee.length)-1)),T(t);for(let e=0;e>1,i=e[r];_(e,i.y0-d,r-1,t),E(e,i.y1+d,1+r,t),_(e,h,e.length-1,t),E(e,l,0,t)}function E(e,t,r,i){for(;r{KHe(),rXe(),nXe(),mt(aXe,"ascendingSourceBreadth"),mt(sXe,"ascendingTargetBreadth"),mt(oXe,"ascendingBreadth"),mt(lXe,"value"),mt(cXe,"defaultId"),mt(hXe,"defaultNodes"),mt(uXe,"defaultLinks"),mt(dXe,"find"),mt(pXe,"computeLinkBreadths"),mt(gXe,"Sankey")});function mXe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function yXe(){return new mXe}var vXe,bXe,xXe,TXe,kXe=r(()=>{vXe=Math.PI,xXe=(bXe=2*vXe)-1e-6,mt(mXe,"Path"),mt(yXe,"path"),mXe.prototype=yXe.prototype={constructor:mXe,moveTo:mt(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:mt(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:mt(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:mt(function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:mt(function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:mt(function(e,t,r,i,n){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(e=+e),h=(i=+i)-(t=+t),u=o-e,d=l-t,p=u*u+d*d;if((n=+n)<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):1e-6{kXe()});function CXe(e){return mt(function(){return e},"constant")}var SXe=r(()=>{mt(CXe,"default")});function EXe(e){return e[0]}function _Xe(e){return e[1]}var AXe,RXe=r(()=>{mt(EXe,"x"),mt(_Xe,"y")}),LXe=r(()=>{AXe=Array.prototype.slice});function IXe(e){return e.source}function NXe(e){return e.target}function DXe(n){var a=IXe,s=NXe,o=EXe,l=_Xe,c=null;function t(){var e,t=AXe.call(arguments),r=a.apply(this,t),i=s.apply(this,t);if(c=c||(e=TXe()),n(c,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=i,t)),+l.apply(this,t)),e)return c=null,e+""||null}return mt(t,"link"),t.source=function(e){return arguments.length?(a=e,t):a},t.target=function(e){return arguments.length?(s=e,t):s},t.x=function(e){return arguments.length?(o="function"==typeof e?e:CXe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:CXe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function MXe(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function OXe(){return DXe(MXe)}var PXe=r(()=>{wXe(),LXe(),SXe(),RXe(),mt(IXe,"linkSource"),mt(NXe,"linkTarget"),mt(DXe,"link"),mt(MXe,"curveHorizontal"),mt(OXe,"linkHorizontal")}),BXe=r(()=>{PXe()});function $Xe(e){return[e.source.x1,e.y0]}function FXe(e){return[e.target.x0,e.y1]}function zXe(){return OXe().source($Xe).target(FXe)}var qXe,jXe,WXe,UXe,GXe,VXe,YXe,HXe,XXe=r(()=>{BXe(),mt($Xe,"horizontalSource"),mt(FXe,"horizontalTarget"),mt(zXe,"default")}),KXe=r(()=>{fXe(),rXe(),XXe()}),ZXe=r(()=>{qXe=class t{static{mt(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href="#"+e}toString(){return"url("+this.href+")"}}}),QXe=r(()=>{Uu(),bk(),KXe(),Ch(),ZXe(),jXe={left:QHe,right:JHe,center:tXe,justify:eXe},WXe=mt(e=>{let t=0,r=0;for(var i of e){var n=i.value??0;n>t&&(t=n,r=i.layer??0)}return r},"findCentralNodeLayer"),UXe=mt(function(e,t,r,i){let{securityLevel:n,sankey:a}=B(),s=Vh.sankey,o,l=("sandbox"===n&&(o=Q("#i"+t)),Q("sandbox"===n?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===n?l.select(`[id="${t}"]`):Q(`[id="${t}"]`),h=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=a?.nodeWidth??s.nodeWidth??10,v=a?.nodePadding??s.nodePadding??12,b=a?.labelStyle??s.labelStyle??"legacy",x=a?.nodeColors??{},T=i.db.getGraph(),k=jXe[p],w=(gXe().nodeId(e=>e.id).nodeWidth(y).nodePadding(v+(m?15:0)).nodeAlign(k).extent([[0,0],[h,u]])(T),WXe(T.nodes)),C=$b($T),S=mt(e=>x[e]??C(e),"getNodeColor"),E=(c.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=qXe.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>S(e.id)),mt(({id:e,value:t})=>m?e+` `+g+Math.round(100*t)/100+f:e,"getText")),_=mt(e=>"outlined"===b?(e.layer??0)A.selectAll(e?"."+e:"text").data(T.nodes).join("text").attr("class",e??null).attr("x",e=>_(e).x).attr("y",e=>(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>_(e).anchor).text(E),"appendLabel");"outlined"===b?(R("sankey-label-bg"),R("sankey-label-fg")):R();var t=c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),L=a?.linkColor??"gradient";"gradient"===L&&((i=t.append("linearGradient").attr("id",e=>(e.uid=qXe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",e=>e.source.x1).attr("x2",e=>e.target.x0)).append("stop").attr("offset","0%").attr("stop-color",e=>S(e.source.id)),i.append("stop").attr("offset","100%").attr("stop-color",e=>S(e.target.id)));let I;switch(L){case"gradient":I=mt(e=>e.uid,"coloring");break;case"source":I=mt(e=>S(e.source.id),"coloring");break;case"target":I=mt(e=>S(e.target.id),"coloring");break;default:I=L}t.append("path").attr("d",zXe()).attr("stroke",I).attr("stroke-width",e=>Math.max(1,e.width)),vh(void 0,c,0,d)},"draw"),GXe={draw:UXe}}),JXe=r(()=>{VXe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` `).trim(),"prepareTextForParsing")}),eKe=r(()=>{YXe=mt(e=>`.label { font-family: ${e.fontFamily}; } .node-labels { font-family: ${e.fontFamily}; } /* Outlined label style - background stroke for better readability */ .sankey-label-bg { stroke: ${e.mainBkg||e.background||"#fff"}; stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; } /* Foreground label text */ .sankey-label-fg { fill: ${e.textColor}; } /* Node styling */ .node rect { shape-rendering: crispEdges; } /* Link styling */ .link { fill: none; stroke-opacity: 0.5; mix-blend-mode: multiply; } `,"getStyles"),HXe=YXe}),tKe={};Vat(tKe,{diagram:()=>iKe});var rKe,iKe,nKe,aKe,sKe,oKe,lKe,cKe,hKe,uKe,dKe,pKe,gKe=r(()=>{jHe(),WHe(),QXe(),JXe(),eKe(),rKe=AHe.parse.bind(AHe),AHe.parse=e=>rKe(VXe(e)),iKe={styles:HXe,parser:AHe,db:zHe,renderer:GXe}}),fKe=r(()=>{wi(),Ti(),zC(),Wu(),nKe=ir.packet,aKe=class{constructor(){this.packet=[],this.setAccTitle=Bh,this.getAccTitle=$h,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getAccDescription=zh,this.setAccDescription=Fh}static{mt(this,"PacketDB")}getConfig(){var e=lC({...nKe,...vr().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){0{sOe(),e(),hOe(),fKe(),sKe=mt((e,t)=>{oOe(e,t);let r=-1,i=[],n=1,a=t.getConfig().bitsPerRow;for(var{start:s,end:o,bits:l,label:c}of e.blocks){if(void 0!==s&&void 0!==o&&o{if(void 0===e.start)throw new Error("start should have been set during first phase");if(void 0===e.end)throw new Error("end should have been set during first phase");if(e.end{var e=await rOe("packet",e),t=lKe.parser?.yy;if(!(t instanceof aKe))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");P.debug(e),sKe(e,t)},"parse")}}),yKe=r(()=>{z$e(),Ch(),cKe=mt((e,t,r,i)=>{var n,a,s=(i=i.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=i.getPacket(),i=i.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(i?0:o),c=c*h+2,d=M$e(t);d.attr("viewBox",`0 0 ${c} `+o),yh(d,o,c,s.useMaxWidth);for([n,a]of u.entries())hKe(d,a,n,s);d.append("text").text(i).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),hKe=mt((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=e.append("g"),u=r*(i+a)+a;for(c of t){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-n;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",i).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),uKe={draw:cKe}}),vKe=r(()=>{zC(),dKe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},pKe=mt(({packet:e}={})=>` .packetByte { font-size: ${(e=lC(dKe,e)).byteFontSize}; } .packetByte.start { fill: ${e.startByteColor}; } .packetByte.end { fill: ${e.endByteColor}; } .packetLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .packetTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } .packetBlock { stroke: ${e.blockStrokeColor}; stroke-width: ${e.blockStrokeWidth}; fill: ${e.blockFillColor}; } `,"styles")}),bKe={};Vat(bKe,{diagram:()=>xKe});var xKe,TKe,kKe,wKe,CKe,SKe,EKe,_Ke,AKe,RKe,LKe,IKe,NKe,DKe,MKe,OKe,PKe,BKe=r(()=>{fKe(),mKe(),yKe(),vKe(),xKe={parser:lKe,get db(){return new aKe},renderer:uKe,styles:pKe}}),$Ke=r(()=>{wi(),Ti(),zC(),Wu(),kKe={axes:[],curves:[],options:TKe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},wKe=structuredClone(kKe),CKe=ir.radar,SKe=mt(()=>lC({...CKe,...vr().radar}),"getConfig"),EKe=mt(()=>wKe.axes,"getAxes"),_Ke=mt(()=>wKe.curves,"getCurves"),AKe=mt(()=>wKe.options,"getOptions"),RKe=mt(e=>{wKe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),LKe=mt(e=>{wKe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:IKe(e.entries)}))},"setCurves"),IKe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=EKe();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{var e=r.find(e=>e.axis?.$refText===t.name);if(void 0===e)throw new Error("Missing entry for axis "+t.label);return e.value})},"computeCurveEntries"),NKe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),wKe.options={showLegend:e.showLegend?.value??TKe.showLegend,ticks:e.ticks?.value??TKe.ticks,max:e.max?.value??TKe.max,min:e.min?.value??TKe.min,graticule:e.graticule?.value??TKe.graticule}},"setOptions"),DKe=mt(()=>{Ph(),wKe=structuredClone(kKe)},"clear"),MKe={getAxes:EKe,getCurves:_Ke,getOptions:AKe,setAxes:RKe,setCurves:LKe,setOptions:NKe,getConfig:SKe,clear:DKe,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh}}),FKe=r(()=>{sOe(),e(),hOe(),$Ke(),OKe=mt(e=>{oOe(e,MKe);var{axes:e,curves:t,options:r}=e;MKe.setAxes(e),MKe.setCurves(t),MKe.setOptions(r)},"populate"),PKe={parse:mt(async e=>{e=await rOe("radar",e),P.debug(e),OKe(e)},"parse")}});function zKe(r,e,t,i,n,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;t.forEach((e,t)=>{e.entries.length===o&&(e=e.entries.map((e,t)=>(t=2*Math.PI*t/o-Math.PI/2,{x:(e=qKe(e,i,n,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",jKe(e,s.curveTension)).attr("class","radarCurve-"+t):"polygon"===a&&r.append("polygon").attr("points",e.map(e=>e.x+","+e.y).join(" ")).attr("class","radarCurve-"+t))})}function qKe(e,t,r,i){return i*(Math.min(Math.max(e,t),r)-t)/(r-t)}function jKe(t,r){let i=t.length,n=`M${t[0].x},`+t[0].y;for(let e=0;e{var r=a.append("g").attr("transform",`translate(${i}, ${n+20*t})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+t),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}}var UKe,GKe,VKe,YKe,HKe,XKe,KKe,ZKe,QKe=r(()=>{z$e(),Ch(),UKe=mt((e,t,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),t=M$e(t),t=GKe(t,o),l=s.max??Math.max(...a.map(e=>Math.max(...e.entries))),c=s.min,h=Math.min(o.width,o.height)/2;VKe(t,n,h,s.ticks,s.graticule),YKe(t,n,h,o),zKe(t,n,a,c,l,s.graticule,o),WKe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),GKe=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n=t.marginLeft+t.width/2,a=t.marginTop+t.height/2;return yh(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} `+i),e.append("g").attr("transform",`translate(${n}, ${a})`)},"drawFrame"),VKe=mt((n,a,s,o,e)=>{if("circle"===e)for(let e=0;e(t=2*t*Math.PI/i-Math.PI/2,r*Math.cos(t)+","+r*Math.sin(t))).join(" ");n.append("polygon").attr("points",e).attr("class","radarGraticule")}}},"drawGraticule"),YKe=mt((t,r,i,n)=>{var a=r.length;for(let e=0;e{zC(),hi(),wi(),XKe=mt((t,r)=>{let i="";for(let e=0;e{var t=lC(Ot(),vr().themeVariables);return{themeVariables:t,radarOptions:lC(t.radar,e)}},"buildRadarStyleOptions"),ZKe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=KKe(e);return` .radarTitle { font-size: ${e.fontSize}; color: ${e.titleColor}; dominant-baseline: hanging; text-anchor: middle; } .radarAxisLine { stroke: ${t.axisColor}; stroke-width: ${t.axisStrokeWidth}; } .radarAxisLabel { dominant-baseline: middle; text-anchor: middle; font-size: ${t.axisLabelFontSize}px; color: ${t.axisColor}; } .radarGraticule { fill: ${t.graticuleColor}; fill-opacity: ${t.graticuleOpacity}; stroke: ${t.graticuleColor}; stroke-width: ${t.graticuleStrokeWidth}; } .radarLegendText { text-anchor: start; font-size: ${t.legendFontSize}px; dominant-baseline: hanging; } ${XKe(e,t)} `},"styles")}),eZe={};Vat(eZe,{diagram:()=>tZe});var tZe,rZe,iZe,nZe=r(()=>{$Ke(),FKe(),QKe(),JKe(),tZe={parser:PKe,db:MKe,renderer:HKe,styles:ZKe}}),aZe=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,15],i=[1,7],n=[1,13],a=[1,14],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],h={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",a[o-1]),i.setHierarchy(a[o-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:i.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:i.getLogger().debug("Rule: link: ",a[o],e),this.$={edgeTypeStr:a[o],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=i.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr);var c=i.edgeStrToEdgeData(a[o-1].edgeTypeStr),l=i.edgeStrToEdgeStartData(a[o-1].edgeTypeStr),h=i.edgeStrToThickness(a[o-1].edgeTypeStr),u=i.edgeStrToPattern(a[o-1].edgeTypeStr);this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",thickness:h,pattern:u,directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:l},{id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:i.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this||"na"),i.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),i.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),h=i.generateId(),this.$={id:h,type:"composite",label:"",children:a[o-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:i.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:r,11:3,13:4,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:c},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:r,21:i,28:n,29:a,31:s,39:o,43:l,46:c}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(g,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:s},{10:r,11:27,13:4,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(g,[2,24]),{10:r,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(f,[2,30]),{18:[1,43]},{18:[1,44]},t(g,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:case 60:case 61:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 76:case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\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:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};h.lexer=r,mt(e,"Parser"),(rZe=new((e.prototype=h).Parser=e)).parser=rZe,iZe=rZe});function sZe(e){switch(P.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return P.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 oZe(e){return"=="!==(P.debug("typeStr2Type",e),e)?"normal":"thick"}function lZe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function cZe(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function hZe(e){return e.includes("==")?"thick":"normal"}function uZe(e){return e.includes(".-")?"dotted":"solid"}var dZe,pZe,gZe,fZe,mZe,yZe,vZe,bZe,xZe,TZe,kZe,wZe,CZe,SZe,EZe,_Ze,AZe,RZe,LZe,IZe,NZe,DZe,MZe,OZe,PZe,BZe,$Ze,FZe,zZe,qZe,jZe,WZe,UZe,GZe,VZe,YZe,HZe,XZe,KZe,ZZe,QZe,JZe,eQe,tQe=r(()=>{Kw(),wi(),Uu(),e(),th(),Wu(),dZe=new Map,pZe=[],gZe=new Map,fZe=B(),mZe=new Map,yZe="",vZe=mt(e=>I.sanitizeText(e,fZe),"sanitizeText"),bZe=mt(function(e,t=""){let r=mZe.get(e);r||(r={id:e,styles:[],textStyles:[]},mZe.set(e,r)),t?.split(",").forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(e)&&(e=t.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(e)),r.styles.push(t)})},"addStyleClass"),xZe=mt(function(e,t=""){e=dZe.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),TZe=mt(function(e,r){e.split(",").forEach(function(e){let t=dZe.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},dZe.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),kZe=mt((e,t)=>{var r,i=[],n=(e=e.flat()).find(e=>"column-setting"===e?.type)?.columns??-1;for(r of e)if("number"==typeof n&&0n&&P.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+n),r.label&&(r.label=vZe(r.label)),"classDef"===r.type)bZe(r.id,r.css);else if("applyClass"===r.type)TZe(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&xZe(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var a=(gZe.get(r.id)??0)+1;gZe.set(r.id,a),r.id=a+"-"+r.id,pZe.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=dZe.get(r.id))?dZe.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&kZe(r.children,r),"space"===r.type){var s=r.width??1;for(let e=0;e{P.debug("Clear called"),Ph(),CZe={id:"root",type:"composite",children:[],columns:-1},dZe=new Map([["root",CZe]]),wZe=[],mZe=new Map,pZe=[],gZe=new Map,yZe=""},"clear"),mt(sZe,"typeStr2Type"),mt(oZe,"edgeTypeStr2Type"),mt(lZe,"edgeStrToEdgeData"),mt(cZe,"edgeStrToEdgeStartData"),mt(hZe,"edgeStrToThickness"),mt(uZe,"edgeStrToPattern"),EZe=0,_Ze=mt(()=>(EZe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+EZe),"generateId"),AZe=mt(e=>{CZe.children=e,kZe(e,CZe),wZe=CZe.children},"setHierarchy"),RZe=mt(e=>(e=dZe.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),LZe=mt(()=>[...dZe.values()],"getBlocksFlat"),IZe=mt(()=>wZe||[],"getBlocks"),NZe=mt(()=>pZe,"getEdges"),DZe=mt(e=>dZe.get(e),"getBlock"),MZe=mt(e=>{dZe.set(e.id,e)},"setBlock"),OZe=mt(e=>{yZe=e},"setDiagramId"),PZe=mt(()=>yZe,"getDiagramId"),$Ze=mt(()=>P,"getLogger"),BZe=mt(function(){return mZe},"getClasses"),$Ze={getConfig:mt(()=>vr().block,"getConfig"),typeStr2Type:sZe,edgeTypeStr2Type:oZe,edgeStrToEdgeData:lZe,edgeStrToEdgeStartData:cZe,edgeStrToThickness:hZe,edgeStrToPattern:uZe,getLogger:$Ze,getBlocksFlat:LZe,getBlocks:IZe,getEdges:NZe,setHierarchy:AZe,getBlock:DZe,setBlock:MZe,getColumns:RZe,getClasses:BZe,clear:SZe,generateId:_Ze,setDiagramId:OZe,getDiagramId:PZe},FZe=$Ze}),rQe=r(()=>{ai(),nde(),zZe=mt((e,t)=>{var r=(n=ot)(e,"r"),i=n(e,"g"),n=n(e,"b");return at(r,i,n,t)},"fade"),qZe=mt(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span,p { color: ${e.titleColor}; } .label text,span,p { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .flowchart-label text { text-anchor: middle; } // .flowchart-label .text-outer-tspan { // text-anchor: middle; // } // .flowchart-label .text-inner-tspan { // text-anchor: start; // } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePath .path { stroke: ${e.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; /* * This is for backward compatibility with existing code that didn't * add a \`

\` around edge labels. * * TODO: We should probably remove this in a future release. */ p { margin: 0; padding: 0; display: inline; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${e.edgeLabelBackground}; } .node .cluster { // fill: ${zZe(e.mainBkg,.5)}; fill: ${zZe(e.clusterBkg,.5)}; stroke: ${zZe(e.clusterBorder,.2)}; box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span,p { color: ${e.titleColor}; } /* .cluster div { color: ${e.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } ${Hue()} `,"getStyles"),jZe=qZe}),iQe=r(()=>{e(),WZe=mt((t,e,r,i)=>{e.forEach(e=>{JZe[e](t,r,i)})},"insertMarkers"),UZe=mt((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),GZe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),VZe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),YZe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),HZe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),XZe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",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"),KZe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),ZZe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),QZe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),JZe={extension:UZe,composition:GZe,aggregation:VZe,dependency:YZe,lollipop:HZe,point:XZe,circle:KZe,cross:ZZe,barb:QZe},eQe=WZe});function nQe(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}function aQe(s,o,l=0,c=0){if(P.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"siblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var s=n.columns??-1;if(P.debug("layoutBlocks columns abc95",n.id,"=>",s,n),n.children&&0h&&o.set(c,l.size.height);let e=l?.widthInColumns??1;0e-t);for(var p of t)d.set(p,e),e+=(o.get(p)??0)+cQe}let t=0,r=(P.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-cQe),i=0;for(u of n.children){var g=n;if(u.size){var f,{width:m,height:y}=u.size,{px:v,py:b}=nQe(s,t);b!=i&&(i=b,r=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-cQe,P.debug("New row in layout for block",n.id," and child ",u.id,i)),P.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${t} (px, py) ${v},${b} (${g?.size?.x},${g?.size?.y}) parent: ${g.id} width: `+m+cQe),g.size&&(v=m/2,u.size.x=r+cQe+v,P.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${r} new startingPosX${u.size.x} ${v} padding=${cQe} width=${m} halfWidth=${v} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 `+m*(u?.widthInColumns??1)/2),r=u.size.x+v,f=d.get(b)??0,b=o.get(b)??y,u.size.y=g.size.y-g.size.height/2+f+b/2+cQe,P.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${r}${cQe}${v}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2`+m*(u?.widthInColumns??1)/2)),u.children&&sQe(u,a);let e=u?.widthInColumns??1;0{e(),Uu(),cQe=B()?.block?.padding??8,mt(nQe,"calculateBlockPosition"),hQe=mt(e=>{let t=0,r=0;for(var i of e.children){var{width:n,height:a,x:s,y:o}=i.size??{width:0,height:0,x:0,y:0};P.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",o,i.type),"space"!==i.type&&((s=n/(i.widthInColumns??1))>t&&(t=s),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(aQe,"setBlockSizes"),mt(sQe,"layoutBlocks"),mt(oQe,"findBounds"),mt(lQe,"layout")}),yQe=r(()=>{wi(),Uu(),F7(),uQe=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=B(),s=_r(t);return $7(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),dQe=uQe}),vQe=r(()=>{e(),pQe=mt((e,t,r,i,n)=>{t.arrowTypeStart&&fQe(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&fQe(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),gQe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},fQe=mt((e,t,r,i,n,a)=>{var s=gQe[r];s?e.attr("marker-"+t,`url(${i}#${n}_${a}-${s}${"start"===t?"Start":"End"})`):P.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function bQe(e,t){_r(B())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var xQe,TQe,kQe,wQe,CQe,SQe,EQe,_Qe,AQe,RQe,LQe=r(()=>{e(),yQe(),F7(),vI(),bk(),Uu(),wi(),zC(),th(),AI(),mI(),vQe(),xQe={},TQe={},kQe=mt(async(t,r)=>{var i=B(),n=_r(i),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label"),e="markdown"===r.labelType,e=await $7(t,r.label,{style:r.labelStyle,useHtmlLabels:n,addSvgBackground:e,isNode:!1,markdown:e,width:e?void 0:Number.POSITIVE_INFINITY},i);s.node().appendChild(e);let o=e.getBBox(),l=o;n?(i=e.children[0],h=Q(e),o=i.getBoundingClientRect(),l=o,h.attr("width",o.width),h.attr("height",o.height)):(i=Q(e).select("text").node())&&"function"==typeof i.getBBox&&(l=i.getBBox()),s.attr("transform",dI(l,n)),xQe[r.id]=a,r.width=o.width,r.height=o.height;let c;if(r.startLabelLeft){var h=t.insert("g").attr("class","edgeTerminals"),i=h.insert("g").attr("class","inner"),s=await dQe(i,r.startLabelLeft,r.labelStyle);let e=(c=s).getBBox();n&&(a=s.children[0],s=Q(s),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)),i.attr("transform",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].startLeft=h,bQe(c,r.startLabelLeft)}if(r.startLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await dQe(s,r.startLabelRight,r.labelStyle);let e=(c=i).getBBox();n&&(h=i.children[0],i=Q(i),e=h.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),s.attr("transform",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].startRight=a,bQe(c,r.startLabelRight)}if(r.endLabelLeft){i=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),s=await dQe(h,r.endLabelLeft,r.labelStyle);let e=(c=s).getBBox();n&&(a=s.children[0],s=Q(s),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)),i.attr("transform",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].endLeft=h,bQe(c,r.endLabelLeft)}if(r.endLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await dQe(a,r.endLabelRight,r.labelStyle);let e=(c=i).getBBox();n&&(h=i.children[0],t=Q(i),e=h.getBoundingClientRect(),t.attr("width",e.width),t.attr("height",e.height)),s.attr("transform",dI(e,n)),TQe[r.id]||(TQe[r.id]={}),TQe[r.id].endRight=a,bQe(c,r.endLabelRight)}return e},"insertEdgeLabel"),mt(bQe,"setTerminalWidth"),wQe=mt((i,n)=>{P.debug("Moving label abc88 ",i.id,i.label,xQe[i.id],n);var a,s=n.updatedPath||n.originalPath,o=B(),o=rI(o).subGraphTitleTotalMargin;if(i.label){let e=xQe[i.id],t=i.x,r=i.y;s&&(a=PC.calcLabelPosition(s),P.debug("Moving label "+i.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(i.startLabelLeft){let e=TQe[i.id].startLeft,t=i.x,r=i.y;s&&(n=PC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.startLabelRight){let e=TQe[i.id].startRight,t=i.x,r=i.y;s&&(a=PC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelLeft){let e=TQe[i.id].endLeft,t=i.x,r=i.y;s&&(o=PC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelRight){let e=TQe[i.id].endRight,t=i.x,r=i.y;s&&(n=PC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),CQe=mt((e,t)=>{var r=e.x,i=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-i);return e.width/2<=r||e.height/2<=t},"outsideNode"),SQe=mt((e,i,n)=>{P.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(i)} insidePoint : ${JSON.stringify(n)} node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-n.x),s=e.width/2,o=n.xMath.abs(a-i.x)*l)return e=n.y{P.debug("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(CQe(i,e)||s)a=e,s||n.push(e);else{let t=SQe(i,a,e),r=!1;n.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),n.some(e=>e.x===t.x&&e.y===t.y)||n.push(t),s=!0}}),n},"cutPathAtIntersect"),_Qe=mt(function(e,t,r,i,n,a,s){let o=r.points,l=(P.debug("abc88 InsertEdge: edge=",r,"e=",t),!1),c=a.node(t.v),h=a.node(t.w),u=(h?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(P.debug("to cluster abc88",i[r.toCluster]),o=EQe(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(P.debug("from cluster abc88",i[r.fromCluster]),o=EQe(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=F5,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),wI(r)),f=w5().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=e.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(v=Oc(!0)),pQe(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),IQe=r(()=>{AQe=mt(e=>{var t,r=new Set;for(t of e)switch(t){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(t)}return r},"expandAndDeduplicateDirections"),RQe=mt((e,t,r,i)=>{var e=AQe(e),n=t.height+2*r.padding,a=n/2,i=i??t.width+2*a+r.padding,t=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:a,y:0},{x:i/2,y:2*t},{x:i-a,y:0},{x:i,y:0},{x:i,y:-n/3},{x:i+2*t,y:-n/2},{x:i,y:-2*n/3},{x:i,y:-n},{x:i-a,y:-n},{x:i/2,y:-n-2*t},{x:a,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*t,y:-n/2},{x:0,y:-n/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:a,y:0},{x:i-a,y:0},{x:i,y:-n/2},{x:i-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:a,y:-n},{x:i-a,y:-n},{x:i,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:i,y:-a},{x:i,y:a-n},{x:0,y:-n}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:i,y:0},{x:0,y:-a},{x:0,y:a-n},{x:i,y:-n}]:e.has("right")&&e.has("left")?[{x:a,y:0},{x:a,y:-t},{x:i-a,y:-t},{x:i-a,y:0},{x:i,y:-n/2},{x:i-a,y:-n},{x:i-a,y:t-n},{x:a,y:t-n},{x:a,y:-n},{x:0,y:-n/2}]:e.has("up")&&e.has("down")?[{x:i/2,y:0},{x:0,y:-t},{x:a,y:-t},{x:a,y:t-n},{x:0,y:t-n},{x:i/2,y:-n},{x:i,y:t-n},{x:i-a,y:t-n},{x:i-a,y:-t},{x:i,y:-t}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:i,y:-a},{x:0,y:-n}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:i,y:0},{x:0,y:-n}]:e.has("left")&&e.has("up")?[{x:i,y:0},{x:0,y:-a},{x:i,y:-n}]:e.has("left")&&e.has("down")?[{x:i,y:0},{x:0,y:0},{x:i,y:-n}]:e.has("right")?[{x:a,y:-t},{x:a,y:-t},{x:i-a,y:-t},{x:i-a,y:0},{x:i,y:-n/2},{x:i-a,y:-n},{x:i-a,y:t-n},{x:a,y:t-n},{x:a,y:t-n}]:e.has("left")?[{x:a,y:0},{x:a,y:-t},{x:i-a,y:-t},{x:i-a,y:t-n},{x:a,y:t-n},{x:a,y:-n},{x:0,y:-n/2}]:e.has("up")?[{x:a,y:-t},{x:a,y:t-n},{x:0,y:t-n},{x:i/2,y:-n},{x:i,y:t-n},{x:i-a,y:t-n},{x:i-a,y:-t}]:e.has("down")?[{x:i/2,y:0},{x:0,y:-t},{x:a,y:-t},{x:a,y:t-n},{x:i-a,y:t-n},{x:i-a,y:-t},{x:i,y:-t}]:[{x:0,y:0}]},"getArrowPoints")});function NQe(e,t){return e.intersect(t)}var DQe,MQe=r(()=>{mt(NQe,"intersectNode"),DQe=NQe});function OQe(e,t,r,i){var n=e.x,e=e.y,a=n-i.x,s=e-i.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(i.x{mt(OQe,"intersectEllipse"),PQe=OQe});function $Qe(e,t,r){return PQe(e,t,t,r)}var FQe,zQe=r(()=>{BQe(),mt($Qe,"intersectCircle"),FQe=$Qe});function qQe(e,t,r,i){var n,a,s,o,l=t.y-e.y,c=e.x-t.x,h=t.x*e.y-e.x*t.y,u=l*r.x+c*r.y+h,d=l*i.x+c*i.y+h;if(!(0!=u&&0!=d&&0{mt(qQe,"intersectLine"),mt(jQe,"sameSign"),WQe=qQe});function GQe(e,t,i){var r=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof t.forEach?t.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));for(var l=r-e.width/2-s,c=n-e.height/2-o,h=0;h{UQe(),mt(VQe=GQe,"intersectPolygon")}),ZQe=r(()=>{YQe=mt((e,t)=>{var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:i+r,y:n+e}},"intersectRect"),HQe=YQe}),QQe=r(()=>{MQe(),zQe(),BQe(),KQe(),ZQe(),XQe={node:DQe,circle:FQe,ellipse:PQe,polygon:VQe,rect:HQe}});function JQe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var eJe,tJe,rJe,iJe,nJe=r(()=>{yQe(),F7(),Uu(),wi(),bk(),th(),zC(),q7(),eJe=mt(async(e,t,r,i)=>{var n=B(),a=t.useHtmlLabels||_r(n),s=(s=r||"node default",e.insert("g").attr("class",s).attr("id",t.domId||t.id)),o=s.insert("g").attr("class","label").attr("style",t.labelStyle),l=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0];let c,h=(c="markdown"===t.labelType?$7(o,Rc($C(l),n),{useHtmlLabels:a,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):await dQe(o,Rc($C(l),n),t.labelStyle,!1,i)).getBBox(),u=t.padding/2;return _r(n)&&(r=c.children[0],e=Q(c),await z7(r,l),h=r.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)),a?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:u,label:o}},"labelHelper"),tJe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(JQe,"insertPolygonShape")}),aJe=r(()=>{nJe(),e(),Uu(),wi(),QQe(),rJe=mt(async(e,t)=>{t.useHtmlLabels||_r(B())||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:i}=await eJe(e,t,"node "+t.classes,!0),n=(P.info("Classes = ",t.classes),e.insert("rect",":first-child"));return n.attr("rx",t.rx).attr("ry",t.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+t.padding).attr("height",r.height+t.padding),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},e},"note"),iJe=rJe});function sJe(e,t,r,i){let n=[],a=mt(e=>{n.push(e,0)},"addBorder"),s=mt(e=>{n.push(0,e)},"skipBorder");(t.includes("t")?(P.debug("add top border"),a):s)(r),(t.includes("r")?(P.debug("add right border"),a):s)(i),(t.includes("b")?(P.debug("add bottom border"),a):s)(r),(t.includes("l")?(P.debug("add left border"),a):s)(i),e.attr("stroke-dasharray",n.join(" "))}var oJe,lJe,cJe,hJe,uJe,dJe,pJe,gJe,fJe,mJe,yJe,vJe,bJe,xJe,TJe,kJe,wJe,CJe,SJe,EJe,_Je,AJe,RJe,LJe,IJe,NJe,DJe,MJe,OJe,PJe=r(()=>{bk(),Uu(),wi(),e(),IQe(),yQe(),QQe(),aJe(),nJe(),oJe=mt(e=>e?" "+e:"","formatClass"),lJe=mt((e,t)=>`${t||"node default"}${oJe(e.classes)} `+oJe(e.class),"getClassesFromNode"),cJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=n+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return P.info("Question main (Circle)"),(e=JQe(r,s,s,o)).attr("style",t.style),tJe(t,e),t.intersect=function(e){return P.warn("Intersect called"),XQe.polygon(t,o,e)},r},"question"),hJe=mt((e,t)=>((e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(e){return e.x+","+e.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(e){return XQe.circle(t,14,e)},e),"choice"),uJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=t.positioned?t.height:i.height+t.padding,a=n/4,s=t.positioned?t.width:i.width+2*a+t.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],l=JQe(r,s,n,o);return l.attr("style",t.style),tJe(t,l),t.intersect=function(e){return XQe.polygon(t,o,e)},r},"hexagon"),dJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,void 0,!0),n=i.height+2*t.padding,a=n/2,s=i.width+2*a+t.padding,o=t.positioned&&1<(t.widthInColumns??1)&&t.width>s?t.width:s,l=RQe(t.directions,i,t,o),c=JQe(r,o,n,l);return c.attr("style",t.style),tJe(t,c),t.intersect=function(e){return XQe.polygon(t,l,e)},r},"block_arrow"),pJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return JQe(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(e){return XQe.polygon(t,s,e)},r},"rect_left_inv_arrow"),gJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],o=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"lean_right"),fJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],o=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"lean_left"),mJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],o=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"trapezoid"),yJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"inv_trapezoid"),vJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],o=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"rect_right_inv_arrow"),bJe=mt(async(e,n)=>{let{shapeSvg:t,bbox:r}=await eJe(e,n,lJe(n,void 0),!0),i=r.width+n.padding,a=i/2,s=a/(2.5+i/50),o=r.height+s+n.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",n.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return tJe(n,c),n.intersect=function(t){var r=XQe.rect(n,t),i=r.x-n.x;if(0!=a&&(Math.abs(i)n.height/2-s)){let e=s*s*(1-i*i/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0{var{shapeSvg:e,bbox:r,halfPadding:i}=await eJe(e,t,"node "+t.classes+" "+t.class,!0),n=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-i,r=t.positioned?-s/2:-r.height/2-i;return n.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(i=new Set(Object.keys(t.props)),t.props.borders&&(sJe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{P.warn("Unknown node property "+e)})),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},e},"rect"),TJe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await eJe(e,t,"node "+t.classes,!0),n=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-i,r=t.positioned?-s/2:-r.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(i=new Set(Object.keys(t.props)),t.props.borders&&(sJe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{P.warn("Unknown node property "+e)})),tJe(t,n),t.intersect=function(e){return XQe.rect(t,e)},e},"composite"),kJe=mt(async(e,t)=>{var r,e=(await eJe(e,t,"label",!0)).shapeSvg,i=(P.trace("Classes = ",t.class),e.insert("rect",":first-child"));return i.attr("width",0).attr("height",0),e.attr("class","label edgeLabel"),t.props&&(r=new Set(Object.keys(t.props)),t.props.borders&&(sJe(i,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{P.warn("Unknown node property "+e)})),tJe(t,i),t.intersect=function(e){return XQe.rect(t,e)},e},"labelRect"),mt(sJe,"applyNodePropertyBorders"),wJe=mt(async(e,t)=>{let r,i=(r=t.classes?"node "+t.classes:"node default",e.insert("g").attr("class",r).attr("id",t.domId||t.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText,l,c=(l="object"==typeof o?o[0]:o,P.info("Label text abc79",l,o,"object"==typeof o),await dQe(s,l,t.labelStyle,!0,!0)),h={width:0,height:0};_r(B())&&(e=c.children[0],d=Q(c),h=e.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),P.info("Text 2",o);var u,e=o.slice(1,o.length),d=c.getBBox(),e=await dQe(s,e.join?e.join("
"):e,t.labelStyle,!0,!0),p=(_r(B())&&(p=e.children[0],u=Q(e),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),t.padding/2);return Q(e).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),Q(c).attr("transform","translate( "+(h.width{var{shapeSvg:e,bbox:r}=await eJe(e,t,lJe(t,void 0),!0),i=r.height+t.padding,r=r.width+i/4+t.padding,r=e.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i);return tJe(t,r),t.intersect=function(e){return XQe.rect(t,e)},e},"stadium"),SJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await eJe(e,t,lJe(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),P.info("Circle main"),tJe(t,a),t.intersect=function(e){return P.info("Circle intersect",t,i.width/2+n,e),XQe.circle(t,i.width/2+n,e)},r},"circle"),EJe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await eJe(e,t,lJe(t,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",t.class),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n+5).attr("width",i.width+t.padding+10).attr("height",i.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),P.info("DoubleCircle main"),tJe(t,s),t.intersect=function(e){return P.info("DoubleCircle intersect",t,i.width/2+n+5,e),XQe.circle(t,i.width/2+n+5,e)},r},"doublecircle"),_Je=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await eJe(e,t,lJe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=JQe(r,n,a,s);return o.attr("style",t.style),tJe(t,o),t.intersect=function(e){return XQe.polygon(t,s,e)},r},"subroutine"),AJe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),tJe(t,r),t.intersect=function(e){return XQe.circle(t,7,e)},e},"start"),RJe=mt((e,t,r)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=70,a=10;return"LR"===r&&(n=10,a=70),e=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join"),tJe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return XQe.rect(t,e)},i},"forkJoin"),LJe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child"),i=e.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),tJe(t,i),t.intersect=function(e){return XQe.circle(t,7,e)},e},"end"),IJe=mt(async(e,s)=>{let t=s.padding/2,r,i=(r=s.classes?"node "+s.classes:"node default",e.insert("g").attr("class",r).attr("id",s.domId||s.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),o=i.insert("line"),l=0,c=4,h=i.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=await dQe(h,p,s.labelStyle,!0,!0),f=g.getBBox(),m=(_r(B())&&(e=g.children[0],y=Q(g),f=e.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(_r(B())?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),Q(e=await dQe(h,m,s.labelStyle,!0,!0)).attr("class","classTitle");let v=e.getBBox(),b=(_r(B())&&(y=e.children[0],T=Q(e),v=y.getBoundingClientRect(),T.attr("width",v.width),T.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),x=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(_r(B())&&(r=r.replace(//g,">")),await dQe(h,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;_r(B())&&(e=i.children[0],a=Q(i),n=e.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),c+=n.height+4,b.push(i)}),c+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(_r(B())&&(r=r.replace(//g,">")),await dQe(h,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;_r(B())&&(e=i.children[0],a=Q(i),n=e.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),c+=n.height+4,x.push(i)}),c+=8,d&&(y=(l-f.width)/2,Q(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var T=(l-v.width)/2;return Q(e).attr("transform","translate( "+(-1*l/2+T)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,b.forEach(e=>{Q(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,x.forEach(e=>{Q(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),n.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-t).attr("y",-c/2-t).attr("width",l+s.padding).attr("height",c+s.padding),tJe(s,n),s.intersect=function(e){return XQe.rect(s,e)},i},"class_box"),NJe={rhombus:cJe,composite:TJe,question:cJe,rect:xJe,labelRect:kJe,rectWithTitle:wJe,choice:hJe,circle:SJe,doublecircle:EJe,stadium:CJe,hexagon:uJe,block_arrow:dJe,rect_left_inv_arrow:pJe,lean_right:gJe,lean_left:fJe,trapezoid:mJe,inv_trapezoid:yJe,rect_right_inv_arrow:vJe,cylinder:bJe,start:AJe,end:LJe,note:iJe,subroutine:_Je,fork:RJe,join:RJe,class_box:IJe},DJe={},MJe=mt(async(t,r,i)=>{let n,a;if(r.link){let e;"sandbox"===B().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await NJe[r.shape](n,r,i)}else a=await NJe[r.shape](t,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),DJe[r.id]=n,r.haveCallback&&DJe[r.id].attr("class",DJe[r.id].attr("class")+" clickable"),n},"insertNode"),OJe=mt(e=>{var t=DJe[e.id],r=(P.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")});function BJe(e,t,r=!1){let i=e,n="default",a=(0<(i?.classes?.length||0)&&(n=(i?.classes??[]).join(" ")),n+=" flowchart-label",0),s="",o;switch(i.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=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"}var e=iC(i?.styles??[]),l=i.label,c=i.size??{width:0,height:0,x:0,y:0},t=t.getDiagramId();return{labelStyle:e.labelStyle,shape:s,labelText:l,rx:a,ry:a,class:n,style:e.style,id:i.id,domId:t?t+"-"+i.id:i.id,directions:i.directions,width:c.width,height:c.height,x:c.x,y:c.y,positioned:r,intersect:void 0,type:i.type,padding:o??vr()?.block?.padding??0,widthInColumns:i.widthInColumns??1}}async function $Je(e,t,r){var i;"group"!==(t=BJe(t,r,!1)).type&&(i=vr(),i=(e=await MJe(e,t,{config:i})).node().getBBox(),(t=r.getBlock(t.id)).size={width:i.width,height:i.height,x:0,y:0,node:e},r.setBlock(t),e.remove())}async function FJe(e,t,r){var i=BJe(t,r,!0);"space"!==r.getBlock(i.id).type&&(r=vr(),await MJe(e,i,{config:r}),t.intersect=i?.intersect,OJe(i))}async function zJe(e,t,r,i){for(var n of t)await i(e,n,r),n.children&&await zJe(e,n.children,r,i)}async function qJe(e,t,r){await zJe(e,t,r,$Je)}async function jJe(e,t,r){await zJe(e,t,r,FJe)}async function WJe(e,t,r,i,n){var a,s,o,l,c,h=new nH({multigraph:!0,compound:!0});h.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&h.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of t)s.start&&s.end&&(o=i.getBlock(s.start),l=i.getBlock(s.end),o?.size)&&l?.size&&(o=o.size,l=l.size,o=[{x:o.x,y:o.y},{x:o.x+(l.x-o.x)/2,y:o.y+(l.y-o.y)/2},{x:l.x,y:l.y}],l=n?n+"-"+s.id:s.id,c=("thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal")+` ${"dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`,_Qe(e,{v:s.start,w:s.end,name:l},{...s,id:l,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:o,classes:c},void 0,"block",h,n),s.label)&&(await kQe(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:o,classes:c}),wQe({...s,x:o[1].x,y:o[1].y},{originalPath:o}))}var UJe,GJe,VJe,YJe=r(()=>{sH(),wi(),LQe(),PJe(),zC(),mt(BJe,"getNodeFromBlock"),mt($Je,"calculateBlockSize"),mt(FJe,"insertBlockPositioned"),mt(zJe,"performOperations"),mt(qJe,"calculateBlockSizes"),mt(jJe,"insertBlocks"),mt(WJe,"insertEdges")}),HJe=r(()=>{bk(),wi(),iQe(),e(),Ch(),mQe(),YJe(),UJe=mt(function(e,t){return t.db.getClasses()},"getClasses"),GJe=mt(async function(e,t,r,i){var{securityLevel:n,block:a}=vr(),s=i.db;s.setDiagramId(t);let o;"sandbox"===n&&(o=Q("#i"+t));var l=Q("sandbox"===n?o.nodes()[0].contentDocument.body:"body"),n="sandbox"===n?l.select(`[id="${t}"]`):Q(`[id="${t}"]`),l=(eQe(n,["point","circle","cross"],i.type,t),s.getBlocks()),i=s.getBlocksFlat(),c=s.getEdges(),h=n.insert("g").attr("class","block"),u=(await qJe(h,l,s),lQe(s));await jJe(h,l,s),await WJe(h,c,i,s,t),u&&(l=u,h=Math.max(1,Math.round(l.width/l.height*.125)),c=l.height+h+10,i=l.width+10,s=a.useMaxWidth,yh(n,c,i,!!s),P.debug("Here Bounds",u,l),n.attr("viewBox",`${l.x-5} ${l.y-5} ${l.width+10} `+(l.height+10)))},"draw"),VJe={draw:GJe,getClasses:UJe}}),XJe={};Vat(XJe,{diagram:()=>KJe});var KJe,ZJe,QJe,JJe,eet,tet,ret,iet,net,aet,set,oet,cet,het,uet,det,pet,get,fet,met=r(()=>{aZe(),tQe(),rQe(),HJe(),KJe={parser:iZe,db:FZe,renderer:VJe,styles:jZe}}),yet=r(()=>{wi(),Ti(),Wu(),zC(),dOe(),ZJe=new cOe(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),QJe=mt(()=>{ZJe.reset(),Ph()},"clear"),JJe=mt(()=>ZJe.records.stack[0],"getRoot"),eet=mt(()=>ZJe.records.cnt,"getCount"),tet=ir.treeView,ret=mt(()=>lC(tet,vr().treeView),"getConfig"),iet=mt((e,t)=>{for(;e<=ZJe.records.stack[ZJe.records.stack.length-1].level;)ZJe.records.stack.pop();t={id:ZJe.records.cnt++,level:e,name:t,children:[]},ZJe.records.stack[ZJe.records.stack.length-1].children.push(t),ZJe.records.stack.push(t)},"addNode"),net={clear:QJe,addNode:iet,getRoot:JJe,getCount:eet,getConfig:ret,getAccTitle:$h,getAccDescription:zh,getDiagramTitle:jh,setAccDescription:Fh,setAccTitle:Bh,setDiagramTitle:qh}}),vet=r(()=>{e(),hOe(),yet(),sOe(),aet=mt(e=>{oOe(e,net),e.nodes.map(e=>net.addNode(e.indent?parseInt(e.indent):0,e.name))},"populate"),set={parse:mt(async e=>{e=await rOe("treeView",e),P.debug(e),aet(e)},"parse")}}),bet=r(()=>{e(),z$e(),Ch(),oet=mt((e,t,r,i,n)=>{var{height:a,width:s}=(i=i.append("text").text(r.name).attr("dominant-baseline","middle").attr("class","treeView-node-label")).node().getBBox(),a=a+2*n.paddingY,s=s+2*n.paddingX;i.attr("x",e+n.paddingX),i.attr("y",t+a/2),r.BBox={x:e,y:t,width:s,height:a}},"positionLabel"),cet=mt((e,t,r,i,n,a)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),het=mt((s,e,o)=>{let a=0,l=0,c=mt((e,t,r,i)=>{var i=i*(r.rowIndent+r.paddingX),{height:t,width:n}=(oet(i,a,t,e,r),t.BBox);cet(e,i-r.rowIndent,a+t/2,i,a+t/2,r.lineThickness),l=Math.max(l,i+n),a+=t},"drawNode"),h=mt((e,t=0)=>{c(s,e,o,t),e.children.forEach(e=>{h(e,t+1)});var r,{x:i,y:n,height:a}=e.BBox;e.children.length&&({y:e,height:r}=e.children[e.children.length-1].BBox,cet(s,i+o.paddingX,n+a,i+o.paddingX,e+r/2+o.lineThickness/2,o.lineThickness))},"processNode");return h(e),{totalHeight:a,totalWidth:l}},"drawTree"),uet=mt((e,t,r,i)=>{P.debug(`Rendering treeView diagram `+e);var i=(e=i.db).getRoot(),e=e.getConfig(),{totalHeight:n,totalWidth:i}=((n=(t=M$e(t)).append("g")).attr("class","tree-view"),het(n,i,e));t.attr("viewBox",`-${e.lineThickness/2} 0 ${i} `+n),yh(t,n,i,e.useMaxWidth)},"draw"),det={draw:uet}}),xet=r(()=>{zC(),pet={labelFontSize:"16px",labelColor:"black",lineColor:"black"},get=mt(({treeView:e})=>{var{labelFontSize:e,labelColor:t,lineColor:r}=lC(pet,e);return` .treeView-node-label { font-size: ${e}; fill: ${t}; } .treeView-node-line { stroke: ${r}; } `},"styles"),fet=get}),Tet={};Vat(Tet,{diagram:()=>ket});var ket,wet,Cet,Eet,_et,Aet,Ret,Let,Iet,Net,Det,Met,Oet,Pet,Bet,$et,Fet,zet,qet,jet,Wet,Uet,Get,Vet,Yet,Het,Xet,Ket,Zet,Qet,Jet,ett=r(()=>{vet(),yet(),bet(),xet(),ket={db:net,renderer:det,parser:set,styles:fet}}),ttt=r(()=>{wet={L:"left",R:"right",T:"top",B:"bottom"},Cet={L:mt(e=>e+`,${e/2} 0,${e} 0,0`,"L"),R:mt(e=>`0,${e/2} ${e},0 ${e},`+e,"R"),T:mt(e=>`0,0 ${e},0 ${e/2},`+e,"T"),B:mt(e=>e/2+`,0 ${e},${e} 0,`+e,"B")},Eet={L:mt((e,t)=>e-t+2,"L"),R:mt((e,t)=>e-2,"R"),T:mt((e,t)=>e-t+2,"T"),B:mt((e,t)=>e-2,"B")},_et=mt(function(e){return Ret(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),Aet=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),Ret=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),Let=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),Iet=mt(function(e,t){var r=Ret(e)&&Let(t),e=Let(e)&&Ret(t);return r||e},"isArchitectureDirectionXY"),Net=mt(function(e){var t=e[0],e=e[1],r=Ret(t)&&Let(e),t=Let(t)&&Ret(e);return r||t},"isArchitecturePairXY"),Det=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),Met=mt(function(e,t){return Det(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),Oet=mt(function([e,t],r){var i=r[0],r=r[1];return Ret(i)?Let(r)?[e+("L"===i?-1:1),t+("T"===r?1:-1)]:[e+("L"===i?-1:1),t]:Ret(r)?[e+("L"===r?1:-1),t+("T"===i?1:-1)]:[e,t+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Pet=mt(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Bet=mt(function(e,t){return Iet(e,t)?"bend":Ret(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),$et=mt(function(e){return"service"===e.type},"isArchitectureService"),Fet=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),zet=mt(e=>e.data(),"edgeData"),qet=mt(e=>e.data(),"nodeData")}),rtt=r(()=>{wi(),Ti(),zC(),Wu(),ttt(),jet=ir.architecture,Wet=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Bh,this.getAccTitle=$h,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getAccDescription=zh,this.setAccDescription=Fh,this.clear()}static{mt(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Ph()}addService({id:e,icon:t,in:r,title:i,iconText:n}){if(void 0!==this.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:n,title:i,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter($et)}addJunction({id:e,in:t}){if(void 0!==this.registeredIds[e])throw new Error(`The junction id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==t){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(Fet)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:r,title:i}){if(void 0!==this.registeredIds?.[e])throw new Error(`The group id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:i,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:i,lhsInto:n,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!Aet(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(r));if(!Aet(i))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(i));if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=this.nodes[e].in,h=this.nodes[t].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:e,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:t,rhsDir:i,rhsInto:a,rhsGroup:o,title:l}),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let s={},o=Object.entries(this.nodes).reduce((e,[a,t])=>(e[a]=t.edges.reduce((e,t)=>{var r,i=this.getNode(t.lhsId)?.in,n=this.getNode(t.rhsId)?.in;return i&&n&&i!==n&&"bend"!==(r=Bet(t.lhsDir,t.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),t.lhsId===a?(n=Met(t.lhsDir,t.rhsDir))&&(e[n]=t.rhsId):(i=Met(t.rhsDir,t.lhsDir))&&(e[i]=t.lhsId),e},{}),e),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((e,t)=>t===r?e:{...e,[t]:1},{}),e=mt(e=>{let n={[e]:[0,0]},a=[e];for(;0{l[t]||(n[t]=Oet([r,i],e),a.push(t))})}}return n},"BFS"),t=[e(r)];for(;0{sOe(),e(),hOe(),rtt(),Uet=mt((e,t)=>{oOe(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(e=>t.addEdge(e))},"populateDb"),Get={parser:{yy:void 0},parse:mt(async e=>{var e=await rOe("architecture",e),t=(P.debug(e),Get.parser?.yy);if(!(t instanceof Wet))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Uet(e,t)},"parse")}}),ntt=r(()=>{Vet=mt(e=>` .edge { stroke-width: ${e.archEdgeWidth}; stroke: ${e.archEdgeColor}; fill: none; } .arrow { fill: ${e.archEdgeArrowColor}; } .node-bkg { fill: none; stroke: ${e.archGroupBorderColor}; stroke-width: ${e.archGroupBorderWidth}; stroke-dasharray: 8; } .node-icon-text { display: flex; align-items: center; } .node-icon-text > div { color: #fff; margin: 1px; height: fit-content; text-align: center; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; } `,"getStyles"),Yet=Vet}),att=qat((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function i(){}mt(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i},function(e,t,r){var i,n=r(2),a=r(8),s=r(9);function o(e,t,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(i in mt(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),i=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function i(e){this.vGraphObject=e}mt(i,"LGraphObject"),e.exports=i},function(e,t,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(e,t,r,i){n.call(this,i=null==r&&null==i?t:i),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(i in mt(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];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(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},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 c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(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(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.prototype.getEdgeListToNode=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.target==t){if(e.source!=i)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.source!=i&&e.target!=i)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},h.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;re?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(t+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>t?(this.rect.y-=(this.labelHeight-t)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(t+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.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 null==this.owner?null:this.owner.getParent()},e.exports=h},function(e,t,r){var i,n=r(0);function a(){}for(i in mt(a,"FDLayoutConstants"),n)a[i]=n[i];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a},function(e,t,r){function i(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i},function(e,t,r){var i,n=r(2),d=r(10),a=r(0),s=r(7),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(e,t,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(i in mt(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var i=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,n.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var c,h=r(1);function i(e){c=r(6),this.layout=e,this.graphs=[],this.edges=[]}mt(i,"LGraphManager"),i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},i.prototype.add=function(e,t,r,i,n){if(null==r&&null==i&&null==n){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;rthis.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{for(var t=[];0{for(var t=[];0{for(var t=[];0=this.s[u+1]);){var D=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=D,uMath.abs(t)?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0!=t?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0},e.exports=Ae},function(e,t,r){var i,n;function a(e,t){for(var r=0;r{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(att()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(att()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(t){return i={45:(e,t,r)=>{var i={};i.layoutBase=r(551),i.CoSEConstants=r(806),i.CoSEEdge=r(767),i.CoSEGraph=r(880),i.CoSEGraphManager=r(578),i.CoSELayout=r(765),i.CoSENode=r(991),i.ConstraintHandler=r(902),e.exports=i},806:(e,t,r)=>{var i,n=r(551).FDLayoutConstants;function a(){}for(i in mt(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,e.exports=a},767:(e,t,r)=>{var i,n=r(551).FDLayoutEdge;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},880:(e,t,r)=>{var i,n=r(551).LGraph;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},578:(e,t,r)=>{var i,n=r(551).LGraphManager;function a(e){n.call(this,e)}for(i in mt(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},765:(e,t,r)=>{var i,n=r(551).FDLayout,a=r(578),s=r(880),h=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,b=r(551).LGraph,x=r(551).Transform,T=r(551).LinkedList;function k(){n.call(this),this.toBeTiled={},this.constraints={}}for(i in mt(k,"CoSELayout"),k.prototype=Object.create(n.prototype),n)k[i]=n[i];k.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},k.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},k.prototype.newNode=function(e){return new h(this.graphManager,e)},k.prototype.newEdge=function(e){return new o(null,null,e)},k.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},k.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},k.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},k.prototype.classicLayout=function(){var e,t,r;return 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?f.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0=2*e.length/3;i--)t=Math.floor(Math.random()*(i+1)),r=e[i],e[i]=e[t],e[t]=r;return e},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(e){var t,r;e.left?(r=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.get(e.right):e.right,s.nodesInRelativeHorizontal.includes(r)||(s.nodesInRelativeHorizontal.push(r),s.nodeToRelativeConstraintMapHorizontal.set(r,[]),s.dummyToNodeForVerticalAlignment.has(r)?s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(r).getCenterX())),s.nodesInRelativeHorizontal.includes(t)||(s.nodesInRelativeHorizontal.push(t),s.nodeToRelativeConstraintMapHorizontal.set(t,[]),s.dummyToNodeForVerticalAlignment.has(t)?s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(t)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(t).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:t,gap:e.gap}),s.nodeToRelativeConstraintMapHorizontal.get(t).push({left:r,gap:e.gap})):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,s.nodesInRelativeVertical.includes(t)||(s.nodesInRelativeVertical.push(t),s.nodeToRelativeConstraintMapVertical.set(t,[]),s.dummyToNodeForHorizontalAlignment.has(t)?s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(t)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(t).getCenterY())),s.nodesInRelativeVertical.includes(r)||(s.nodesInRelativeVertical.push(r),s.nodeToRelativeConstraintMapVertical.set(r,[]),s.dummyToNodeForHorizontalAlignment.has(r)?s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(r).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(t).push({bottom:r,gap:e.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:t,gap:e.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){var t,r;e.left?(r=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.get(e.right):e.right,a.has(r)?a.get(r).push(t):a.set(r,[t]),a.has(t)?a.get(t).push(r):a.set(t,[r])):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,o.has(t)?o.get(t).push(r):o.set(t,[r]),o.has(r)?o.get(r).push(t):o.set(r,[t]))}),c=(l=mt(function(i,n){var a=[],s=[],o=new T,l=new Set,c=0;return i.forEach(function(e,t){if(!l.has(t)){for(a[c]=[],s[c]=!1,o.push(r=t),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();n.has(r)&&(s[c]=!0),i.get(r).forEach(function(e){l.has(e)||(o.push(e),l.add(e),a[c].push(e))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},k.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=n.idToNodeMap.get(e.nodeId)).displacementX=0,e.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,t=0;ti&&(i=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},k.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(k.branchRadialLayout(t,null,0,359,0,i),b.calculateBounds(e)),n=new x;n.setDeviceOrgX(t.getMinX()),n.setDeviceOrgY(t.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;ae?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(e){var t=i.idToDummyNode[e],r=t.paddingLeft;i.adjustLocations(n[e],t.rect.x,t.rect.y,r,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)})},k.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),i=0;ih&&(h=d.rect.height)}r+=h+e.verticalPadding}},k.prototype.tileCompoundMembers=function(i,n){var a=this;this.tiledMemberPack=[],Object.keys(i).forEach(function(e){var t,r=n[e];a.tiledMemberPack[e]=a.tileNodes(i[e],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[e].width,r.rect.height=a.tiledMemberPack[e].height,r.setCenter(a.tiledMemberPack[e].centerX,a.tiledMemberPack[e].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(e=r.rect.width,t=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(e+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>e?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},k.prototype.tileNodes=function(e,t){var r=this.tileNodesByFavoringDim(e,t,!0),e=this.tileNodesByFavoringDim(e,t,!1),t=this.getOrgRatio(r);return this.getOrgRatio(e)l&&(l=e.getWidth())}),s/a),c=o/a,c=Math.pow(i-n,2)+4*(e+n)*(c+i)*a,a=(n-i+Math.sqrt(c))/(2*(e+n));return t?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((i=r*(e+n)-n)e.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},k.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;ir&&(t=i,r=e.rowWidth[i]);return t},k.prototype.canAddHorizontal=function(e,t,r){var i,n,a;return e.idealRowWidth?(n=e.rows.length-1,e.rowWidth[n]+t+e.horizontalPadding<=e.idealRowWidth):(n=this.getShortestRowIndex(e))<0||(a=e.rowWidth[n])+e.horizontalPadding+t<=e.width||(i=0,e.rowHeight[n]a&&t!=r){i.splice(-1,1),e.rows[r].push(n),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;os&&(s=i[o].height);0{var i,n=r(551).FDLayoutNode,a=r(551).IMath;function s(e,t,r,i){n.call(this,e,t,r,i)}for(i in mt(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);tX&&(X=m[T].length,K=T);X{e.exports=t}},n={},mt(r,"__webpack_require__"),r(45);function r(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,n})}),ott=qat((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(stt()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(stt()):e.cytoscapeFcose=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(t){return i={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var e=arguments.length,t=Array(1{mt(S,"sliceIterator");var i=r(140).layoutBase.LinkedList;function S(e,t){var r=[],i=!0,n=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);i=!0);}catch(e){n=!0,a=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return r}e.exports=r={getTopMostNodes:function(e){for(var i={},t=0;t{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return S(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],b=y[1],x=t.cy.getElementById(v);x&&(d=x.boundingBox(),p=n.xCoords[b]-d.w/2,g=n.xCoords[b]+d.w/2,f=n.yCoords[b]-d.h/2,m=n.yCoords[b]+d.h/2,p{var v=r(548),o=r(140).CoSELayout,b=r(140).CoSENode,x=r(140).layoutBase.PointD,T=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=mt(function(c,e){var t=c.cy,r=(n=c.eles).nodes(),i=n.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=e.nodeIndexes,p=e.xCoords,g=e.yCoords),mt(function(e){return"function"==typeof e},"isFn")),m=mt(function(e,t){return h(e)?e(t):e},"optFn"),y=v.calcParentsWithoutChildren(t,n),e=mt(function e(t,r,i,n){for(var a=r.length,s=0;s{function i(e,t){for(var r=0;r{var q=r(548),j=r(140).layoutBase.Matrix,W=r(140).layoutBase.SVD,r=mt(function(e){var n=e.cy,a=e.eles,t=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],h=[],v=[],b=[],u=[],x=[],T=void 0,k=e.piTol,i=e.samplingType,w=e.nodeSeparation,d=void 0,P=mt(function(){for(var e=0,t=!1;e{var i=r(212),r=mt(function(e){e&&e("layout","fcose",i)},"register");typeof cytoscape<"u"&&r(cytoscape),e.exports=r},140:e=>{e.exports=t}},n={},mt(r,"__webpack_require__"),r(579);function r(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,n})}),ltt=r(()=>{rh(),Het=mt(e=>`${e}`,"wrapIcon"),Xet={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Het('')},server:{body:Het('')},disk:{body:Het('')},internet:{body:Het('')},cloud:{body:Het('')},unknown:Hc,blank:{body:Het("")}}}}),ctt=r(()=>{Uu(),F7(),rh(),th(),ltt(),ttt(),zC(),Ket=mt(async function(T,e,k,w){let C=k.getConfigField("padding"),t=k.getConfigField("iconSize"),S=t/2,E=t/6,_=E/2;await Promise.all(e.edges().map(async e=>{let{source:t,sourceDir:r,sourceArrow:i,sourceGroup:n,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=zet(e),{x:h,y:u}=e[0].sourceEndpoint(),{x:d,y:p}=e[0].midpoint(),{x:g,y:f}=e[0].targetEndpoint(),m=C+4;var y,v,b,x;n&&(Ret(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(Ret(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==k.getNode(t)?.type||(Ret(r)?h+="L"===r?S:-S:u+="T"===r?S:-S),l||"junction"!==k.getNode(a)?.type||(Ret(s)?g+="L"===s?S:-S:f+="T"===s?S:-S),e[0]._private.rscratch&&((e=T.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge").attr("id",w+"-"+FC(t,a,{prefix:"L"})),i&&(x=Ret(r)?Eet[r](h,E):h-_,y=Let(r)?Eet[r](u,E):u-_,e.insert("polygon").attr("points",Cet[r](E)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),o&&(x=Ret(s)?Eet[s](g,E):g-_,y=Let(s)?Eet[s](f,E):f-_,e.insert("polygon").attr("points",Cet[s](E)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(b=Iet(r,s)?"XY":Ret(r)?"X":"Y")?Math.abs(h-g):"Y"==b?Math.abs(u-f)/1.5:Math.abs(h-g)/2,x=e.append("g"),await $7(x,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},B()),x.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==b?x.attr("transform","translate("+d+", "+p+")"):"Y"==b?x.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==b&&(y=Met(r,s))&&Net(y)&&(e=x.node().getBoundingClientRect(),[y,v]=Pet(y),x.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),b=x.node().getBoundingClientRect(),x.attr("transform",` translate(${d}, ${p-e.height/2}) translate(${y*b.width/2}, ${v*b.height/2}) rotate(${-1*y*v*45}, 0, ${e.height/2}) `)))}))},"drawEdges"),Zet=mt(async function(c,e,h,u){let d=.75*h.getConfigField("padding"),p=h.getConfigField("fontSize"),g=h.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async i=>{var n=qet(i);if("group"===n.type){var{h:i,w:a,x1:s,y1:o}=i.boundingBox(),l=c.append("rect");l.attr("id",u+"-group-"+n.id).attr("x",s+g).attr("y",o+g).attr("width",a).attr("height",i).attr("class","node-bkg");let e=c.append("g"),t=s,r=o;n.icon&&((i=e.append("g")).html(`${await eh(n.icon,{height:d,width:d,fallbackPrefix:Xet.prefix})}`),i.attr("transform","translate("+(t+g+1)+", "+(r+g+1)+")"),t+=d,r+=p/2-1-2),n.label&&(s=e.append("g"),await $7(s,n.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},B()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(t+g+4)+", "+(r+g+2)+")")),h.setElementForId(n.id,l)}}))},"drawGroups"),Qet=mt(async function(e,t,r,i){var n,a=B();for(n of r){var s=t.append("g"),o=e.getConfigField("iconSize"),l=(n.title&&(l=s.append("g"),await $7(l,n.title,{useHtmlLabels:!1,width:1.5*o,classes:"architecture-service-label"},a),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),l.attr("transform","translate("+o/2+", "+o+")")),s.append("g")),{width:c,height:h}=(n.icon?l.html(`${await eh(n.icon,{height:o,width:o,fallbackPrefix:Xet.prefix})}`):n.iconText?(l.html(`${await eh("blank",{height:o,width:o,fallbackPrefix:Xet.prefix})}`),c=l.append("g").append("foreignObject").attr("width",o).attr("height",o).append("div").attr("class","node-icon-text").attr("style",`height: ${o}px;`).append("div").html(Rc(n.iconText,a)),h=parseInt(window.getComputedStyle(c.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,c.attr("style",`-webkit-line-clamp: ${Math.floor((o-2)/h)};`)):l.append("path").attr("class","node-bkg").attr("id",i+"-node-"+n.id).attr("d",`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`),s.attr("id",i+"-service-"+n.id).attr("class","architecture-service"),s.node().getBBox());n.width=c,n.height=h,e.setElementForId(n.id,s)}return 0},"drawServices"),Jet=mt(function(n,a,e,s){e.forEach(e=>{var t=a.append("g"),r=n.getConfigField("iconSize"),{width:r,height:i}=(t.append("g").append("rect").attr("id",s+"-node-"+e.id).attr("fill-opacity","0").attr("width",r).attr("height",r),t.attr("class","architecture-junction"),t._groups[0][0].getBBox());t.width=r,t.height=i,n.setElementForId(e.id,t)})},"drawJunctions")});function htt(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function utt(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function dtt(r,e){e.nodes().map(e=>{var t=qet(e);"group"!==t.type&&(t.x=e.position().x,t.y=e.position().y,r.getElementById(t.id).attr("transform","translate("+(t.x||0)+","+(t.y||0)+")"))})}function ptt(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function gtt(e,h){e.forEach(e=>{var{lhsId:t,rhsId:r,lhsInto:i,lhsGroup:n,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=e,e=Iet(e.lhsDir,e.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:t+"-"+r,label:c,source:t,sourceDir:s,sourceArrow:i,sourceGroup:n,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:e})})}function ftt(s,e,u){let t=mt((e,h)=>Object.entries(e).reduce((r,[i,e])=>{let n=0,a=Object.entries(e);if(1===a.length)r[i]=a[0][1];else for(let t=0;t{let n={},a={};return Object.entries(e).forEach(([e,[t,r]])=>{var i=s.getNode(e)?.in??"default";n[r]??={},n[r][i]??=[],n[r][i].push(e),a[t]??={},a[t][i]??=[],a[t][i].push(e)}),{horiz:Object.values(t(n,"horizontal")).filter(e=>11[[...e,...r],[...t,...i]],[[],[]]);return{horizontal:i,vertical:n}}function mtt(e,l){let c=[],h=mt(e=>e[0]+","+e[1],"posToStr"),u=mt(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[h(t),e])),s=[h([0,0])],o={},t={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0{var t=h([i[0]+t[0],i[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),c.push({[wet[e]]:r,[wet[_et(e)]]:n,gap:1.5*l.getConfigField("iconSize")}))})}}}}),c}function ytt(h,u,d,p,g,{spatialMaps:f,groupAlignments:m}){return new Promise(t=>{let e=Q("body").append("div").attr("id","cy").attr("style","display:none"),s=fue({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{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":g.getConfigField("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:g.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(e.remove(),ptt(d,s),htt(h,s,g),utt(u,s,g),gtt(p,s),ftt(g,f,m)),i=mtt(f,g),n=g.getConfigField("iconSize"),a=g.getConfigField("idealEdgeLengthMultiplier")*n,o=.5*n,l=g.getConfigField("edgeElasticity"),c=s.layout({name:"fcose",quality:"proof",randomize:g.getConfigField("randomize"),nodeSeparation:g.getConfigField("nodeSeparation"),numIter:g.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=qet(e).parent)===qet(t).parent?a:o},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=qet(e).parent)===qet(t).parent?l:.001},alignmentConstraint:r,relativePlacementConstraint:i});c.one("layoutstop",()=>{function e(e,t,r,i){var{x:e,y:n}=e,{x:t,y:a}=t,s=(i-n+(e-r)*(n-a)/(e-t))/Math.sqrt(1+Math.pow((n-a)/(e-t),2)),o=Math.sqrt(Math.pow(i-n,2)+Math.pow(r-e,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(t-e,2)+Math.pow(a-n,2));let l=(t-e)*(i-n)-(a-n)*(r-e);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(t-e)*(r-e)+(a-n)*(i-n);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}mt(e,"getSegmentWeights"),s.startBatch();for(var t of Object.values(s.edges())){var r,i,n,a;t.data?.()&&({x:n,y:i}=t.source().position(),{x:a,y:r}=t.target().position(),n!==a)&&i!==r&&(n=t.sourceEndpoint(),a=t.targetEndpoint(),i=zet(t).sourceDir,[r,i]=Let(i)?[n.x,a.y]:[a.x,n.y],{weights:n,distances:a}=e(n,a,r,i),t.style("segment-distances",a),t.style("segment-weights",n))}s.endBatch(),c.run()}),c.run(),s.ready(e=>{P.info("Ready",e),t(s)})})}var vtt,btt,xtt=r(()=>{mue(),vtt=j(ott(),1),bk(),e(),rh(),z$e(),Ch(),ltt(),ttt(),ctt(),Zc([{name:Xet.prefix,icons:Xet}]),fue.use(vtt.default),mt(htt,"addServices"),mt(utt,"addJunctions"),mt(dtt,"positionNodes"),mt(ptt,"addGroups"),mt(gtt,"addEdges"),mt(ftt,"getAlignments"),mt(mtt,"getRelativeConstraints"),mt(ytt,"layoutArchitecture"),vtt=mt(async(e,t,r,i)=>{(i=i.db).setDiagramId(t);var n=i.getServices(),a=i.getJunctions(),s=i.getGroups(),o=i.getEdges(),l=i.getDataStructures(),c=M$e(t),h=c.append("g"),u=(h.attr("class","architecture-edges"),(d=c.append("g")).attr("class","architecture-services"),c.append("g")),d=(u.attr("class","architecture-groups"),await Qet(i,d,n,t),Jet(i,d,a,t),await ytt(n,a,s,o,i,l));await Ket(h,d,i,t),await Zet(u,d,i,t),dtt(i,d),vh(void 0,c,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),btt={draw:vtt}}),Ttt={};Vat(Ttt,{diagram:()=>ktt});var ktt,wtt,Ctt,Stt,Ett,_tt=r(()=>{itt(),rtt(),ntt(),xtt(),ktt={parser:Get,get db(){return new Wet},renderer:btt,styles:Yet}}),Att=r(()=>{wtt="position frame",Ctt="frame positioned",Stt="position relation",Ett="relation positioned"});function Rtt(){art={}}function Ltt(){let i=ort,n=art.ast,a=srt;if(n)return n.frames.forEach((r,t)=>{var e=Ftt(r,n.dataEntities,a);i=Jtt(i,{$kind:wtt,index:t,frame:r,textProps:e}),Vtt(r)?(P.debug("source frame",r.sourceFrames),n.frames.filter(t=>r.sourceFrames.some(e=>e.$refText===t.name)).forEach(e=>{i=Jtt(i,{$kind:Stt,index:t,frame:r,sourceFrame:e})})):i=Jtt(i,{$kind:Stt,index:t,frame:r})}),i={...i,sortedSwimlanesArray:Wtt(i.swimlanes)};throw new Error("No data for EventModel")}function Itt(e){art.ast=e}function Ntt(){return srt}function Dtt(e){if(2===(e=e.split(".")).length)return e[0]}function Mtt(e){var t=e.split(".");return 2===t.length?t[1]:e}function Ott(e,t){if(t&&0!==t.length)return Object.values(e).find(e=>e.namespace===t)}function Ptt(e,t,r){return Math.max(t,...Object.keys(e).filter(e=>(e=Number.parseInt(e),tNumber.parseInt(e)))+1}function Btt(e,t){var r=Dtt(e.entityIdentifier),i=Ott(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||srt.labelUiAutomation}:r?{index:Ptt(t,0,100),label:srt.labelUiAutomationPrefix+r}:{index:0,label:srt.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||srt.labelCommandReadModel}:r?{index:Ptt(t,100,200),label:srt.labelCommandReadModelPrefix+r}:{index:100,label:srt.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||srt.labelEvents}:r?{index:Ptt(t,200,300),label:srt.labelEventsPrefix+r}:{index:200,label:srt.labelEvents}}}function $tt(e){var t=vr().themeVariables;switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function Ftt(t,e,r){let i=vr(),n=Rc(Mtt(t.entityIdentifier)??"",i),a,s={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"},o=`${AC(n,r.textMaxWidth,s)}`;return t.dataInlineValue&&(a=(a=(a=t.dataInlineValue).substring(a.indexOf("{")+1)).substring(0,a.lastIndexOf("}")-1),a=Rc(a,i),a=(a=AC(a,r.textMaxWidth,s)).replaceAll(" "," ")),t.dataReference&&(e=e.find(e=>e.name===t.dataReference?.$refText))&&(a=(a=(a=e.dataBlockValue).substring(a.indexOf(`{ `)+2)).substring(0,a.lastIndexOf("}")-1),a=Rc(a,i),a=(a=AC(a,r.textMaxWidth,s)).replaceAll(" "," "),a+="
"),(e=void 0!==a)&&(o+=`

${a}`),r={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},r=LC(o,r),e=e?r.width/3:r.width,e={content:o,width:e,height:r.height},P.debug(`[${t.name}] ${t.entityIdentifier} text`,e),e}function ztt(e,t){var r=$tt(t.frame),i={width:t.textProps.width+2*srt.boxTextPadding,height:t.textProps.height+2*srt.boxTextPadding};return[{$kind:Ctt,frame:t.frame,index:t.index,visual:r,dimension:i,textProps:t.textProps}]}function qtt(e,t,r){return void 0===t?srt.contentStartX:t.index===e.index&&e.r?e.r+srt.boxPadding:void 0===r?srt.contentStartX:r.r-srt.boxOverlap+srt.boxPadding}function jtt(e,t){return e=[...e.map(e=>e.r),t],Math.max(...e)}function Wtt(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function Utt(e,t){var r=t,i=Btt(r.frame,e.swimlanes),n=i.index in e.swimlanes?e.swimlanes[i.index]:{index:i.index,label:i.label,r:0,y:i.index*srt.swimlaneMinHeight+srt.swimlaneGap,height:srt.swimlaneMinHeight,maxHeight:srt.swimlaneMinHeight},t=0e.frame.name===t.name)}function Htt(t,r,i){if(!(i<0))for(let e=i;0<=e;e--){var n=t[e];if(n.swimlane.index!==r)return n}}function Xtt(e,t){if(VTe(t.frame)||Gtt(t.index,t.frame))return[];var r=Ytt(e.boxes,t.frame);if(void 0===r)throw new Error("Target box not found for frame "+t.frame.name);return void 0===(e=t.sourceFrame?Ytt(e.boxes,t.sourceFrame):Htt(e.boxes,r.swimlane.index,t.index-1))?[]:[{$kind:Ett,frame:t.frame,index:t.index,sourceBox:e,targetBox:r}]}function Ktt(e,t){return t={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox},{...e,relations:[...e.relations,t]}}function Ztt(e,t){var r=lrt[t.$kind];return null==r?[]:(r=r(e,t),P.debug("decided events",r),r)}function Qtt(e,t){var r=t.reduce((e,t)=>{var r=crt[t.$kind];return null==r?e:r(e,t)},e);return P.debug("evolve events",{state:e,newState:r,events:t}),r}function Jtt(e,t){return Qtt(e,Ztt(e,t))}var ert,trt,rrt,irt,nrt,art,srt,ort,lrt,crt,hrt,urt,drt=r(()=>{e(),zC(),zC(),wi(),Wu(),th(),Ti(),sOe(),Att(),ert=mt(function(e){P.debug("options str",e)},"setOptions"),trt=mt(function(){return{}},"getOptions"),rrt=mt(function(){Rtt(),Ph()},"clear"),mt(Rtt,"reset"),irt=ir.eventmodeling,nrt=mt(()=>lC({...irt,...vr().eventmodeling}),"getConfig"),art={},mt(Ltt,"getState"),mt(Itt,"setAst"),srt={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "},mt(Ntt,"getDiagramProps"),ort={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]},mt(Dtt,"extractNamespace"),mt(Mtt,"extractName"),mt(Ott,"findSwimlaneByNamespace"),mt(Ptt,"findNextAvailableIndex"),mt(Btt,"calculateSwimlaneProps"),mt($tt,"calculateEntityVisualProps"),mt(Ftt,"calculateTextProps"),mt(ztt,"decidePositionFrame"),mt(qtt,"calculateX"),mt(jtt,"calculateMaxRight"),mt(Wtt,"sortedSwimlanesArray"),mt(Utt,"evolveFramePositioned"),mt(Gtt,"isFirstFrame"),mt(Vtt,"hasSourceFrame"),mt(Ytt,"findBoxByFrame"),mt(Htt,"findBoxByLineIndex"),mt(Xtt,"decidePositionRelation"),mt(Ktt,"evolveRelationPositioned"),lrt={[wtt]:ztt,[Stt]:Xtt},crt={[Ctt]:Utt,[Ett]:Ktt},mt(Ztt,"decide"),mt(Qtt,"evolve"),mt(Jtt,"dispatch"),hrt={getConfig:nrt,setOptions:ert,getOptions:trt,clear:rrt,setAccTitle:Bh,getAccTitle:$h,getAccDescription:zh,setAccDescription:Fh,setDiagramTitle:qh,getDiagramTitle:jh,setAst:Itt,getDiagramProps:Ntt,getState:Ltt}}),prt=r(()=>{sOe(),e(),hOe(),drt(),urt={parse:mt(async e=>{e=await rOe("eventmodeling",e),P.debug(e),hrt.setAst(e),oOe(e,hrt)},"parse")}});function grt(i,n){return e=>{var t=e.swimlane.y+n.swimlanePadding,r=i.append("g").attr("class","em-box");r.append("rect").attr("x",e.x).attr("y",t).attr("rx","3").attr("width",e.dimension.width).attr("height",e.dimension.height).attr("stroke",e.visual.stroke).attr("fill",e.visual.fill),r.append("foreignObject").attr("x",e.x+n.boxPadding).attr("y",t+10).attr("width",e.dimension.width-2*n.boxPadding).attr("height",e.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(e.text)}}function frt(e,t){return t{let t=e.sourceBox.swimlane.y+h.swimlanePadding,r=e.targetBox.swimlane.y+h.swimlanePadding,i=r{var t=n.append("g").attr("class","em-swimlane"),r=o.emSwimlaneBackgroundOdd??"rgb(250,250,250)",i=o.emSwimlaneBackgroundStroke??"rgb(240,240,240)";t.append("rect").attr("x",0).attr("y",e.y).attr("rx","3").attr("width",a+s.swimlanePadding).attr("height",e.height).attr("fill",r).attr("stroke",i),t.append("text").attr("font-weight",s.swimlaneTextFontWeight).attr("x",30).attr("y",e.y+30).text(e.label)}}var vrt,brt,xrt,Trt,krt,wrt=r(()=>{bk(),Uu(),e(),brt=B(),vrt=brt?.eventmodeling,mt(grt,"renderD3Box"),mt(frt,"dirUpwards"),mt(mrt,"renderD3Relation"),mt(yrt,"renderD3Swimlane"),brt=mt(function(e,t,r,i){if(P.debug("in eventmodeling renderer",e+` `,"id:",t,r),!vrt)throw new Error("EventModeling config not found");var e=i.db,{themeVariables:r,eventmodeling:i}=B(),n=Q(`[id="${t}"]`),a=e.getDiagramProps(),e=e.getState(),t="em-arrowhead-"+t,s=r.emArrowhead??"#000000";e.sortedSwimlanesArray.forEach(yrt(n,e.maxR,a,r)),e.boxes.forEach(grt(n,a)),e.relations.forEach(mrt(n,a,t,r)),n.append("defs").append("marker").attr("id",t).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",s),Hh(void 0,n,i?.padding??30,i?.useMaxWidth)},"draw"),xrt={draw:brt}}),Crt=r(()=>{Trt=mt(e=>"","getStyles"),krt=Trt}),Srt={};Vat(Srt,{diagram:()=>Ert});var Ert,_rt,Art,Rrt,Lrt,Irt,Nrt,Drt,Mrt,Ort,Prt,Brt,$rt,Frt,zrt,qrt,jrt,Wrt,Urt,Grt,Vrt,Yrt,Hrt=r(()=>{prt(),drt(),wrt(),Crt(),Ert={parser:urt,db:hrt,renderer:xrt,styles:krt}}),Xrt=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,14],n=[1,12],a=[1,13],s=[6,7,8],o=[1,20],l=[1,18],c=[1,19],h=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],g=[1,6,7,11,13,14],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 15:i.addNode(a[o-1].length,a[o].trim());break;case 16:i.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:n,14:a},t(s,[2,3]),{1:[2,2]},t(s,[2,4]),t(s,[2,5]),{1:[2,6],6:i,12:15,13:n,14:a},{6:i,9:16,12:11,13:n,14:a},{6:o,7:l,10:17,11:c},t(h,[2,18],{14:[1,21]}),t(h,[2,16]),t(h,[2,17]),{6:o,7:l,10:22,11:c},{1:[2,7],6:i,12:15,13:n,14:a},t(u,[2,14],{7:d,11:p}),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(h,[2,15]),t(u,[2,13],{7:d,11:p}),t(g,[2,11]),t(g,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{Uu(),th(),Wu(),Rrt=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{mt(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,Ph()}getRoot(){return this.root}addNode(t,r){if(r=I.sanitizeText(r,B()),this.root){this.baseLevel??=t;let e=t-this.baseLevel+1;for(e<=0&&(e=1);1=e;)this.stack.pop();this.stack[this.stack.length-1].node.children.push(t={text:r,children:[]}),this.stack.push({level:e,node:t})}else this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],qh(r)}getAccTitle(){return $h()}setAccTitle(e){Bh(e)}getAccDescription(){return zh()}setAccDescription(e){Fh(e)}getDiagramTitle(){return jh()}setDiagramTitle(e){qh(e)}}}),Zrt=r(()=>{Uu(),z$e(),Ch(),zC(),IA(),Drt=82*Math.PI/180,Lrt=Math.cos(Drt),Irt=Math.sin(Drt),Nrt=mt((e,t,r)=>{var i=e.node().getBBox(),n=i.width+2*t,a=i.height+2*t;yh(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} `+a)},"applyPaddedViewBox"),Drt=mt((e,t,r,i)=>{if(i=i.db.getRoot()){var{look:h,handDrawnSeed:u,themeVariables:d}=a=B(),p=OC(a.fontSize)[0]??14,h="handDrawn"===h,g=i.children??[],n=a.ishikawa?.diagramPadding??20,a=a.ishikawa?.useMaxWidth??!1,s=M$e(t),f=s.append("g").attr("class","ishikawa"),m=(y=h?LA.svg(s.node()):void 0)?{roughSvg:y,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,y="ishikawa-arrow-"+t;h||f.append("defs").append("marker").attr("id",y).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let o=0,l,c=h?void 0:Urt(f,o,250,o,250,"ishikawa-spine");if(Ort(f,o,250,i.text,p,m),g.length){o-=20;let e=g.filter((e,t)=>t%2==0),t=g.filter((e,t)=>t%2==1),r=Mrt(e),i=Mrt(t),n=r.total+i.total,a=250,s=250;0Math.min(e,t.getBBox().x),1/0)}h?Urt(f,o,l,0,l,"ishikawa-spine",m):(c.attr("x1",o),d=`url(#${y})`,f.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",d))}else h&&Urt(f,o,250,o,250,"ishikawa-spine",m);Nrt(s,n,a)}},"draw"),Mrt=mt(e=>{let r=mt(e=>e.children.reduce((e,t)=>e+1+r(t),0),"countDescendants");return e.reduce((e,t)=>(t=r(t),e.total+=t,e.max=Math.max(e.max,t),e),{total:0,max:0})},"sideStats"),Ort=mt((t,e,r,i,n,a)=>{var s=Math.max(6,Math.floor(110/(.6*n))),t=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${r})`),r=(e=jrt(t,qrt(i,s),0,0,"ishikawa-head-label","start",n)).node().getBBox(),i=Math.max(60,r.width+6),n=`M 0 ${-(s=Math.max(40,2*r.height+40))/2} L 0 ${s/2} Q ${2.4*i} 0 0 ${-s/2} Z`;if(a){let e=a.roughSvg.path(n,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});t.insert(()=>e,":first-child").attr("class","ishikawa-head")}else t.insert("path",":first-child").attr("class","ishikawa-head").attr("d",n);e.attr("transform",`translate(${(i-r.width)/2-r.x+3},${-r.y-r.height/2})`)},"drawHead"),Prt=mt((e,s)=>{let o=[],l=[],c=mt((e,t,r)=>{var i;for(i of-1===s?[...e].reverse():e){var n=o.length,a=i.children??[];o.push({depth:r,text:qrt(i.text,15),parentIndex:t,childCount:a.length}),r%2==0?(l.push(n),a.length&&c(a,n,r+1)):(a.length&&c(a,n,r+1),l.push(n))}},"walk");return c(e,-1,2),{entries:o,yOrder:l}},"flattenTree"),Brt=mt((t,r,e,i,n,a,s)=>{if(t=t.append("g").attr("class","ishikawa-label-group"),r=jrt(t,r,e,i+11*n,"ishikawa-label cause","middle",a).node().getBBox(),s){let e=s.roughSvg.rectangle(r.x-20,r.y-2,r.width+40,r.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});t.insert(()=>e,":first-child").attr("class","ishikawa-label-box")}else t.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",r.x-20).attr("y",r.y-2).attr("width",r.width+40).attr("height",r.height+4)},"drawCauseLabel"),$rt=mt((l,c,h,u,d,p)=>{var g=Math.sqrt(u*u+d*d);if(0!==g){let e=u/g,t=d/g,r=6*-t,i=6*e,n=c,a=h,s=`M ${n} ${a} L ${n-6*e*2+r} ${a-6*t*2+i} L ${n-6*e*2-r} ${a-6*t*2-i} Z`,o=p.roughSvg.path(s,{roughness:1,seed:p.seed,fill:p.lineColor,fillStyle:"solid",stroke:p.lineColor,strokeWidth:1});l.append(()=>o)}},"drawArrowMarker"),Frt=mt((s,e,t,r,i,n,o,l)=>{var a=e.children??[],n=n*(a.length?1:.2),c=Irt*n*i,h=r+c;if(Urt(s,t,r,n=t+-Lrt*n,h,"ishikawa-branch",l),l&&$rt(s,t,r,t-n,r-h,l),Brt(s,e.text,n,h,i,o,l),a.length){var u,d,{entries:e,yOrder:p}=Prt(a,i),g=e.length,f=new Array(g);for([u,d]of p.entries())f[d]=r+(u+1)/(g+1)*c;var m,y,v,b=new Map,x=(b.set(-1,{x0:t,y0:r,x1:n,y1:h,childCount:a.length,childrenDrawn:0}),-Lrt),T=Irt*i,k=i<0?"ishikawa-label up":"ishikawa-label down";for([m,y]of e.entries()){let e=f[m],t=b.get(y.parentIndex),r=s.append("g").attr("class","ishikawa-sub-group"),i=0,n=0,a=0;y.depth%2==0?(v=t.y1-t.y0,i=Wrt(t.x0,t.x1,v?(e-t.y0)/v:.5),n=e,a=i-(0e.split(/|\n/),"splitLines"),qrt=mt((e,t)=>{if(e.length<=t)return e;var r,i=[];for(r of e.split(/\s+/)){var n=i.length-1;0<=n&&i[n].length+1+r.length<=t?i[n]+=" "+r:i.push(r)}return i.join(` `)},"wrapText"),jrt=mt((e,t,r,i,n,a,s)=>{var o,l,t=zrt(t),c=1.05*s,h=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(t.length-1)*c/2);for([o,l]of t.entries())h.append("tspan").attr("x",r).attr("dy",0===o?0:c).text(l);return h},"drawMultilineText"),Wrt=mt((e,t,r)=>e+(t-e)*r,"lerp"),Urt=mt((t,r,i,n,a,s,o)=>{if(!o)return t.append("line").attr("class",s).attr("x1",r).attr("y1",i).attr("x2",n).attr("y2",a);{let e=o.roughSvg.line(r,i,n,a,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});t.append(()=>e).attr("class",s)}},"drawLine"),Grt={draw:Drt}}),Qrt=r(()=>{Vrt=mt(e=>` .ishikawa .ishikawa-spine, .ishikawa .ishikawa-branch, .ishikawa .ishikawa-sub-branch { stroke: ${e.lineColor}; stroke-width: 2; fill: none; } .ishikawa .ishikawa-sub-branch { stroke-width: 1; } .ishikawa .ishikawa-arrow { fill: ${e.lineColor}; } .ishikawa .ishikawa-head { fill: ${e.mainBkg}; stroke: ${e.lineColor}; stroke-width: 2; } .ishikawa .ishikawa-label-box { fill: ${e.mainBkg}; stroke: ${e.lineColor}; stroke-width: 2; } .ishikawa text { font-family: ${e.fontFamily}; font-size: ${e.fontSize}; fill: ${e.textColor}; } .ishikawa .ishikawa-head-label { font-weight: 600; text-anchor: middle; dominant-baseline: middle; font-size: 14px; } .ishikawa .ishikawa-label { text-anchor: end; } .ishikawa .ishikawa-label.cause { text-anchor: middle; dominant-baseline: middle; } .ishikawa .ishikawa-label.align { text-anchor: end; dominant-baseline: middle; } .ishikawa .ishikawa-label.up { dominant-baseline: baseline; } .ishikawa .ishikawa-label.down { dominant-baseline: hanging; } `,"getStyles"),Yrt=Vrt}),Jrt={};Vat(Jrt,{diagram:()=>eit});var eit,tit,rit,iit=r(()=>{Xrt(),Krt(),Zrt(),Qrt(),eit={parser:Art,get db(){return new Rrt},renderer:Grt,styles:Yrt}}),nit=r(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[5,8],i=[7,8,11,12,17,19,22,24],n=[1,17],a=[1,18],s=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],d=[1,58],p=[1,59],g=[1,60],f=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:mt(function(e,t,r,i,n,a,s){var o,l=a.length-1;switch(n){case 1:return a[l-1];case 2:case 3:case 4:this.$=[];break;case 5:a[l-1].push(a[l]),this.$=a[l-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[l];break;case 8:i.setDiagramTitle(a[l].substr(6)),this.$=a[l].substr(6);break;case 9:i.addSubsetData([a[l]],void 0,void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 10:i.addSubsetData([a[l-1]],a[l],void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 11:i.addSubsetData([a[l-2]],void 0,parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 12:i.addSubsetData([a[l-3]],a[l-2],parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 13:if(a[l].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l]),i.addSubsetData(a[l],void 0,void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 14:if(a[l-1].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-1]),i.addSubsetData(a[l-1],a[l],void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 15:if(a[l-2].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-2]),i.addSubsetData(a[l-2],void 0,parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 16:if(a[l-3].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-3]),i.addSubsetData(a[l-3],a[l-2],parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 17:case 18:case 19:i.addTextData(a[l-1],a[l],void 0);break;case 20:case 21:i.addTextData(a[l-2],a[l-1],a[l]);break;case 23:i.addStyleData(a[l-1],a[l]);break;case 24:case 25:case 26:if(!(o=i.getCurrentSets()))throw new Error("text requires set");i.addTextData(o,a[l],void 0);break;case 27:case 28:if(!(o=i.getCurrentSets()))throw new Error("text requires set");i.addTextData(o,a[l-1],a[l]);break;case 29:case 41:this.$=[a[l]];break;case 30:case 42:this.$=[...a[l-2],a[l]];break;case 31:this.$=[a[l-2],a[l]];break;case 33:this.$=a[l].join(" ");break;case 34:this.$=[a[l]];break;case 35:a[l-1].push(a[l]),this.$=a[l-1];break;case 43:case 44:this.$=a[l]}},"anonymous"),table:[t(r,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(i,[2,4],{6:5}),t(r,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(i,[2,5]),t(i,[2,6]),t(i,[2,7]),t(i,[2,8]),{13:16,20:n,21:a},{13:20,18:19,20:n,21:a},{13:20,18:21,20:n,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:a},t(i,[2,9],{14:[1,27],15:[1,28]}),t(s,[2,43]),t(s,[2,44]),t(i,[2,13],{14:[1,29],15:[1,30],27:o}),t(s,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(i,[2,22]),t(i,[2,24],{14:[1,35]}),t(i,[2,25],{14:[1,36]}),t(i,[2,26]),{20:l,25:37,26:38,27:o},t(i,[2,10],{15:[1,40]}),{16:[1,41]},t(i,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:a},t(i,[2,17],{14:[1,45]}),t(i,[2,18],{14:[1,46]}),t(i,[2,19]),t(i,[2,27]),t(i,[2,28]),t(i,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(i,[2,11]),{16:[1,50]},t(i,[2,15]),t(s,[2,42]),t(i,[2,20]),t(i,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:d,32:p,33:g},t(i,[2,12]),t(i,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:d,32:p,33:g}),t(f,[2,34]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(f,[2,39]),t(f,[2,40]),t(f,[2,35])],defaultActions:{6:[2,1]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{zC(),wi(),Wu(),Ti(),sit=[],oit=[],lit=[],cit=new Set,uit=!1,dit=mt((e,t,r)=>{var i=bit(e).sort(),r=r??10/Math.pow(e.length,2);1===(hit=i).length&&cit.add(i[0]),sit.push({sets:i,size:r,label:t?git(t):void 0})},"addSubsetData"),pit=mt(()=>sit,"getSubsetData"),git=mt(e=>2<=(e=e.trim()).length&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e,"normalizeText"),fit=mt(e=>e&&git(e),"normalizeStyleValue"),mit=mt((e,t,r)=>{t=git(t),oit.push({sets:bit(e).sort(),id:t,label:r?git(r):void 0})},"addTextData"),yit=mt((e,t)=>{var r,i,e=bit(e).sort(),n={};for([r,i]of t)n[r]=fit(i)??i;lit.push({targets:e,styles:n})},"addStyleData"),vit=mt(()=>lit,"getStyleData"),bit=mt(e=>e.map(e=>git(e)),"normalizeIdentifierList"),xit=mt(e=>{if(0<(e=bit(e).filter(e=>!cit.has(e))).length)throw new Error("unknown set identifier: "+e.join(", "))},"validateUnionIdentifiers"),Tit=mt(()=>oit,"getTextData"),kit=mt(()=>hit,"getCurrentSets"),wit=mt(()=>uit,"getIndentMode"),Cit=mt(e=>{uit=e},"setIndentMode"),Sit=ir.venn,mt(ait,"getConfig"),Eit=mt(()=>{Ph(),sit.length=0,oit.length=0,lit.length=0,cit.clear(),hit=void 0,uit=!1},"customClear"),_it={getConfig:ait,clear:Eit,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh,addSubsetData:dit,getSubsetData:pit,addTextData:mit,addStyleData:yit,validateUnionIdentifiers:xit,getTextData:Tit,getStyleData:vit,getCurrentSets:kit,getIndentMode:wit,setIndentMode:Cit}}),Iit=r(()=>{Ait=mt(e=>` .venn-title { font-size: 32px; fill: ${e.vennTitleTextColor}; font-family: ${e.fontFamily}; } .venn-circle text { font-size: 48px; font-family: ${e.fontFamily}; } .venn-intersection text { font-size: 48px; fill: ${e.vennSetTextColor}; font-family: ${e.fontFamily}; } .venn-text-node { font-family: ${e.fontFamily}; color: ${e.vennSetTextColor}; } `,"getStyles"),Rit=Ait});function Nit(h,e){let t=Mit(h),r=t.filter(e=>Dit(e,h)),i=0,n=0,a=[];if(1t.angle-e.angle);let c=r[r.length-1];for(let e=0;e2*e.radius&&(a=2*e.radius),(null==l||l.width>a)&&(l={circle:e,width:a,p1:u,p2:c,large:a>e.radius,sweep:!0})}null!=l&&(a.push(l),i+=Oit(l.circle.radius,l.width),c=u)}}else{let t=h[0];for(let e=1;eMath.abs(t.radius-h[e].radius)){r=!0;break}r?i=n=0:(i=t.radius*t.radius*Math.PI,a.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-1e-10,y:t.y+t.radius},width:2*t.radius,large:!0,sweep:!0}))}return n/=2,e&&(e.area=i+n,e.arcArea=i,e.polygonArea=n,e.arcs=a,e.innerPoints=r,e.intersectionPoints=t),i+n}function Dit(t,e){return e.every(e=>Pit(t,e)qit(t))}function Wit(t,r){let i=0;for(let e=0;ee.fx-t.fx,"sortOrder"),b=r.slice(),x=r.slice(),T=r.slice(),k=r.slice();for(let e=0;e{var t=e.slice();return t.fx=e.fx,t.id=e.id,t})).sort((e,t)=>e.id-t.id),i.history.push({x:f[0].slice(),fx:f[0].fx,simplex:w}));for(let e=p=0;e=f[g-1].fx){let e=!1;if(x.fx>w.fx?(Vit(T,1+u,b,-u,w),T.fx=t(T),T.fxu+c*l*d||p>=i)r=l;else{if(Math.abs(g)<=-h*d)return l;0<=g*(r-t)&&(r=t),t=l,i=p}return 0}l=l||1,c=c||1e-6,h=h||.1,mt(i,"zoom");for(let e=0;e<10;++e){if(Vit(o.x,1,s.x,l,a),p=o.fx=n(o.x,o.fxprime),g=Wit(o.fxprime,a),p>u+c*l*d||e&&p>=t)return i(r,l,t);if(Math.abs(g)<=-h*d)return l;if(0<=g)return i(l,r,p);t=p,r=l,l*=2}return l}function Xit(t,e,r){let i={x:e.slice(),fx:0,fxprime:e.slice()},n={x:e.slice(),fx:0,fxprime:e.slice()},a=e.slice(),s,o,l=1,c;c=(r=r||{}).maxIterations||20*e.length,i.fx=t(i.x,i.fxprime),Git(s=i.fxprime.slice(),i.fxprime,-1);for(let e=0;e{var r={};for(let e=0;eBit(t,r,e)-i,0,t+r)}function Qit(e,t={}){var t=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(";")}if(mt(i,"toKey"),t){var n,a,s=new Map;for(n of r)for(let t=0;te===t?0:e2===e.sets.length).forEach(e=>{var t=s[e.sets[0]],r=s[e.sets[1]],i=Zit(Math.sqrt(a[t].size/Math.PI),Math.sqrt(a[r].size/Math.PI),e.size);o[t][r]=o[r][t]=i;let n=0;e.size+1e-10>=Math.min(a[t].size,a[r].size)?n=1:e.size<=1e-10&&(n=-1),l[t][r]=l[r][t]=n}),{distances:o,constraints:l}}function ent(r,i,n,a){for(let e=0;ee.map(e=>e/l)),mt((e,t)=>ent(e,t,s,o),"obj")),h=null;for(let e=0;e2===e.sets.length)){let e=null!=o.weight?o.weight:1,t=o.sets[0],r=o.sets[1];o.size+Ent>=Math.min(a[t].size,a[r].size)&&(e=0),s[t].push({set:r,size:o.size,weight:e}),s[r].push({set:t,size:o.size,weight:e})}let l=[];function c(e,t){return t.size-e.size}Object.keys(s).forEach(t=>{let r=0;for(let e=0;et[e])),a=null!=i.weight?i.weight:1,r+=a*(n-i.size)*(n-i.size))}return r}function snt(t,e){let r=0;for(var i of e){var n,a,s;1!==i.sets.length&&(n=2===i.sets.length?(a=t[i.sets[0]],s=t[i.sets[1]],Bit(a.radius,s.radius,Pit(a,s))):Nit(i.sets.map(e=>t[e])),a=null!=i.weight?i.weight:1,s=Math.log((n+1)/(i.size+1)),r+=a*s*s)}return r}function ont(t,r,e){if(null==e?t.sort((e,t)=>t.radius-e.radius):t.sort(e),02*Math.PI;)e-=2*Math.PI;if(e>Math.PI){var u,d=t[1].y/(1e-10+t[1].x);for(u of t){var p=(u.x+d*u.y)/(1+d*d);u.x=2*p-u.x,u.y=2*p*d-u.y}}}}function lnt(r){function i(e){return e.parent!==e&&(e.parent=i(e.parent)),e.parent}function n(e,t){e=i(e),t=i(t),e.parent=t}r.forEach(e=>{e.parent=e}),mt(i,"find"),mt(n,"union");for(let t=0;t{delete e.parent}),Array.from(t.values())}function cnt(e){var t=mt(r=>({max:e.reduce((e,t)=>Math.max(e,t[r]+t.radius),Number.NEGATIVE_INFINITY),min:e.reduce((e,t)=>Math.min(e,t[r]-t.radius),Number.POSITIVE_INFINITY)}),"minMax");return{xRange:t("x"),yRange:t("y")}}function hnt(e,t,r){null==t&&(t=Math.PI/2);let o=pnt(e).map(e=>Object.assign({},e)),i=lnt(o);for(var n of i){ont(n,t,r);var a=cnt(n);n.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),n.bounds=a}i.sort((e,t)=>t.size-e.size);let l=(o=i[0]).bounds,c=(l.xRange.max-l.xRange.min)/50;function s(i,n,a){if(i){let e=i.bounds,t,r;var s;n?t=l.xRange.max-e.xRange.min+c:(t=l.xRange.max-e.xRange.max,(n=(e.xRange.max-e.xRange.min)/2-(l.xRange.max-l.xRange.min)/2)<0&&(t+=n)),a?r=l.yRange.max-e.yRange.min+c:(r=l.yRange.max-e.yRange.max,(n=(e.yRange.max-e.yRange.min)/2-(l.yRange.max-l.yRange.min)/2)<0&&(r+=n));for(s of i)s.x+=t,s.y+=r,o.push(s)}}mt(s,"addCluster");let h=1;for(;h({radius:h*e.radius,x:i+u+(e.x-s.min)*h,y:i+d+(e.y-o.min)*h,setid:e.setid})))}function dnt(e){var t,r={};for(t of e)r[t.setid]=t;return r}function pnt(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function gnt(y={}){let v=!1,b=600,x=350,T=15,k=1e3,w=Math.PI/2,C=!0,S=null,E=!0,_=!0,A=null,R=null,L=!1,I=null,N=!(!y||!y.symmetricalTextCentre)&&y.symmetricalTextCentre,t={},r=y&&y.colourScheme?y.colourScheme:y&&y.colorScheme?y.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],i=0,D=mt(function(e){return e in t?t[e]:(e=t[e]=r[i],(i+=1)>=r.length&&(i=0),e)},"colours"),M=Kit,O=ant;function n(e){let t=e.datum(),r=new Set,i=(t.forEach(e=>{0==e.size&&1==e.sets.length&&r.add(e.sets[0])}),t=t.filter(e=>!e.sets.some(e=>r.has(e))),{}),n={};if(0{e.label&&(a[e.sets]=e.label)}),mt(s,"label"),e.selectAll("svg").data([i]).enter().append("svg");var o=e.select("svg");v?o.attr("viewBox",`0 0 ${b} `+x):o.attr("width",b).attr("height",x);let l={},c=!1;function h(e){return r=>Cnt(e.sets.map(e=>{var t=l[e],e=i[e],t=t||{x:b/2,y:x/2,radius:1},e=e||{x:b/2,y:x/2,radius:1};return{x:t.x*(1-r)+e.x*r,y:t.y*(1-r)+e.y*r,radius:t.radius*(1-r)+e.radius*r}}),I)}o.selectAll(".venn-area path").each(function(e){var t=this.getAttribute("d");1==e.sets.length&&t&&!L&&(c=!0,l[e.sets[0]]=Tnt(t))}),mt(h,"pathTween");var u=(o=o.selectAll(".venn-area").data(t,e=>e.sets)).enter().append("g").attr("class",e=>"venn-area venn-"+(1==e.sets.length?"circle":"intersection")+(e.colour||e.color?" venn-coloured":"")).attr("data-venn-sets",e=>e.sets.join("_")),d=u.append("path"),p=u.append("text").attr("class","label").text(e=>s(e)).attr("text-anchor","middle").attr("dy",".35em").attr("x",b/2).attr("y",x/2);function g(e){return"function"==typeof e.transition?e.transition("venn").duration(k):e}_&&(d.style("fill-opacity","0").filter(e=>1==e.sets.length).style("fill",e=>e.colour||e.color||D(e.sets)).style("fill-opacity",".25"),p.style("fill",e=>e.colour||e.color?"#FFF":y.textFill||(1==e.sets.length?D(e.sets):"#444"))),mt(g,"asTransition");let f=e;c&&"function"==typeof f.transition?(f=g(e)).selectAll("path").attrTween("d",h):f.selectAll("path").attr("d",e=>Cnt(e.sets.map(e=>i[e])),I);var d=f.selectAll("text").filter(e=>e.sets in n).text(e=>s(e)).attr("x",e=>Math.floor(n[e.sets].x)).attr("y",e=>Math.floor(n[e.sets].y)),e=(E&&(c?"on"in d?d.on("end",fnt(i,s)):d.each("end",fnt(i,s)):d.each(fnt(i,s))),g(o.exit()).remove()),m=("function"==typeof o.transition&&e.selectAll("path").attrTween("d",h),e.selectAll("text").attr("x",b/2).attr("y",x/2));return null!==A&&(p.style("font-size","0px"),d.style("font-size",A),m.style("font-size","0px")),{circles:i,textCentres:n,nodes:o,enter:u,update:f,exit:e}}return mt(n,"chart"),n.wrap=function(e){return arguments.length?(E=e,n):E},n.useViewBox=function(){return v=!0,n},n.width=function(e){return arguments.length?(b=e,n):b},n.height=function(e){return arguments.length?(x=e,n):x},n.padding=function(e){return arguments.length?(T=e,n):T},n.distinct=function(e){return arguments.length?(L=e,n):L},n.colours=function(e){return arguments.length?(D=e,n):D},n.colors=function(e){return arguments.length?(D=e,n):D},n.fontSize=function(e){return arguments.length?(A=e,n):A},n.round=function(e){return arguments.length?(I=e,n):I},n.duration=function(e){return arguments.length?(k=e,n):k},n.layoutFunction=function(e){return arguments.length?(M=e,n):M},n.normalize=function(e){return arguments.length?(C=e,n):C},n.scaleToFit=function(e){return arguments.length?(S=e,n):S},n.styled=function(e){return arguments.length?(_=e,n):_},n.orientation=function(e){return arguments.length?(w=e,n):w},n.orientationOrder=function(e){return arguments.length?(R=e,n):R},n.lossFunction=function(e){return arguments.length?(O="default"===e?ant:"logRatio"===e?snt:e,n):O},n}function fnt(m,y){return function(e){let r=this,t=m[e.sets[0]].radius||50,i=y(e)||"",n=i.split(/\s+/).reverse(),a=(i.length+n.length)/3,s=n.pop(),o=[s],l=0,c=(r.textContent=null,[]);function h(e){var t=r.ownerDocument.createElementNS(r.namespaceURI,"tspan");return t.textContent=e,c.push(t),r.append(t),t}mt(h,"append");let u=h(s);for(;s=n.pop();){o.push(s);var d=o.join(" ");(u.textContent=d).length>a&&u.getComputedTextLength()>t&&(o.pop(),u.textContent=o.join(" "),o=[s],u=h(s),l++)}let p=.35-1.1*l/2,g=r.getAttribute("x"),f=r.getAttribute("y");c.forEach((e,t)=>{e.setAttribute("x",g),e.setAttribute("y",f),e.setAttribute("dy",p+1.1*t+"em")})}}function mnt(t,r,i){let n=r[0].radius-Pit(r[0],t);for(let e=1;e=l&&(o=s[e],l=c)}let h=Yit(e=>-1*mnt({x:e[0],y:e[1]},t,r),[o.x,o.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:e?0:h[0],y:h[1]},d=!0;for(n of t)if(Pit(u,n)>n.radius){d=!1;break}for(a of r)if(Pit(u,a)e.p1)))}function vnt(r){var e,i={},n=Object.keys(r);for(e of n)i[e]=[];for(let t=0;tMath.round(e*r)/r:e=>e;if(1==e.length)return t=e[0].circle,xnt(i(t.x),i(t.y),i(t.radius));var n,a=[` M`,i(e[0].p2.x),i(e[0].p2.y)];for(n of e){var s=i(n.circle.radius);a.push(` A`,s,s,0,n.large?1:0,n.sweep?1:0,i(n.p1.x),i(n.p1.y))}return a.join(" ")}function Cnt(e,t){return wnt(knt(e),t)}function Snt(e,t={}){let{lossFunction:r,layoutFunction:i=Kit,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:d,round:p=2}=t,g=i(e,{lossFunction:"default"!==r&&r?"logRatio"===r?snt:r:ant,distinct:d}),f=unt(n?hnt(g,a,s):g,o,l,c,h),m=bnt(f,e,u),y=new Map(Object.keys(f).map(e=>[e,{set:e,x:f[e].x,y:f[e].y,radius:f[e].radius}])),v=e.map(e=>{var t=e.sets.map(e=>y.get(e)),r=knt(t);return{circles:t,arcs:r,path:wnt(r,p),area:e,has:new Set(e.sets)}});function b(e){let r="";for(let t of v)t.has.size>e.length&&e.every(e=>t.has.has(e))&&(r+=" "+t.path);return r}return mt(b,"genDistinctPath"),v.map(({circles:e,arcs:t,path:r,area:i})=>({data:i,text:m[i.sets],circles:e,arcs:t,path:r,distinctPath:r+b(i.sets)}))}var Ent,_nt=r(()=>{mt(Nit,"intersectionArea"),mt(Dit,"containedInCircles"),mt(Mit,"getIntersectionPoints"),mt(Oit,"circleArea"),mt(Pit,"distance"),mt(Bit,"circleOverlap"),mt($it,"circleCircleIntersection"),mt(Fit,"getCenter"),mt(zit,"bisect"),mt(qit,"zeros"),mt(jit,"zerosM"),mt(Wit,"dot"),mt(Uit,"norm2"),mt(Git,"scale"),mt(Vit,"weightedSum"),mt(Yit,"nelderMead"),mt(Hit,"wolfeLineSearch"),mt(Xit,"conjugateGradient"),mt(Kit,"venn"),Ent=1e-10,mt(Zit,"distanceFromIntersectArea"),mt(Qit,"addMissingAreas"),mt(Jit,"getDistanceMatrices"),mt(ent,"constrainedMDSGradient"),mt(tnt,"bestInitialLayout"),mt(rnt,"constrainedMDSLayout"),mt(nnt,"greedyLayout"),mt(ant,"lossFunction"),mt(snt,"logRatioLossFunction"),mt(ont,"orientateCircles"),mt(lnt,"disjointCluster"),mt(cnt,"getBoundingBox"),mt(hnt,"normalizeSolution"),mt(unt,"scaleSolution"),mt(dnt,"toObjectNotation"),mt(pnt,"fromObjectNotation"),mt(gnt,"VennDiagram"),mt(fnt,"wrapText"),mt(mnt,"circleMargin"),mt(ynt,"computeTextCentre"),mt(vnt,"getOverlappingCircles"),mt(bnt,"computeTextCentres"),mt(xnt,"circlePath"),mt(Tnt,"circleFromPath"),mt(knt,"intersectionAreaArcs"),mt(wnt,"arcsToPath"),mt(Cnt,"intersectionAreaPath"),mt(Snt,"layout")});function Ant(e){var t,r=new Map;for(t of e){var i=t.targets.join("|"),n=r.get(i);n?Object.assign(n,t.styles):r.set(i,{...t.styles})}return r}function Rnt(e){return e.join("|")}function Lnt(e,t,r,i,a,s){var n,o,l,c=e?.useDebugLayout??!1,h=r.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(n of i){var d=Rnt(n.sets),p=u.get(d);p?p.push(n):u.set(d,[n])}for([o,l]of u.entries())if((b=t.get(o))?.text){let t=b.text.x,r=b.text.y,e=Math.min(...b.circles.map(e=>e.radius)),i=Math.min(...b.circles.map(e=>e.radius-Math.hypot(t-e.x,r-e.y))),n=Number.isFinite(i)?Math.max(0,i):0;0===n&&Number.isFinite(e)&&(n=.6*e);var g,f,m=h.append("g").attr("class","venn-text-area").attr("font-size",40*a+"px"),y=(c&&m.append("circle").attr("class","venn-text-debug-circle").attr("cx",t).attr("cy",r).attr("r",n).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*a).attr("stroke-dasharray",6*a+" "+4*a),Math.max(80*a,2*n*.95)),v=Math.max(60*a,2*n*.95),b=(b.data.label&&0{bk(),ai(),wi(),z$e(),_nt(),Ch(),IA(),mt(Ant,"buildStyleByKey"),Int=mt((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:l,look:s,handDrawnSeed:c}=vr(),h="handDrawn"===s,u=[l.venn1,l.venn2,l.venn3,l.venn4,l.venn5,l.venn6,l.venn7,l.venn8].filter(Boolean),o=n.getDiagramTitle?.(),d=n.getSubsetData(),p=n.getTextData(),g=Ant(n.getStyleData()),f=a?.width??800,m=a?.height??450,y=f/1600,v=o?48*y:0,b=l.primaryTextColor??l.textColor,x=M$e(t);x.attr("viewBox",`0 0 ${f} `+m),o&&x.append("text").text(o).attr("class","venn-title").attr("font-size",32*y+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*y).style("fill",l.vennTitleTextColor||l.titleColor);var T,i=Q(document.createElement("div")),t=gnt().width(f).height(m-v);i.datum(d).call(t);let k=h?LA.svg(i.select("svg").node()):void 0,w=Snt(d,{width:f,height:m-v,padding:a?.padding??15}),C=new Map;for(T of w){var S=Rnt([...T.data.sets].sort());C.set(S,T)}0(e=Rnt([...e.sets].sort()),g.get(e)?.color??l.vennSetTextColor??b)),i.selectAll(".venn-intersection path").style("fill-opacity",e=>(e=Rnt([...e.sets].sort()),g.get(e)?.fill?1:0)).style("fill",e=>(e=Rnt([...e.sets].sort()),g.get(e)?.fill??"transparent")));var _=x.append("g").attr("transform",`translate(0, ${v})`);if((t=i.select("svg").node())&&"childNodes"in t)for(var A of[...t.childNodes])_.node()?.appendChild(A);yh(x,m,f,a?.useMaxWidth??!0)},"draw"),mt(Rnt,"stableSetsKey"),mt(Lnt,"renderTextNodes"),Nnt={draw:Int}}),Mnt={};Vat(Mnt,{diagram:()=>Ont});var Ont,Pnt,Bnt=r(()=>{nit(),Lit(),Iit(),Dnt(),Ont={parser:rit,db:_it,renderer:Nnt,styles:Rit}}),$nt=r(()=>{Ti(),wi(),zC(),C8(),Wu(),Pnt=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Bh,this.getAccTitle=$h,this.setDiagramTitle=qh,this.getDiagramTitle=jh,this.getAccDescription=zh,this.setAccDescription=Fh}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=ir,t=vr();return lC({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let r=this.classes.get(e)??{id:e,styles:[],textStyles:[]},i=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(e=>{y8(e)&&(r?.textStyles?r.textStyles.push(e):r.textStyles=[e]),r?.styles?r.styles.push(e):r.styles=[e]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ph(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function Fnt(e){if(!e.length)return[];let i=[],n=[];return e.forEach(e=>{var t,r={name:e.name,children:"Leaf"===e.type?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(r.value=e.value);0=e.level;)n.pop();0===n.length?i.push(r):(t=n[n.length-1].node).children?t.children.push(r):t.children=[r],"Leaf"!==e.type&&n.push({node:r,level:e.level})}),i}var znt,qnt,jnt,Wnt,Unt,Gnt,Vnt,Ynt,Hnt,Xnt=r(()=>{mt(Fnt,"buildHierarchy")}),Knt=r(()=>{sOe(),e(),hOe(),Xnt(),$nt(),znt=mt((e,i)=>{oOe(e,i);var t,r,n=[];for(t of e.TreemapRows??[])"ClassDefStatement"===t.$type&&i.addClass(t.className??"",t.styleText??"");for(r of e.TreemapRows??[]){var a,s,o,l=r.item;l&&(o=r.indent?parseInt(r.indent):0,a=qnt(l),s=0<(s=l.classSelector?i.getStylesForClass(l.classSelector):[]).length?s:void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},n.push(o))}let c=Fnt(n),h=mt((e,t)=>{for(var r of e)i.addNode(r,t),r.children&&0e.name?String(e.name):"","getItemName"),jnt={parser:{yy:void 0},parse:mt(async e=>{try{var t=await rOe("treemap",e),r=(P.debug("Treemap AST:",t),jnt.parser?.yy);if(!(r instanceof Pnt))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");znt(t,r)}catch(e){throw P.error("Error parsing treemap:",e),e}},"parse")}}),Znt=r(()=>{z$e(),ede(),Ch(),bk(),C8(),wi(),e(),Wnt=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=vr().themeVariables;if(h){var s=c?30:0,d=M$e(a),p=o.nodeWidth?10*o.nodeWidth:960,g=o.nodeHeight?10*o.nodeHeight:500,f=p,m=g+s;d.attr("viewBox",`0 0 ${f} `+m),yh(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+wv(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+wv(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+wv(t||"")(e),"valueFormat")}else r=wv(y)}catch(e){P.error("Error creating format function:",e),r=wv(",")}let t=$b().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),i=$b().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),n=$b().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);c&&d.append("text").attr("x",f/2).attr("y",s/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(c),m=d.append("g").attr("transform",`translate(0, ${s})`).attr("class","treemapContainer"),y=lb(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=Ib().size([p,g]).paddingTop(e=>e.children&&0e.children&&0e.children&&0e.children&&0e.children&&0`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),p.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),p.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>"treemapSection section"+t).attr("fill",e=>t(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>i(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>0===e.depth?"display: none;":(e=v8({cssCompiledStyles:e.data.cssCompiledStyles})).nodeStyles+";"+e.borderStyles.join(";")),p.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+n(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+v8({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(0!==e.depth){var t=Q(this),r=e.data.name,i=(t.text(r),e.x1-e.x0),e=!1!==o.showValues&&e.value?i-10-30-10-6:i-6-6,n=Math.max(15,e),a=t.node();if(a.getComputedTextLength()>n){let e=r;for(;0n&&t.text("");break}if(t.text(e+"..."),a.getComputedTextLength()<=n)break}}}}),!1!==o.showValues&&p.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?r(e.value):"").attr("font-style","italic").attr("style",e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+n(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+v8({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")),g=f.leaves(),(y=m.selectAll(".treemapLeafGroup").data(g).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?" "+e.data.classSelector:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("style",e=>v8({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("stroke-width",3),y.append("clipPath").attr("id",(e,t)=>`clip-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+n(e.data.name)+";"+v8({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){var i=Q(this),t=e.x1-e.x0,e=e.y1-e.y0,n=i.node(),a=t-8,s=e-8;if(a<10||s<10)i.style("display","none");else{let e=parseInt(i.style("font-size"),10);for(;n.getComputedTextLength()>a&&8s&&8a||e<8||s(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+n(e.data.name)+";"+v8({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.value?r(e.value):"").each(function(e){var t,r,i=Q(this),n=this.parentNode;!n||(n=Q(n).select(".treemapLabel")).empty()||"none"===n.style("display")||(n=parseFloat(n.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*n))),i.style("font-size",t+"px"),n=(e.y1-e.y0)/2+n/2+2,i.attr("y",n),r=e.x1-e.x0,e=e.y1-e.y0-4,r-=8,i.node().getComputedTextLength()>r)||e{zC(),hi(),wi(),Vnt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Ynt=mt(({treemap:e}={})=>{var t=lC(Ot(),vr().themeVariables),r=(e=lC(Vnt,e)).titleColor??t.titleColor,i=e.labelColor??t.textColor,t=e.valueColor??t.textColor;return` .treemapNode.section { stroke: ${e.sectionStrokeColor}; stroke-width: ${e.sectionStrokeWidth}; fill: ${e.sectionFillColor}; } .treemapNode.leaf { stroke: ${e.leafStrokeColor}; stroke-width: ${e.leafStrokeWidth}; fill: ${e.leafFillColor}; } .treemapLabel { fill: ${i}; font-size: ${e.labelFontSize}; } .treemapValue { fill: ${t}; font-size: ${e.valueFontSize}; } .treemapTitle { fill: ${r}; font-size: ${e.titleFontSize}; } `},"getStyles"),Hnt=Ynt}),Jnt={};Vat(Jnt,{diagram:()=>eat});var eat,tat,rat,iat,nat,aat,sat,oat,lat=r(()=>{$nt(),Knt(),Znt(),Qnt(),eat={parser:jnt,get db(){return new Pnt},renderer:Gnt,styles:Hnt}}),cat=r(()=>{sOe(),e(),hOe(),tat=mt((e,t)=>{var r=e<=1?100*e:e;if(r<0||100({x:tat(t,r+" evolution"),y:tat(e,r+" visibility")}),"toCoordinates"),iat=mt(e=>{if(e)return"+<>"===e?"bidirectional":"+<"===e?"backward":"+>"===e?"forward":void 0},"getFlowFromPort"),nat=mt(e=>{var t;return e?.startsWith("+")?(t=/^\+'([^']*)'/.exec(e)?.[1],e.includes("<>")?{flow:"bidirectional",label:t}:e.includes("<")?{flow:"backward",label:t}:e.includes(">")?{flow:"forward",label:t}:{label:t}):{}},"extractFlowFromArrow"),aat=mt((e,o)=>{var t,r;oOe(e,o),e.size&&o.setSize(e.size.width,e.size.height),e.evolution&&(t=e.evolution.stages.map(e=>e.secondName?e.name.trim()+" / "+e.secondName.trim():e.name.trim()),r=e.evolution.stages.filter(e=>void 0!==e.boundary).map(e=>e.boundary),o.updateAxes({stages:t,stageBoundaries:r})),e.anchors.forEach(e=>{var t=rat(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,t.x,t.y,"anchor")}),e.components.forEach(e=>{var t=rat(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,n=e.decorator?.strategy;o.addNode(e.name,e.name,t.x,t.y,"component",r,i,e.inertia,n)}),e.notes.forEach(e=>{var t=rat(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,t.x,t.y)}),e.pipelines.forEach(a=>{var e=o.getNode(a.parent);if(!e||"number"!=typeof e.y)throw new Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);let s=e.y;o.startPipeline(a.parent),a.components.forEach(e=>{var t=a.parent+"_"+e.name,r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,n=tat(e.evolution,`Pipeline component "${e.name}" evolution`);o.addNode(t,e.name,n,s,"pipeline-component",r,i),o.addPipelineComponent(a.parent,t)})}),e.links.forEach(e=>{let t=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-.")),r=iat(e.fromPort)??iat(e.toPort),{flow:i,label:n}=nat(e.arrow);!r&&i&&(r=i);var a=e.linkLabel,a=n??a;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),t,a,r)}),e.evolves.forEach(e=>{var t,r=o.getNode(e.component);void 0!==r?.y&&(t=tat(e.target,`Evolve target for "${e.component}"`),o.addTrend(e.component,t,r.y))}),0{var t=rat(e.x,e.y,"Annotation "+e.number);o.addAnnotation(e.number,[{x:t.x,y:t.y}],e.text)}),e.accelerators.forEach(e=>{var t=rat(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,t.x,t.y)}),e.deaccelerators.forEach(e=>{var t=rat(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,t.x,t.y)})},"populateDb"),sat={parser:{yy:void 0},parse:mt(async e=>{var e=await rOe("wardley",e),t=(P.debug(e),sat.parser?.yy);if(!t||"function"!=typeof t.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");aat(e,t)},"parse")}}),hat=r(()=>{oat=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{mt(this,"WardleyBuilder")}addNode(e){var t={...t=this.nodes.get(e.id)??{id:e.id,label:e.label},...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,t)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]}),(e=this.nodes.get(e))&&(e.isPipelineParent=!0)}addPipelineComponent(e,t){(e=this.pipelines.get(e))&&e.componentIds.push(t),(e=this.nodes.get(t))&&(e.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(!this.nodes.has(e))for(var[t,r]of this.nodes)if(r.label===e)return t;return e}build(){var e,t=[];for(e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}}});function uat(){return B()["wardley-beta"]}function dat(e,t,r,i,n,a,s,o,l){Aat.addNode({id:e,label:t,x:r,y:i,className:n,labelOffsetX:a,labelOffsetY:s,inertia:o,sourceStrategy:l})}function pat(e,t,r=!1,i,n){Aat.addLink({source:e,target:t,dashed:r,label:i,flow:n})}function gat(e,t,r){Aat.addTrend({nodeId:e,targetX:t,targetY:r})}function fat(e,t,r){Aat.addAnnotation({number:e,coordinates:t,text:r})}function mat(e,t,r){Aat.addNote({text:e,x:t,y:r})}function yat(e,t,r){Aat.addAccelerator({name:e,x:t,y:r})}function vat(e,t,r){Aat.addDeaccelerator({name:e,x:t,y:r})}function bat(e,t){Aat.setAnnotationsBox(e,t)}function xat(e,t){Aat.setSize(e,t)}function Tat(e){Aat.startPipeline(e)}function kat(e,t){Aat.addPipelineComponent(e,t)}function wat(e){Aat.setAxes(e)}function Cat(e){return Aat.getNode(e)}function Sat(e){return Aat.resolveNodeId(e)}function Eat(){return Aat.build()}function _at(){Aat.clear(),Ph()}var Aat,Rat,Lat,Iat,Nat,Dat,Mat,Oat,Pat=r(()=>{Uu(),Wu(),hat(),Aat=new oat,mt(uat,"getConfig"),mt(dat,"addNode"),mt(pat,"addLink"),mt(gat,"addTrend"),mt(fat,"addAnnotation"),mt(mat,"addNote"),mt(yat,"addAccelerator"),mt(vat,"addDeaccelerator"),mt(bat,"setAnnotationsBox"),mt(xat,"setSize"),mt(Tat,"startPipeline"),mt(kat,"addPipelineComponent"),mt(wat,"updateAxes"),mt(Cat,"getNode"),mt(Sat,"resolveNodeId"),mt(Eat,"getWardleyData"),mt(_at,"clear"),Rat={getConfig:uat,addNode:dat,addLink:pat,addTrend:gat,addAnnotation:fat,addNote:mat,addAccelerator:yat,addDeaccelerator:vat,setAnnotationsBox:bat,setSize:xat,startPipeline:Tat,addPipelineComponent:kat,updateAxes:wat,getNode:Cat,resolveNodeId:Sat,getWardleyData:Eat,clear:_at,setAccTitle:Bh,getAccTitle:$h,setDiagramTitle:qh,getDiagramTitle:jh,getAccDescription:zh,setAccDescription:Fh}}),Bat=r(()=>{Uu(),e(),z$e(),Ch(),Lat=["Genesis","Custom Built","Product","Commodity"],Iat=mt(()=>{var e=B().themeVariables;return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Nat=mt(()=>{var e=B()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),Dat=mt((t,r,e,l)=>{P.debug(`Rendering Wardley map `+t);let d=Nat(),p=Iat(),g=1.6*d.nodeRadius,i=l.db,f=i.getWardleyData(),n=i.getDiagramTitle(),c=f.size?.width??d.width,h=f.size?.height??d.height,a=M$e(r),s=(a.selectAll("*").remove(),yh(a,h,c,d.useMaxWidth),a.attr("viewBox",`0 0 ${c} `+h),t=a.append("g").attr("class","wardley-map"),(l=a.append("defs")).append("marker").attr("id","arrow-"+r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.evolutionStroke).attr("stroke","none"),l.append("marker").attr("id","link-arrow-end-"+r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.linkStroke).attr("stroke","none"),l.append("marker").attr("id","link-arrow-start-"+r).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",p.linkStroke).attr("stroke","none"),t.append("rect").attr("class","wardley-background").attr("width",c).attr("height",h).attr("fill",p.backgroundColor),c-2*d.padding),o=h-2*d.padding,u=(n&&t.append("text").attr("class","wardley-title").attr("x",c/2).attr("y",d.padding/2).attr("fill",p.axisTextColor).attr("font-size",1.05*d.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(n),mt(e=>d.padding+e/100*s,"projectX")),m=mt(e=>h-d.padding-e/100*o,"projectY"),y=t.append("g").attr("class","wardley-axes");y.append("line").attr("x1",d.padding).attr("x2",c-d.padding).attr("y1",h-d.padding).attr("y2",h-d.padding).attr("stroke",p.axisColor).attr("stroke-width",1),y.append("line").attr("x1",d.padding).attr("x2",d.padding).attr("y1",d.padding).attr("y2",h-d.padding).attr("stroke",p.axisColor).attr("stroke-width",1);var l=f.axes.xLabel??"Evolution",v=f.axes.yLabel??"Visibility";if(y.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",d.padding+s/2).attr("y",h-d.padding/4).attr("fill",p.axisTextColor).attr("font-size",d.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(l),y.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",d.padding/3).attr("y",d.padding+o/2).attr("fill",p.axisTextColor).attr("font-size",d.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${d.padding/3} ${d.padding+o/2})`).text(v),0<(l=f.axes.stages&&0{a.push({start:t,end:e}),t=e})}else{let r=1/l.length;l.forEach((e,t)=>{a.push({start:t*r,end:(t+1)*r})})}l.forEach((e,t)=>{var r=a[t],i=d.padding+r.start*s,r=(i+(d.padding+r.end*s))/2;0{k.set(e.id,{x:u(e.x),y:m(e.y),node:e})}),0{if(0!==e.componentIds.length){var n,a,s,o=e.componentIds.map(t=>({id:t,pos:k.get(t),node:f.nodes.find(e=>e.id===t)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e{(e=k.get(e))&&(t=Math.min(t,e.x),r=Math.max(r,e.x),i=e.y)}),t!==1/0&&r!==-1/0&&(n=4*d.nodeRadius,a=i-n/2,(e=k.get(e.nodeId))&&(s=(t+r)/2,e.x=s,e.y=a-g/6),h.append("rect").attr("class","wardley-pipeline-box").attr("x",t-15).attr("y",a).attr("width",r-t+30).attr("height",n).attr("fill","none").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4))}})}let w=t.append("g").attr("class","wardley-links"),C=new Map,S=(f.pipelines.forEach(e=>{C.set(e.nodeId,new Set(e.componentIds))}),v=f.links.filter(e=>!(!k.has(e.source)||!k.has(e.target)||C.get(e.target)?.has(e.source))),w.selectAll("line").data(v).enter().append("line").attr("class",e=>"wardley-link"+(e.dashed?" wardley-link--dashed":"")).attr("x1",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.source).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=r.x-e.x,r=r.y-e.y,r=Math.sqrt(n*n+r*r);return e.x+n/r*i}).attr("y1",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.source).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=r.x-e.x,r=r.y-e.y,n=Math.sqrt(n*n+r*r);return e.y+r/n*i}).attr("x2",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.target).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=e.x-r.x,e=e.y-r.y,e=Math.sqrt(n*n+e*e);return r.x+n/e*i}).attr("y2",t=>{var e=k.get(t.source),r=k.get(t.target),i=f.nodes.find(e=>e.id===t.target).isPipelineParent?g/Math.sqrt(2):d.nodeRadius,n=e.x-r.x,e=e.y-r.y,n=Math.sqrt(n*n+e*e);return r.y+e/n*i}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",e=>e.dashed?"6 6":null).attr("marker-end",e=>"forward"===e.flow||"bidirectional"===e.flow?`url(#link-arrow-end-${r})`:null).attr("marker-start",e=>"backward"===e.flow||"bidirectional"===e.flow?`url(#link-arrow-start-${r})`:null),w.selectAll("text").data(v.filter(e=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",e=>{var t=k.get(e.source),e=k.get(e.target),r=(t.x+e.x)/2,i=e.y-t.y,e=e.x-t.x;return r+i/Math.sqrt(e*e+i*i)*8}).attr("y",e=>{var t=k.get(e.source),e=k.get(e.target),r=(t.y+e.y)/2,i=e.x-t.x,e=e.y-t.y;return r+-i/Math.sqrt(i*i+e*e)*8}).attr("fill",p.axisTextColor).attr("font-size",d.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",e=>{let t=k.get(e.source),r=k.get(e.target),i=(t.x+r.x)/2,n=(t.y+r.y)/2,a=r.x-t.x,s=r.y-t.y,o=Math.sqrt(a*a+s*s),l=s/o,c=-a/o,h=i+8*l,u=n+8*c,d=180*Math.atan2(s,a)/Math.PI;return(90e.label),l=t.append("g").attr("class","wardley-trends"),v=f.trends.map(e=>{var t,r,i,n,a=k.get(e.nodeId);return a?(t=u(e.targetX),e=m(e.targetY),r=t-a.x,i=e-a.y,n=Math.sqrt(r*r+i*i),{origin:a,targetX:t,targetY:e,adjustedX2:(a=d.nodeRadius+2)null!==e),l.selectAll("line").data(v).enter().append("line").attr("class","wardley-trend").attr("x1",e=>e.origin.x).attr("y1",e=>e.origin.y).attr("x2",e=>e.adjustedX2).attr("y2",e=>e.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`),(l=t.append("g").attr("class","wardley-nodes").selectAll("g").data(f.nodes).enter().append("g").attr("class",e=>["wardley-node",e.className?"wardley-node--"+e.className:""].filter(Boolean).join(" "))).filter(e=>"outsource"===e.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>"buy"===e.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>"build"===e.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1),(v=l.filter(e=>"market"===e.sourceStrategy)).append("circle").attr("class","wardley-market-overlay").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",2*d.nodeRadius).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>!e.isPipelineParent&&"market"!==e.sourceStrategy&&"anchor"!==e.className).append("circle").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y).attr("r",d.nodeRadius).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),.7*d.nodeRadius),E=1.2*d.nodeRadius;if(v.append("line").attr("class","wardley-market-line").attr("x1",e=>k.get(e.id).x).attr("y1",e=>k.get(e.id).y-E).attr("x2",e=>k.get(e.id).x-E*Math.cos(Math.PI/6)).attr("y2",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),v.append("line").attr("class","wardley-market-line").attr("x1",e=>k.get(e.id).x-E*Math.cos(Math.PI/6)).attr("y1",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("x2",e=>k.get(e.id).x+E*Math.cos(Math.PI/6)).attr("y2",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),v.append("line").attr("class","wardley-market-line").attr("x1",e=>k.get(e.id).x+E*Math.cos(Math.PI/6)).attr("y1",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("x2",e=>k.get(e.id).x).attr("y2",e=>k.get(e.id).y-E).attr("stroke",p.componentStroke).attr("stroke-width",1),v.append("circle").attr("class","wardley-market-dot").attr("cx",e=>k.get(e.id).x).attr("cy",e=>k.get(e.id).y-E).attr("r",S).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),v.append("circle").attr("class","wardley-market-dot").attr("cx",e=>k.get(e.id).x-E*Math.cos(Math.PI/6)).attr("cy",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("r",S).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),v.append("circle").attr("class","wardley-market-dot").attr("cx",e=>k.get(e.id).x+E*Math.cos(Math.PI/6)).attr("cy",e=>k.get(e.id).y+E*Math.sin(Math.PI/6)).attr("r",S).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),l.filter(e=>!0===e.isPipelineParent).append("rect").attr("x",e=>k.get(e.id).x-g/2).attr("y",e=>k.get(e.id).y-g/2).attr("width",g).attr("height",g).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),l.filter(e=>!0===e.inertia).append("line").attr("class","wardley-inertia").attr("x1",e=>{let t=k.get(e.id),r=e.isPipelineParent?g/2+15:d.nodeRadius+15;return e.sourceStrategy&&(r+=d.nodeRadius+10),t.x+r}).attr("y1",e=>{var t=k.get(e.id),e=e.isPipelineParent?g:2*d.nodeRadius;return t.y-e/2}).attr("x2",e=>{let t=k.get(e.id),r=e.isPipelineParent?g/2+15:d.nodeRadius+15;return e.sourceStrategy&&(r+=d.nodeRadius+10),t.x+r}).attr("y2",e=>{var t=k.get(e.id),e=e.isPipelineParent?g:2*d.nodeRadius;return t.y+e/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),l.append("text").attr("x",e=>{var t=k.get(e.id);if("anchor"===e.className)return void 0!==e.labelOffsetX?t.x+e.labelOffsetX:t.x;let r=d.nodeLabelOffset;return e.sourceStrategy&&void 0===e.labelOffsetX&&(r+=10),e=e.labelOffsetX??r,t.x+e}).attr("y",e=>{var t=k.get(e.id);if("anchor"===e.className)return void 0!==e.labelOffsetY?t.y+e.labelOffsetY:t.y-3;let r=-d.nodeLabelOffset;return e.sourceStrategy&&void 0===e.labelOffsetY&&(r-=10),e=e.labelOffsetY??r,t.y+e}).attr("class","wardley-node-label").attr("fill",e=>"evolved"===e.className?p.evolutionStroke:"anchor"===e.className?"#000":p.componentLabelColor).attr("font-size",d.labelFontSize).attr("font-weight",e=>"anchor"===e.className?"bold":"normal").attr("text-anchor",e=>"anchor"===e.className?"middle":"start").attr("dominant-baseline",e=>"anchor"===e.className?"middle":"auto").text(e=>e.label),0{var t=r.coordinates.map(e=>({x:u(e.x),y:m(e.y)}));if(1{var t=i.append("g").attr("class","wardley-annotation");t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5),t.append("text").attr("x",e.x).attr("y",e.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(r.number)})}),f.annotationsBox){let n=u(f.annotationsBox.x),a=m(f.annotationsBox.y),s=i.append("g").attr("class","wardley-annotations-box"),e=[...f.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),o=[];if(e.forEach((e,t)=>{t=s.append("text").attr("x",n+10).attr("y",a+10+16*(t+1)).attr("font-size",11).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(e.number+". "+e.text),o.push(t)}),0{var t=(e=e.node()).getComputedTextLength(),t=(r=Math.max(r,t),e.getBBox());i=Math.max(i,t.height)});var v=r+20+105,l=16*e.length+20+i/2,_=d.padding,A=c-d.padding-v,R=d.padding,L=h-d.padding-l;n=Math.max(_,Math.min(n,A)),a=Math.max(R,Math.min(a,L)),o.forEach((e,t)=>{e.attr("x",n+10).attr("y",a+10+16*(t+1))}),s.insert("rect","text").attr("x",n).attr("y",a).attr("width",v).attr("height",l).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(0{var t=u(e.x),r=m(e.y);i.append("text").attr("x",t).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(e.text)})}if(0{var t=u(e.x),r=m(e.y),i=` M ${t} ${r-15} L ${t+60-20} ${r-15} L ${t+60-20} ${r-15-8} L ${t+60} ${r} L ${t+60-20} ${r+15+8} L ${t+60-20} ${r+15} L ${t} ${r+15} Z `;n.append("path").attr("d",i).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),n.append("text").attr("x",t+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(e.name)})}if(0{var t=u(e.x),r=m(e.y),i=` M ${t+60} ${r-15} L ${t+20} ${r-15} L ${t+20} ${r-15-8} L ${t} ${r} L ${t+20} ${r+15+8} L ${t+20} ${r+15} L ${t+60} ${r+15} Z `;n.append("path").attr("d",i).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),n.append("text").attr("x",t+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw"),Mat={draw:Dat}}),$at=r(()=>{zC(),hi(),wi(),Oat=mt(({wardley:e}={})=>{var t=lC(Ot(),vr().themeVariables);return` .wardley-background { fill: ${(t=lC(t.wardley,e)).backgroundColor}; } .wardley-axes line, .wardley-axes path { stroke: ${t.axisColor}; } .wardley-axis-label { fill: ${t.axisTextColor}; } .wardley-stage-label { fill: ${t.axisTextColor}; } .wardley-grid line { stroke: ${t.gridColor}; } .wardley-node circle { fill: ${t.componentFill}; stroke: ${t.componentStroke}; } .wardley-node-label { fill: ${t.componentLabelColor}; } .wardley-link { stroke: ${t.linkStroke}; } .wardley-link--dashed { stroke-dasharray: 4 4; } .wardley-link-label { fill: ${t.axisTextColor}; } .wardley-trend line { stroke: ${t.evolutionStroke}; } .wardley-annotation-line { stroke: ${t.annotationStroke}; } .wardley-annotation circle { fill: ${t.annotationFill}; stroke: ${t.annotationStroke}; } .wardley-annotation text { fill: ${t.annotationTextColor}; } .wardley-annotations-box rect { fill: ${t.annotationFill}; stroke: ${t.annotationStroke}; } .wardley-annotations-box text { fill: ${t.annotationTextColor}; } .wardley-pipeline-box { stroke: ${t.componentStroke}; } .wardley-notes text { fill: ${t.axisTextColor}; } `},"styles")}),Fat={};Vat(Fat,{diagram:()=>zat});var zat,qat,jat=r(()=>{cat(),Pat(),Bat(),$at(),zat={parser:sat,db:Rat,renderer:Mat,styles:Oat}}),Wat=(Vat(qat={},{default:()=>dlt}),rh(),bh(),kh(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(p6(),u6))).diagram}),"loader")}),Uat={id:"flowchart",detector:mt((e,t)=>"dagre-wrapper"!==t?.flowchart?.defaultRenderer&&"elk"!==t?.flowchart?.defaultRenderer&&/^\s*graph/.test(e),"detector"),loader:mt(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(ude(),sde))).diagram}),"loader")},Gat="flowchart-v2",r=mt((e,t)=>"dagre-d3"!==t?.flowchart?.defaultRenderer&&("elk"===t?.flowchart?.defaultRenderer&&(t.layout="elk"),!(!/^\s*graph/.test(e)||"dagre-wrapper"!==t?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(e)),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(ude(),sde))).diagram;return{id:Gat,diagram:e}},"loader"),Yat={id:Gat,detector:r,loader:Vat},Hat={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(Sde(),wde))).diagram}),"loader")},Xat={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(WPe(),FPe))).diagram}),"loader")},Kat={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(B$e(),A$e))).diagram}),"loader")},Zat={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(lFe(),j$e))).diagram}),"loader")},Qat={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(bFe(),pFe))).diagram}),"loader")},Jat="quadrantChart",r=mt(e=>/^\s*quadrantChart/.test(e),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(eze(),KFe))).diagram;return{id:Jat,diagram:e}},"loader"),est={id:Jat,detector:r,loader:Vat},tst={id:"xychart",detector:mt(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(vqe(),hqe))).diagram}),"loader")},rst="requirement",r=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(Aje(),Sqe))).diagram;return{id:rst,diagram:e}},"loader"),ist={id:rst,detector:r,loader:Vat},nst={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(wWe(),oWe))).diagram}),"loader")},ast={id:"class",detector:mt((e,t)=>"dagre-wrapper"!==t?.class?.defaultRenderer&&/^\s*classDiagram/.test(e),"detector"),loader:mt(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(IWe(),RWe))).diagram}),"loader")},sst="classDiagram",r=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(fUe(),NWe))).diagram;return{id:sst,diagram:e}},"loader"),ost={id:sst,detector:r,loader:Vat},lst={id:"state",detector:mt((e,t)=>"dagre-wrapper"!==t?.state?.defaultRenderer&&/^\s*stateDiagram/.test(e),"detector"),loader:mt(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(pGe(),uGe))).diagram}),"loader")},cst="stateDiagram",r=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),Vat=mt(async()=>{var e=(await Promise.resolve().then(()=>(VGe(),gGe))).diagram;return{id:cst,diagram:e}},"loader"),hst={id:cst,detector:r,loader:Vat},ust={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(gVe(),hVe))).diagram}),"loader")},dst=(e(),z$e(),Ch(),r={draw:mt((e,t,r)=>{P.debug(`rendering svg for syntax error `);var i=(t=M$e(t)).append("g");t.attr("viewBox","0 0 2412 512"),yh(t,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")}),pst={db:{},renderer:r,parser:{parse:mt(()=>{},"parse")}},gst="flowchart-elk",Vat=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(ude(),sde))).diagram;return{id:gst,diagram:e}},"loader"),fst={id:gst,detector:Vat,loader:r},mst={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(kYe(),yYe))).diagram}),"loader")},yst={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(xHe(),HYe))).diagram}),"loader")},vst={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(qHe(),SHe))).diagram}),"loader")},bst={id:"sankey",detector:mt(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(gKe(),tKe))).diagram}),"loader")},xst={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(BKe(),bKe))).diagram}),"loader")},Tst={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(nZe(),eZe))).diagram}),"loader")},kst={id:"block",detector:mt(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(met(),XJe))).diagram}),"loader")},wst={id:"treeView",detector:mt(e=>/^\s*treeView-beta/.test(e),"detector"),loader:mt(async()=>({id:"treeView",diagram:(await Promise.resolve().then(()=>(ett(),Tet))).diagram}),"loader")},Cst="architecture",Vat=mt(e=>/^\s*architecture/.test(e),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(_tt(),Ttt))).diagram;return{id:Cst,diagram:e}},"loader"),Sst={id:Cst,detector:Vat,loader:r},Est="eventmodeling",Vat=mt(e=>/^\s*eventmodeling/.test(e),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(Hrt(),Srt))).diagram;return{id:Est,diagram:e}},"loader"),_st={id:Est,detector:Vat,loader:r},Ast={id:"ishikawa",detector:mt(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),loader:mt(async()=>({id:"ishikawa",diagram:(await Promise.resolve().then(()=>(iit(),Jrt))).diagram}),"loader")},Rst={id:"venn",detector:mt(e=>/^\s*venn-beta/.test(e),"detector"),loader:mt(async()=>({id:"venn",diagram:(await Promise.resolve().then(()=>(Bnt(),Mnt))).diagram}),"loader")},Lst=(kh(),Uu(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(lat(),Jnt))).diagram}),"loader")}),Ist="wardley-beta",Vat=mt(e=>/^\s*wardley-beta/i.test(e),"detector"),r=mt(async()=>{var e=(await Promise.resolve().then(()=>(jat(),Fat))).diagram;return{id:Ist,diagram:e}},"loader"),Nst={id:Ist,detector:Vat,loader:r},Dst=!1,Mst=mt(()=>{Dst||(Dst=!0,Zh("error",pst,e=>"error"===e.toLowerCase().trim()),Zh("---",{db:{clear:mt(()=>{},"clear")},styles:{},renderer:{draw:mt(()=>{},"draw")},parser:{parse:mt(()=>{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:mt(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),hh(fst,yst,Sst),hh(Wat,vst,ost,ast,Hat,Kat,Zat,Qat,ist,nst,Yat,Uat,mst,Xat,hst,lst,ust,est,bst,xst,tst,kst,_st,wst,Tst,Ast,Lst,Rst,Nst))},"addDiagrams"),Ost=(e(),kh(),Uu(),mt(async()=>{P.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(lh).map(async([e,{detector:t,loader:r}])=>{if(r)try{Qh(e)}catch{try{var{diagram:i,id:n}=await r();Zh(n,i,t)}catch(t){throw P.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete lh[e],t}}}))).filter(e=>"rejected"===e.status);if(0{_ot.forEach(e=>{e()}),_ot=[]},"attachFunctions"),Rot=(e(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function Lot(e){var t,r,i=e.match(nh);return i?(r={},(t="object"!=typeof(t=T_(i[1],{schema:x_})??{})||Array.isArray(t)?{}:t).displayMode&&(r.displayMode=t.displayMode.toString()),t.title&&(r.title=t.title.toString()),t.config&&(r.config=t.config),{text:e.slice(i[0].length),metadata:r}):{text:e,metadata:{}}}xh(),k_(),mt(Lot,"extractFrontMatter"),zC();var Iot=mt(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Not=mt(e=>{var{text:e,metadata:t}=Lot(e),{displayMode:t,title:r,config:i={}}=t;return t&&(i.gantt||(i.gantt={}),i.gantt.displayMode=t),{title:r,config:i,text:e}},"processFrontmatter"),Dot=mt(e=>{var t=PC.detectInit(e)??{},r=PC.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:yC(e),directive:t}},"processDirectives");function Mot(e){var t=Iot(e),t=Not(t),r=Dot(t.text),i=lC(t.config,r.directive);return{code:e=Rot(r.text),title:t.title,config:i}}function Oot(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(Mot,"preprocessDiagram"),Lh(),bi(),zC(),mt(Oot,"toBase64"),ki();var Pot=["foreignobject"],Bot=["dominant-baseline"];function $ot(e){return e=Mot(e),Tr(),xr(e.config??{}),e}async function Fot(e,t){Mst();try{var{code:r,config:i}=$ot(e);return{diagramType:(await Kot(r)).type,config:i}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt($ot,"processAndSetConfigs"),mt(Fot,"parse");var zot=mt((e,t,r=[])=>`.${e} ${t} `+ar(`{ ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),qot=mt((t,r=new Map)=>{let i=new CSSStyleSheet;if(void 0!==t.fontFamily&&i.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,i.cssRules.length),void 0!==t.altFontFamily&&i.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,i.cssRules.length),r instanceof Map){let e=_r(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{Hw(t.styles)||e.forEach(e=>{i.insertRule(zot(t.id,e,t.styles),i.cssRules.length)}),Hw(t.textStyles)||i.insertRule(zot(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))),i.cssRules.length)})}let e="";return void 0!==t.themeCSS&&("function"==typeof i.replaceSync?((r=new CSSStyleSheet).replaceSync(t.themeCSS),e=Sh(r)+` `):e+=t.themeCSS+` `),e+Sh(i)},"createCssStyles"),jot=mt((n,e)=>Tot(mot(n+`{${e}}`),wot([mt(function(e,t,r,i){"rule"===e.type&&Array.isArray(e.props)?e.parent&&e.parent.type===Fst||(e.props=e.props.map(e=>e.startsWith(n)?e:n+" "+e)):e.type.startsWith("@")&&!["@media","@supports","@layer","@scope","@container","@starting-style",Fst].includes(e.type)&&(P.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=Pst)},"addNamespace"),kot])),"compileCSS"),Wot=mt((e,t,r,i)=>(r=qot(e,r),t=Rh(t,r,{...e.themeVariables,theme:e.theme,look:e.look},i),jot(i,t)),"createUserStyles"),Uot=mt((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=$C(i)).replace(/
/g,"
")},"cleanUpSvgCode"),Got=mt((e="",t)=>``,"putIntoIFrame"),Vot=mt((e,t,r,i,n)=>{var a=e.append("div"),r=(a.attr("id",r),i&&a.attr("style",i),a.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return n&&r.attr("xmlns:xlink",n),r.append("g"),e},"appendDivSvgG");function Yot(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(Yot,"sandboxedIframe");var Hot=mt((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),Vat=mt(async function(e,t,r){Mst();var i=$ot(t),n=(t=i.code,vr());P.debug(n),t.length>(n?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=mt(()=>{var e=Q(d?o:c).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=Q(document.body),d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=Yot(Q(r),s),(u=Q(y.nodes()[0].contentDocument.body)).node().style.margin="0"):u=Q(r),Vot(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(Hot(document,e,l,s),d?(y=Yot(Q(document.body),s),(u=Q(y.nodes()[0].contentDocument.body)).node().style.margin="0"):u=Q("body"),Vot(u,e,l));let f,m;try{f=await Eot.fromText(t,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw h(),r;f=await Eot.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(i=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=Wot(n,y,v,a),b=document.createElement("style");b.innerHTML=v,i.insertBefore(b,r);try{await f.renderer.draw(t,e,"11.15.0",f)}catch(r){throw n.suppressErrorRendering?h():dst.draw(t,e,"11.15.0"),r}Zot(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let x=u.select(c).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),x=Uot(x,d,or(n.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),x=Got(x,v)):p||(x=_n.sanitize(x,{ADD_TAGS:Pot,ADD_ATTR:Bot,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),Aot(),m)throw m;return h(),{diagramType:y,svg:x,bindFunctions:f.db.bindFunctions}},"render");function Xot(e={}){(e=Ee({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),gr(e),e?.theme&&e.theme in Qt?e.themeVariables=Qt[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Qt.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?pr(e):mr(),Re(e.logLevel),Mst()}mt(Xot,"initialize");var Kot=mt((e,t={})=>(e=Mot(e).code,Eot.fromText(e,t)),"getDiagramFromText");function Zot(e,t,r,i){Cot(t,e),Sot(t,r,i,t.attr("id"))}mt(Zot,"addA11yInfo");var Qot=Object.freeze({render:Vat,parse:Fot,getDiagramFromText:Kot,initialize:Xot,getConfig:vr,setConfig:yr,getSiteConfig:mr,updateSiteConfig:fr,reset:mt(()=>{Tr()},"reset"),globalReset:mt(()=>{Tr(sr)},"globalReset"),defaultConfig:sr}),Jot=(Re(vr().logLevel),Tr(vr()),Jue(),zC(),mt((e,t,r)=>{P.warn(e),oC(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError")),elt=mt(async function(t={querySelector:".mermaid"}){try{await tlt(t)}catch(e){if(oC(e)&&P.error(e.str),ult.parseError&&ult.parseError(e),!t.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),e}},"run"),tlt=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var i=Qot.getConfig();P.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(t)}P.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(P.debug("Start On Load: "+i?.startOnLoad),Qot.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new PC.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),o=[];for(a of Array.from(n))if(P.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=ih(PC.entityDecode(c)).trim().replace(//gi,"
"),PC.detectInit(c));h&&P.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await clt(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){Jot(e,o,ult.parseError)}}if(0{Mst(),hh(...e),!1===t&&await Ost()},"registerExternalDiagrams"),ilt=mt(function(){ult.startOnLoad&&Qot.getConfig().startOnLoad&&ult.run().catch(e=>P.error("Mermaid failed to initialize",e))},"contentLoaded"),nlt=(typeof document<"u"&&window.addEventListener("load",ilt,!1),mt(function(e){ult.parseError=e},"setParseErrorHandler")),alt=[],slt=!1,olt=mt(async()=>{if(!slt){for(slt=!0;0new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{Qot.parse(a,s).then(e=>{t(e),i(e)},e=>{P.error("Error parsing",e),ult.parseError?.(e),r(e),n(e)})}),"performCall");alt.push(e),olt().catch(n)}),"parse"),clt=mt((a,s,o)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{Qot.render(a,s,o).then(e=>{t(e),i(e)},e=>{P.error("Error parsing",e),ult.parseError?.(e),r(e),n(e)})}),"performCall");alt.push(e),olt().catch(n)}),"render"),hlt=mt(()=>Object.keys(lh).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ult={startOnLoad:!0,mermaidAPI:Qot,parse:llt,render:clt,init:r,run:elt,registerExternalDiagrams:Vat,registerLayoutLoaders:Oue,initialize:rlt,parseError:void 0,contentLoaded:ilt,setParseErrorHandler:nlt,detectType:ch,registerIconPacks:Zc,getRegisteredDiagramsMetadata:hlt},dlt=ult,llt=qat;return O(_({},"__esModule",{value:!0}),llt)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;